Skip to content

Commit 78dd034

Browse files
committed
Update uses of some deprecated kustomize features
1 parent 01b5263 commit 78dd034

File tree

4 files changed

+28
-29
lines changed

4 files changed

+28
-29
lines changed

config/crd/kustomization.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ resources:
1111
- bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml
1212
# +kubebuilder:scaffold:crdkustomizeresource
1313

14-
patchesStrategicMerge:
14+
patches:
1515
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
1616
# patches here are for enabling the conversion webhook for each CRD
17-
- patches/webhook_in_openstackclusters.yaml
18-
- patches/webhook_in_openstackmachines.yaml
19-
- patches/webhook_in_openstackmachinetemplates.yaml
20-
- patches/webhook_in_openstackclustertemplates.yaml
17+
- path: patches/webhook_in_openstackclusters.yaml
18+
- path: patches/webhook_in_openstackmachines.yaml
19+
- path: patches/webhook_in_openstackmachinetemplates.yaml
20+
- path: patches/webhook_in_openstackclustertemplates.yaml
2121
# +kubebuilder:scaffold:crdkustomizewebhookpatch
2222

2323
# [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix.
2424
# patches here are for enabling the CA injection for each CRD
25-
- patches/cainjection_in_openstackclusters.yaml
26-
- patches/cainjection_in_openstackmachines.yaml
27-
- patches/cainjection_in_openstackmachinetemplates.yaml
28-
- patches/cainjection_in_openstackclustertemplates.yaml
25+
- path: patches/cainjection_in_openstackclusters.yaml
26+
- path: patches/cainjection_in_openstackmachines.yaml
27+
- path: patches/cainjection_in_openstackmachinetemplates.yaml
28+
- path: patches/cainjection_in_openstackclustertemplates.yaml
2929
# +kubebuilder:scaffold:crdkustomizecainjectionpatch
3030

3131
# the following config is for teaching kustomize how to do kustomization for CRDs.

config/default/cainjection_patch.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- op: add
2+
path: "/metadata/annotations/cert-manager.io~1inject-ca-from"
3+
value: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)

config/default/kustomization.yaml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,31 @@ commonLabels:
77

88
resources:
99
- namespace.yaml
10-
11-
bases:
1210
- ../crd
1311
- ../rbac
1412
- ../manager
1513
- ../webhook
1614
- ../certmanager
1715

18-
patchesStrategicMerge:
16+
patches:
1917
# Provide customizable hook for make targets.
20-
- manager_image_patch.yaml
21-
- manager_pull_policy.yaml
18+
- path: manager_image_patch.yaml
19+
- path: manager_pull_policy.yaml
2220
# Enable webhook.
23-
- manager_webhook_patch.yaml
21+
- path: manager_webhook_patch.yaml
2422
# Inject certificate in the webhook definition.
25-
- webhookcainjection_patch.yaml
23+
- target:
24+
group: admissionregistration.k8s.io
25+
version: v1
26+
kind: MutatingWebhookConfiguration
27+
name: mutating-webhook-configuration
28+
path: cainjection_patch.yaml
29+
- target:
30+
group: admissionregistration.k8s.io
31+
version: v1
32+
kind: ValidatingWebhookConfiguration
33+
name: validating-webhook-configuration
34+
path: cainjection_patch.yaml
2635

2736
vars:
2837
- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR

config/default/webhookcainjection_patch.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)