Skip to content

Commit 0bff383

Browse files
remove warnings from kustomization file (#2073)
1 parent f6caef6 commit 0bff383

File tree

3 files changed

+206
-55
lines changed

3 files changed

+206
-55
lines changed

config/crd/kustomization.yaml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
3-
commonLabels:
4-
cluster.x-k8s.io/v1beta1: v1beta1_v1beta2
53

64
# This kustomization.yaml is not intended to be run by itself,
75
# since it depends on service name and namespace that are out of this kustomize package.
@@ -18,33 +16,37 @@ resources:
1816
- bases/infrastructure.cluster.x-k8s.io_ibmvpcclustertemplates.yaml
1917
# +kubebuilder:scaffold:crdkustomizeresource
2018

21-
patchesStrategicMerge:
2219
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
2320
# patches here are for enabling the conversion webhook for each CRD
24-
- patches/webhook_in_ibmvpcclusters.yaml
25-
- patches/webhook_in_ibmvpcmachines.yaml
26-
- patches/webhook_in_ibmpowervsclusters.yaml
27-
- patches/webhook_in_ibmpowervsmachines.yaml
28-
- patches/webhook_in_ibmpowervsmachinetemplates.yaml
29-
- patches/webhook_in_ibmvpcmachinetemplates.yaml
30-
- patches/webhook_in_ibmpowervsimages.yaml
3121
#- patches/webhook_in_ibmpowervsclustertemplates.yaml
3222
#- patches/webhook_in_ibmvpcclustertemplates.yaml
3323
# +kubebuilder:scaffold:crdkustomizewebhookpatch
3424

3525
# [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix.
3626
# patches here are for enabling the CA injection for each CRD
37-
- patches/cainjection_in_ibmvpcclusters.yaml
38-
- patches/cainjection_in_ibmvpcmachines.yaml
39-
- patches/cainjection_in_ibmpowervsclusters.yaml
40-
- patches/cainjection_in_ibmpowervsmachines.yaml
41-
- patches/cainjection_in_ibmpowervsmachinetemplates.yaml
42-
- patches/cainjection_in_ibmvpcmachinetemplates.yaml
43-
- patches/cainjection_in_ibmpowervsimages.yaml
4427
#- patches/cainjection_in_ibmpowervsclustertemplates.yaml
4528
#- patches/cainjection_in_ibmvpcclustertemplates.yaml
4629
# +kubebuilder:scaffold:crdkustomizecainjectionpatch
4730

4831
# the following config is for teaching kustomize how to do kustomization for CRDs.
4932
configurations:
5033
- kustomizeconfig.yaml
34+
labels:
35+
- includeSelectors: true
36+
pairs:
37+
cluster.x-k8s.io/v1beta1: v1beta1_v1beta2
38+
patches:
39+
- path: patches/webhook_in_ibmvpcclusters.yaml
40+
- path: patches/webhook_in_ibmvpcmachines.yaml
41+
- path: patches/webhook_in_ibmpowervsclusters.yaml
42+
- path: patches/webhook_in_ibmpowervsmachines.yaml
43+
- path: patches/webhook_in_ibmpowervsmachinetemplates.yaml
44+
- path: patches/webhook_in_ibmvpcmachinetemplates.yaml
45+
- path: patches/webhook_in_ibmpowervsimages.yaml
46+
- path: patches/cainjection_in_ibmvpcclusters.yaml
47+
- path: patches/cainjection_in_ibmvpcmachines.yaml
48+
- path: patches/cainjection_in_ibmpowervsclusters.yaml
49+
- path: patches/cainjection_in_ibmpowervsmachines.yaml
50+
- path: patches/cainjection_in_ibmpowervsmachinetemplates.yaml
51+
- path: patches/cainjection_in_ibmvpcmachinetemplates.yaml
52+
- path: patches/cainjection_in_ibmpowervsimages.yaml

config/default/kustomization.yaml

Lines changed: 184 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,64 +8,213 @@ namespace: capi-ibmcloud-system
88
# field above.
99
namePrefix: capi-ibmcloud-
1010

11-
commonLabels:
12-
cluster.x-k8s.io/provider: "infrastructure-ibmcloud"
1311

14-
bases:
15-
- ../crd
16-
- ../rbac
17-
- ../manager
1812
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
1913
# crd/kustomization.yaml
20-
- ../webhook
2114
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required.
22-
- ../certmanager
2315
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
2416
#- ../prometheus
2517

2618
resources:
2719
- credentials.yaml
20+
- ../crd
21+
- ../rbac
22+
- ../manager
23+
- ../webhook
24+
- ../certmanager
2825

29-
patchesStrategicMerge:
30-
- manager_credentials_patch.yaml
31-
- manager_image_patch.yaml
32-
- manager_pull_policy.yaml
3326

3427
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
3528
# crd/kustomization.yaml
36-
- manager_webhook_patch.yaml
3729

3830
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'.
3931
# Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA injection in the admission webhooks.
4032
# 'CERTMANAGER' needs to be enabled to use ca injection
41-
- webhookcainjection_patch.yaml
4233

4334
# the following config is for teaching kustomize how to do var substitution
44-
vars:
4535
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix.
46-
- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
47-
objref:
36+
apiVersion: kustomize.config.k8s.io/v1beta1
37+
kind: Kustomization
38+
labels:
39+
- includeSelectors: true
40+
pairs:
41+
cluster.x-k8s.io/provider: infrastructure-ibmcloud
42+
patches:
43+
- path: manager_credentials_patch.yaml
44+
- path: manager_image_patch.yaml
45+
- path: manager_pull_policy.yaml
46+
- path: manager_webhook_patch.yaml
47+
- path: webhookcainjection_patch.yaml
48+
replacements:
49+
- source:
50+
fieldPath: metadata.namespace
4851
kind: Certificate
49-
group: cert-manager.io
50-
version: v1
51-
name: serving-cert # this name should match the one in certificate.yaml
52-
fieldref:
53-
fieldpath: metadata.namespace
54-
- name: CERTIFICATE_NAME
55-
objref:
52+
name: serving-cert
53+
targets:
54+
- fieldPaths:
55+
- metadata.annotations.[cert-manager.io/inject-ca-from]
56+
options:
57+
delimiter: /
58+
select:
59+
kind: MutatingWebhookConfiguration
60+
name: mutating-webhook-configuration
61+
- fieldPaths:
62+
- metadata.annotations.[cert-manager.io/inject-ca-from]
63+
options:
64+
delimiter: /
65+
select:
66+
kind: ValidatingWebhookConfiguration
67+
name: validating-webhook-configuration
68+
- fieldPaths:
69+
- metadata.annotations.[cert-manager.io/inject-ca-from]
70+
options:
71+
delimiter: /
72+
select:
73+
kind: CustomResourceDefinition
74+
name: ibmpowervsclusters.infrastructure.cluster.x-k8s.io
75+
- fieldPaths:
76+
- metadata.annotations.[cert-manager.io/inject-ca-from]
77+
options:
78+
delimiter: /
79+
select:
80+
kind: CustomResourceDefinition
81+
name: ibmpowervsimages.infrastructure.cluster.x-k8s.io
82+
- fieldPaths:
83+
- metadata.annotations.[cert-manager.io/inject-ca-from]
84+
options:
85+
delimiter: /
86+
select:
87+
kind: CustomResourceDefinition
88+
name: ibmpowervsmachines.infrastructure.cluster.x-k8s.io
89+
- fieldPaths:
90+
- metadata.annotations.[cert-manager.io/inject-ca-from]
91+
options:
92+
delimiter: /
93+
select:
94+
kind: CustomResourceDefinition
95+
name: ibmpowervsmachinetemplates.infrastructure.cluster.x-k8s.io
96+
- fieldPaths:
97+
- metadata.annotations.[cert-manager.io/inject-ca-from]
98+
options:
99+
delimiter: /
100+
select:
101+
kind: CustomResourceDefinition
102+
name: ibmvpcclusters.infrastructure.cluster.x-k8s.io
103+
- fieldPaths:
104+
- metadata.annotations.[cert-manager.io/inject-ca-from]
105+
options:
106+
delimiter: /
107+
select:
108+
kind: CustomResourceDefinition
109+
name: ibmvpcmachines.infrastructure.cluster.x-k8s.io
110+
- fieldPaths:
111+
- metadata.annotations.[cert-manager.io/inject-ca-from]
112+
options:
113+
delimiter: /
114+
select:
115+
kind: CustomResourceDefinition
116+
name: ibmvpcmachinetemplates.infrastructure.cluster.x-k8s.io
117+
- source:
118+
fieldPath: metadata.name
56119
kind: Certificate
57-
group: cert-manager.io
58-
version: v1
59-
name: serving-cert # this name should match the one in certificate.yaml
60-
- name: SERVICE_NAMESPACE # namespace of the service
61-
objref:
120+
name: serving-cert
121+
targets:
122+
- fieldPaths:
123+
- metadata.annotations.[cert-manager.io/inject-ca-from]
124+
options:
125+
delimiter: /
126+
index: 1
127+
select:
128+
kind: MutatingWebhookConfiguration
129+
name: mutating-webhook-configuration
130+
- fieldPaths:
131+
- metadata.annotations.[cert-manager.io/inject-ca-from]
132+
options:
133+
delimiter: /
134+
index: 1
135+
select:
136+
kind: ValidatingWebhookConfiguration
137+
name: validating-webhook-configuration
138+
- fieldPaths:
139+
- metadata.annotations.[cert-manager.io/inject-ca-from]
140+
options:
141+
delimiter: /
142+
index: 1
143+
select:
144+
kind: CustomResourceDefinition
145+
name: ibmpowervsclusters.infrastructure.cluster.x-k8s.io
146+
- fieldPaths:
147+
- metadata.annotations.[cert-manager.io/inject-ca-from]
148+
options:
149+
delimiter: /
150+
index: 1
151+
select:
152+
kind: CustomResourceDefinition
153+
name: ibmpowervsimages.infrastructure.cluster.x-k8s.io
154+
- fieldPaths:
155+
- metadata.annotations.[cert-manager.io/inject-ca-from]
156+
options:
157+
delimiter: /
158+
index: 1
159+
select:
160+
kind: CustomResourceDefinition
161+
name: ibmpowervsmachines.infrastructure.cluster.x-k8s.io
162+
- fieldPaths:
163+
- metadata.annotations.[cert-manager.io/inject-ca-from]
164+
options:
165+
delimiter: /
166+
index: 1
167+
select:
168+
kind: CustomResourceDefinition
169+
name: ibmpowervsmachinetemplates.infrastructure.cluster.x-k8s.io
170+
- fieldPaths:
171+
- metadata.annotations.[cert-manager.io/inject-ca-from]
172+
options:
173+
delimiter: /
174+
index: 1
175+
select:
176+
kind: CustomResourceDefinition
177+
name: ibmvpcclusters.infrastructure.cluster.x-k8s.io
178+
- fieldPaths:
179+
- metadata.annotations.[cert-manager.io/inject-ca-from]
180+
options:
181+
delimiter: /
182+
index: 1
183+
select:
184+
kind: CustomResourceDefinition
185+
name: ibmvpcmachines.infrastructure.cluster.x-k8s.io
186+
- fieldPaths:
187+
- metadata.annotations.[cert-manager.io/inject-ca-from]
188+
options:
189+
delimiter: /
190+
index: 1
191+
select:
192+
kind: CustomResourceDefinition
193+
name: ibmvpcmachinetemplates.infrastructure.cluster.x-k8s.io
194+
- source:
195+
fieldPath: metadata.name
62196
kind: Service
63-
version: v1
64197
name: webhook-service
65-
fieldref:
66-
fieldpath: metadata.namespace
67-
- name: SERVICE_NAME
68-
objref:
198+
targets:
199+
- fieldPaths:
200+
- spec.dnsNames.0
201+
- spec.dnsNames.1
202+
options:
203+
delimiter: .
204+
select:
205+
kind: Certificate
206+
name: serving-cert
207+
- source:
208+
fieldPath: metadata.namespace
69209
kind: Service
70-
version: v1
71210
name: webhook-service
211+
targets:
212+
- fieldPaths:
213+
- spec.dnsNames.0
214+
- spec.dnsNames.1
215+
options:
216+
delimiter: .
217+
index: 1
218+
select:
219+
kind: Certificate
220+
name: serving-cert
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
4-
- ../../../../../templates/cluster-template-powervs-cloud-provider.yaml
5-
patchesStrategicMerge:
6-
- patches/mhc-label.yaml
4+
- ../../../../../templates/cluster-template-powervs-cloud-provider.yaml
5+
patches:
6+
- path: patches/mhc-label.yaml

0 commit comments

Comments
 (0)