@@ -8,64 +8,213 @@ namespace: capi-ibmcloud-system
8
8
# field above.
9
9
namePrefix : capi-ibmcloud-
10
10
11
- commonLabels :
12
- cluster.x-k8s.io/provider : " infrastructure-ibmcloud"
13
11
14
- bases :
15
- - ../crd
16
- - ../rbac
17
- - ../manager
18
12
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
19
13
# crd/kustomization.yaml
20
- - ../webhook
21
14
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required.
22
- - ../certmanager
23
15
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
24
16
# - ../prometheus
25
17
26
18
resources :
27
19
- credentials.yaml
20
+ - ../crd
21
+ - ../rbac
22
+ - ../manager
23
+ - ../webhook
24
+ - ../certmanager
28
25
29
- patchesStrategicMerge :
30
- - manager_credentials_patch.yaml
31
- - manager_image_patch.yaml
32
- - manager_pull_policy.yaml
33
26
34
27
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
35
28
# crd/kustomization.yaml
36
- - manager_webhook_patch.yaml
37
29
38
30
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'.
39
31
# Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA injection in the admission webhooks.
40
32
# 'CERTMANAGER' needs to be enabled to use ca injection
41
- - webhookcainjection_patch.yaml
42
33
43
34
# the following config is for teaching kustomize how to do var substitution
44
- vars :
45
35
# [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
48
51
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
56
119
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
62
196
kind : Service
63
- version : v1
64
197
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
69
209
kind : Service
70
- version : v1
71
210
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
0 commit comments