Skip to content

Commit 690938a

Browse files
committed
Fix kustomize deprecations in config and templates/azure-cluster-identity
1 parent ce86cd7 commit 690938a

File tree

9 files changed

+136
-135
lines changed

9 files changed

+136
-135
lines changed

config/aso/kustomization.yaml

Lines changed: 51 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -7,59 +7,58 @@ resources:
77
- settings.yaml
88

99
patches:
10-
- path: patches/visualizer_label_in_bastionhosts.yaml
11-
- path: patches/visualizer_label_in_extensions.yaml
12-
- path: patches/visualizer_label_in_fleetmembers.yaml
13-
- path: patches/visualizer_label_in_managedclusteragentpools.yaml
14-
- path: patches/visualizer_label_in_managed_clusters.yaml
15-
- path: patches/visualizer_label_in_natgateways.yaml
16-
- path: patches/visualizer_label_in_privateendpoints.yaml
17-
- path: patches/visualizer_label_in_resourcegroups.yaml
18-
- path: patches/visualizer_label_in_subnets.yaml
19-
- path: patches/visualizer_label_in_virtualnetworks.yaml
20-
- patch: |- # default kustomization includes a namespace already
21-
$patch: delete
22-
apiVersion: v1
23-
kind: Namespace
24-
metadata:
25-
name: azureserviceoperator-system
26-
- patch: |-
27-
- op: test
28-
path: /spec/template/spec/containers/0/args/4
29-
value: --crd-pattern=
30-
- op: replace # Users can specify additional ASO CRDs. CRDs should be appended with ';'
31-
path: /spec/template/spec/containers/0/args/4
32-
value: --crd-pattern=${ADDITIONAL_ASO_CRDS:= }
33-
target:
34-
group: apps
35-
version: v1
36-
kind: Deployment
37-
name: azureserviceoperator-controller-manager
10+
- path: patches/visualizer_label_in_bastionhosts.yaml
11+
- path: patches/visualizer_label_in_extensions.yaml
12+
- path: patches/visualizer_label_in_fleetmembers.yaml
13+
- path: patches/visualizer_label_in_managedclusteragentpools.yaml
14+
- path: patches/visualizer_label_in_managed_clusters.yaml
15+
- path: patches/visualizer_label_in_natgateways.yaml
16+
- path: patches/visualizer_label_in_privateendpoints.yaml
17+
- path: patches/visualizer_label_in_resourcegroups.yaml
18+
- path: patches/visualizer_label_in_subnets.yaml
19+
- path: patches/visualizer_label_in_virtualnetworks.yaml
20+
- patch: |-
21+
$patch: delete
22+
apiVersion: v1
23+
kind: Namespace
24+
metadata:
25+
name: azureserviceoperator-system
26+
- patch: |-
27+
- op: test
28+
path: /spec/template/spec/containers/0/args/4
29+
value: --crd-pattern=
30+
- op: replace # Users can specify additional ASO CRDs. CRDs should be appended with ';'
31+
path: /spec/template/spec/containers/0/args/4
32+
value: --crd-pattern=${ADDITIONAL_ASO_CRDS:= }
33+
target:
34+
group: apps
35+
kind: Deployment
36+
name: azureserviceoperator-controller-manager
37+
version: v1
3838

3939
replacements:
40-
- source:
41-
kind: Certificate
42-
group: cert-manager.io
40+
- source:
41+
fieldPath: metadata.namespace
42+
group: cert-manager.io
43+
kind: Certificate
44+
name: azureserviceoperator-serving-cert
45+
version: v1
46+
targets:
47+
- fieldPaths:
48+
- metadata.annotations.cert-manager\.io/inject-ca-from
49+
options:
50+
delimiter: /
51+
select:
52+
annotationSelector: cert-manager.io/inject-ca-from
4353
version: v1
54+
- fieldPaths:
55+
- spec.dnsNames.0
56+
- spec.dnsNames.1
57+
options:
58+
delimiter: .
59+
index: 1
60+
select:
61+
group: cert-manager.io
62+
kind: Certificate
4463
name: azureserviceoperator-serving-cert
45-
fieldPath: metadata.namespace
46-
targets:
47-
- select:
48-
version: v1
49-
annotationSelector: cert-manager.io/inject-ca-from
50-
fieldPaths:
51-
- metadata.annotations.cert-manager\.io/inject-ca-from
52-
options:
53-
delimiter: /
54-
index: 0
55-
- select:
56-
group: cert-manager.io
57-
version: v1
58-
kind: Certificate
59-
name: azureserviceoperator-serving-cert
60-
fieldPaths:
61-
- spec.dnsNames.0
62-
- spec.dnsNames.1
63-
options:
64-
delimiter: .
65-
index: 1
64+
version: v1

config/capz/kustomization.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ patches:
2626
configurations:
2727
- kustomizeconfig.yaml
2828

29+
30+
2931
replacements:
30-
- source: # CERTIFICATE_NAMESPACE
32+
- source:
3133
fieldPath: metadata.namespace
3234
kind: Certificate
3335
name: serving-cert
@@ -38,7 +40,7 @@ replacements:
3840
delimiter: /
3941
select:
4042
annotationSelector: cert-manager.io/inject-ca-from
41-
- source: # CERTIFICATE_NAME
43+
- source:
4244
kind: Certificate
4345
name: serving-cert
4446
targets:
@@ -49,8 +51,7 @@ replacements:
4951
index: 1
5052
select:
5153
annotationSelector: cert-manager.io/inject-ca-from
52-
53-
- source: # SERVICE_NAMESPACE
54+
- source:
5455
fieldPath: metadata.namespace
5556
kind: Service
5657
name: webhook-service
@@ -77,8 +78,7 @@ replacements:
7778
name: serving-cert
7879
namespace: system
7980
version: v1
80-
81-
- source: # SERVICE_NAME
81+
- source:
8282
kind: Service
8383
name: webhook-service
8484
targets:
@@ -119,3 +119,5 @@ replacements:
119119
select:
120120
name: controller-manager
121121
namespace: system
122+
apiVersion: kustomize.config.k8s.io/v1beta1
123+
kind: Kustomization
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
resources:
2-
- certificate.yaml
2+
- certificate.yaml
33
configurations:
4-
- kustomizeconfig.yaml
4+
- kustomizeconfig.yaml
5+
apiVersion: kustomize.config.k8s.io/v1beta1
6+
kind: Kustomization

config/crd/kustomization.yaml

Lines changed: 56 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,75 @@
11
# This kustomization.yaml is not intended to be run by itself,
22
# since it depends on service name and namespace that are out of this kustomize package.
33
# It should be run by config/
4-
4+
apiVersion: kustomize.config.k8s.io/v1beta1
5+
kind: Kustomization
56
resources:
6-
- bases/infrastructure.cluster.x-k8s.io_azuremachines.yaml
7-
- bases/infrastructure.cluster.x-k8s.io_azureclusters.yaml
8-
- bases/infrastructure.cluster.x-k8s.io_azureclustertemplates.yaml
9-
- bases/infrastructure.cluster.x-k8s.io_azuremachinetemplates.yaml
10-
- bases/infrastructure.cluster.x-k8s.io_azureclusteridentities.yaml
11-
- bases/infrastructure.cluster.x-k8s.io_azuremachinepools.yaml
12-
- bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepools.yaml
13-
- bases/infrastructure.cluster.x-k8s.io_azuremanagedclusters.yaml
14-
- bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml
15-
- bases/infrastructure.cluster.x-k8s.io_azuremachinepoolmachines.yaml
16-
- bases/infrastructure.cluster.x-k8s.io_azuremanagedclustertemplates.yaml
17-
- bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanetemplates.yaml
18-
- bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepooltemplates.yaml
19-
- bases/infrastructure.cluster.x-k8s.io_azureasomanagedclusters.yaml
20-
- bases/infrastructure.cluster.x-k8s.io_azureasomanagedclustertemplates.yaml
21-
- bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanes.yaml
22-
- bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanetemplates.yaml
23-
- bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepools.yaml
24-
- bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepooltemplates.yaml
7+
- bases/infrastructure.cluster.x-k8s.io_azuremachines.yaml
8+
- bases/infrastructure.cluster.x-k8s.io_azureclusters.yaml
9+
- bases/infrastructure.cluster.x-k8s.io_azureclustertemplates.yaml
10+
- bases/infrastructure.cluster.x-k8s.io_azuremachinetemplates.yaml
11+
- bases/infrastructure.cluster.x-k8s.io_azureclusteridentities.yaml
12+
- bases/infrastructure.cluster.x-k8s.io_azuremachinepools.yaml
13+
- bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepools.yaml
14+
- bases/infrastructure.cluster.x-k8s.io_azuremanagedclusters.yaml
15+
- bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml
16+
- bases/infrastructure.cluster.x-k8s.io_azuremachinepoolmachines.yaml
17+
- bases/infrastructure.cluster.x-k8s.io_azuremanagedclustertemplates.yaml
18+
- bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanetemplates.yaml
19+
- bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepooltemplates.yaml
20+
- bases/infrastructure.cluster.x-k8s.io_azureasomanagedclusters.yaml
21+
- bases/infrastructure.cluster.x-k8s.io_azureasomanagedclustertemplates.yaml
22+
- bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanes.yaml
23+
- bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanetemplates.yaml
24+
- bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepools.yaml
25+
- bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepooltemplates.yaml
2526
# +kubebuilder:scaffold:crdkustomizeresource
26-
27-
28-
patches:
2927
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
3028
# patches here are for enabling the conversion webhook for each CRD
31-
- path: patches/webhook_in_azuremachines.yaml
32-
- path: patches/webhook_in_azureclusters.yaml
33-
- path: patches/webhook_in_azureclustertemplates.yaml
34-
- path: patches/webhook_in_azureclusteridentities.yaml
35-
- path: patches/webhook_in_azuremachinetemplates.yaml
36-
- path: patches/webhook_in_azuremachinepools.yaml
37-
- path: patches/webhook_in_azuremachinepoolmachines.yaml
3829
# - path: patches/webhook_in_azuremanagedmachinepools.yaml
3930
# - path: patches/webhook_in_azuremanagedclusters.yaml
4031
# - path: patches/webhook_in_azuremanagedcontrolplanes.yaml
4132
# +kubebuilder:scaffold:crdkustomizewebhookpatch
42-
4333
# [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix.
4434
# patches here are for enabling the CA injection for each CRD
45-
- path: patches/cainjection_in_azuremachines.yaml
46-
- path: patches/cainjection_in_azureclusters.yaml
47-
- path: patches/cainjection_in_azureclustertemplates.yaml
48-
- path: patches/cainjection_in_azureclusteridentities.yaml
49-
- path: patches/cainjection_in_azuremachinetemplates.yaml
50-
- path: patches/cainjection_in_azuremachinepools.yaml
51-
- path: patches/cainjection_in_azuremachinepoolmachines.yaml
5235
# - path: patches/cainjection_in_azuremanagedmachinepools.yaml
5336
# - path: patches/cainjection_in_azuremanagedclusters.yaml
5437
# - path: patches/cainjection_in_azuremanagedcontrolplanes.yaml
5538
# +kubebuilder:scaffold:crdkustomizecainjectionpatch
56-
57-
- path: patches/capicontract_in_azuremachines.yaml
58-
- path: patches/capicontract_in_azureclusters.yaml
59-
- path: patches/capicontract_in_azureclustertemplates.yaml
60-
- path: patches/capicontract_in_azuremachinetemplates.yaml
61-
- path: patches/capicontract_in_azureclusteridentities.yaml
62-
- path: patches/capicontract_in_azuremachinepools.yaml
63-
- path: patches/capicontract_in_azuremanagedmachinepools.yaml
64-
- path: patches/capicontract_in_azuremanagedclusters.yaml
65-
- path: patches/capicontract_in_azuremanagedcontrolplanes.yaml
66-
- path: patches/capicontract_in_azuremachinepoolmachines.yaml
67-
- path: patches/capicontract_in_azuremanagedclustertemplates.yaml
68-
- path: patches/capicontract_in_azuremanagedcontrolplanetemplates.yaml
69-
- path: patches/capicontract_in_azuremanagedmachinepooltemplates.yaml
70-
- path: patches/capicontract_in_azureasomanagedclusters.yaml
71-
- path: patches/capicontract_in_azureasomanagedclustertemplates.yaml
72-
- path: patches/capicontract_in_azureasomanagedcontrolplanes.yaml
73-
- path: patches/capicontract_in_azureasomanagedcontrolplanetemplates.yaml
74-
- path: patches/capicontract_in_azureasomanagedmachinepools.yaml
75-
- path: patches/capicontract_in_azureasomanagedmachinepooltemplates.yaml
76-
39+
patches:
40+
- path: patches/webhook_in_azuremachines.yaml
41+
- path: patches/webhook_in_azureclusters.yaml
42+
- path: patches/webhook_in_azureclustertemplates.yaml
43+
- path: patches/webhook_in_azureclusteridentities.yaml
44+
- path: patches/webhook_in_azuremachinetemplates.yaml
45+
- path: patches/webhook_in_azuremachinepools.yaml
46+
- path: patches/webhook_in_azuremachinepoolmachines.yaml
47+
- path: patches/cainjection_in_azuremachines.yaml
48+
- path: patches/cainjection_in_azureclusters.yaml
49+
- path: patches/cainjection_in_azureclustertemplates.yaml
50+
- path: patches/cainjection_in_azureclusteridentities.yaml
51+
- path: patches/cainjection_in_azuremachinetemplates.yaml
52+
- path: patches/cainjection_in_azuremachinepools.yaml
53+
- path: patches/cainjection_in_azuremachinepoolmachines.yaml
54+
- path: patches/capicontract_in_azuremachines.yaml
55+
- path: patches/capicontract_in_azureclusters.yaml
56+
- path: patches/capicontract_in_azureclustertemplates.yaml
57+
- path: patches/capicontract_in_azuremachinetemplates.yaml
58+
- path: patches/capicontract_in_azureclusteridentities.yaml
59+
- path: patches/capicontract_in_azuremachinepools.yaml
60+
- path: patches/capicontract_in_azuremanagedmachinepools.yaml
61+
- path: patches/capicontract_in_azuremanagedclusters.yaml
62+
- path: patches/capicontract_in_azuremanagedcontrolplanes.yaml
63+
- path: patches/capicontract_in_azuremachinepoolmachines.yaml
64+
- path: patches/capicontract_in_azuremanagedclustertemplates.yaml
65+
- path: patches/capicontract_in_azuremanagedcontrolplanetemplates.yaml
66+
- path: patches/capicontract_in_azuremanagedmachinepooltemplates.yaml
67+
- path: patches/capicontract_in_azureasomanagedclusters.yaml
68+
- path: patches/capicontract_in_azureasomanagedclustertemplates.yaml
69+
- path: patches/capicontract_in_azureasomanagedcontrolplanes.yaml
70+
- path: patches/capicontract_in_azureasomanagedcontrolplanetemplates.yaml
71+
- path: patches/capicontract_in_azureasomanagedmachinepools.yaml
72+
- path: patches/capicontract_in_azureasomanagedmachinepooltemplates.yaml
7773
# the following config is for teaching kustomize how to do kustomization for CRDs.
7874
configurations:
79-
- kustomizeconfig.yaml
75+
- kustomizeconfig.yaml

config/default/kustomization.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
13
resources:
2-
- ../capz
3-
4+
- ../capz
45
components:
56
- ../aso
6-
77
replacements:
88
- source:
99
kind: Deployment

config/manager/kustomization.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
4-
- manager.yaml
5-
4+
- manager.yaml

config/rbac/kustomization.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
4-
- role.yaml
5-
- role_binding.yaml
6-
- service_account.yaml
7-
- leader_election_role.yaml
8-
- leader_election_role_binding.yaml
4+
- role.yaml
5+
- role_binding.yaml
6+
- service_account.yaml
7+
- leader_election_role.yaml
8+
- leader_election_role_binding.yaml

config/webhook/kustomization.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
13
resources:
2-
- manifests.yaml
3-
- service.yaml
4-
4+
- manifests.yaml
5+
- service.yaml
56
configurations:
6-
- kustomizeconfig.yaml
7+
- kustomizeconfig.yaml
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
13
namespace: default
24
resources:
3-
- azure-cluster-identity.yaml
5+
- azure-cluster-identity.yaml

0 commit comments

Comments
 (0)