File tree Expand file tree Collapse file tree 12 files changed +321
-327
lines changed
cronjob-tutorial/testdata/project/config/default
getting-started/testdata/project/config/default
multiversion-tutorial/testdata/project/config/default
pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/kdefault
project-v4-multigroup/config/default
project-v4-with-plugins/config/default
project-v4/config/default Expand file tree Collapse file tree 12 files changed +321
-327
lines changed Original file line number Diff line number Diff line change 8282 sed -i '25s/^#//' $KUSTOMIZATION_FILE_PATH
8383 # Uncomment only ValidatingWebhookConfiguration
8484 # from cert-manager replaces
85- sed -i '50,80s /^#//' $KUSTOMIZATION_FILE_PATH
86- sed -i '144 ,177s/^#//' $KUSTOMIZATION_FILE_PATH
85+ sed -i '50,116s /^#//' $KUSTOMIZATION_FILE_PATH
86+ sed -i '148 ,177s/^#//' $KUSTOMIZATION_FILE_PATH
8787 cd testdata/project-v4-with-plugins/
8888 go mod tidy
8989
Original file line number Diff line number Diff line change @@ -48,6 +48,41 @@ patches:
4848# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix.
4949# Uncomment the following replacements to add the cert-manager CA injection annotations
5050replacements :
51+ - source : # Uncomment the following block if you have any webhook
52+ kind : Service
53+ version : v1
54+ name : webhook-service
55+ fieldPath : .metadata.name # Name of the service
56+ targets :
57+ - select :
58+ kind : Certificate
59+ group : cert-manager.io
60+ version : v1
61+ fieldPaths :
62+ - .spec.dnsNames.0
63+ - .spec.dnsNames.1
64+ options :
65+ delimiter : ' .'
66+ index : 0
67+ create : true
68+ - source :
69+ kind : Service
70+ version : v1
71+ name : webhook-service
72+ fieldPath : .metadata.namespace # Namespace of the service
73+ targets :
74+ - select :
75+ kind : Certificate
76+ group : cert-manager.io
77+ version : v1
78+ fieldPaths :
79+ - .spec.dnsNames.0
80+ - .spec.dnsNames.1
81+ options :
82+ delimiter : ' .'
83+ index : 1
84+ create : true
85+
5186 - source : # Uncomment the following block if you have a ValidatingWebhook (--programmatic-validation)
5287 kind : Certificate
5388 group : cert-manager.io
@@ -109,7 +144,7 @@ replacements:
109144 delimiter : ' /'
110145 index : 1
111146 create : true
112-
147+ #
113148# - source: # Uncomment the following block if you have a ConversionWebhook (--conversion)
114149# kind: Certificate
115150# group: cert-manager.io
@@ -140,38 +175,3 @@ replacements:
140175# delimiter: '/'
141176# index: 1
142177# create: true
143- #
144- - source : # Uncomment the following block if you enable cert-manager
145- kind : Service
146- version : v1
147- name : webhook-service
148- fieldPath : .metadata.name # Name of the service
149- targets :
150- - select :
151- kind : Certificate
152- group : cert-manager.io
153- version : v1
154- fieldPaths :
155- - .spec.dnsNames.0
156- - .spec.dnsNames.1
157- options :
158- delimiter : ' .'
159- index : 0
160- create : true
161- - source :
162- kind : Service
163- version : v1
164- name : webhook-service
165- fieldPath : .metadata.namespace # Namespace of the service
166- targets :
167- - select :
168- kind : Certificate
169- group : cert-manager.io
170- version : v1
171- fieldPaths :
172- - .spec.dnsNames.0
173- - .spec.dnsNames.1
174- options :
175- delimiter : ' .'
176- index : 1
177- create : true
Original file line number Diff line number Diff line change @@ -48,6 +48,41 @@ patches:
4848# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix.
4949# Uncomment the following replacements to add the cert-manager CA injection annotations
5050# replacements:
51+ # - source: # Uncomment the following block if you have any webhook
52+ # kind: Service
53+ # version: v1
54+ # name: webhook-service
55+ # fieldPath: .metadata.name # Name of the service
56+ # targets:
57+ # - select:
58+ # kind: Certificate
59+ # group: cert-manager.io
60+ # version: v1
61+ # fieldPaths:
62+ # - .spec.dnsNames.0
63+ # - .spec.dnsNames.1
64+ # options:
65+ # delimiter: '.'
66+ # index: 0
67+ # create: true
68+ # - source:
69+ # kind: Service
70+ # version: v1
71+ # name: webhook-service
72+ # fieldPath: .metadata.namespace # Namespace of the service
73+ # targets:
74+ # - select:
75+ # kind: Certificate
76+ # group: cert-manager.io
77+ # version: v1
78+ # fieldPaths:
79+ # - .spec.dnsNames.0
80+ # - .spec.dnsNames.1
81+ # options:
82+ # delimiter: '.'
83+ # index: 1
84+ # create: true
85+ #
5186# - source: # Uncomment the following block if you have a ValidatingWebhook (--programmatic-validation)
5287# kind: Certificate
5388# group: cert-manager.io
@@ -140,38 +175,3 @@ patches:
140175# delimiter: '/'
141176# index: 1
142177# create: true
143- #
144- # - source: # Uncomment the following block if you enable cert-manager
145- # kind: Service
146- # version: v1
147- # name: webhook-service
148- # fieldPath: .metadata.name # Name of the service
149- # targets:
150- # - select:
151- # kind: Certificate
152- # group: cert-manager.io
153- # version: v1
154- # fieldPaths:
155- # - .spec.dnsNames.0
156- # - .spec.dnsNames.1
157- # options:
158- # delimiter: '.'
159- # index: 0
160- # create: true
161- # - source:
162- # kind: Service
163- # version: v1
164- # name: webhook-service
165- # fieldPath: .metadata.namespace # Namespace of the service
166- # targets:
167- # - select:
168- # kind: Certificate
169- # group: cert-manager.io
170- # version: v1
171- # fieldPaths:
172- # - .spec.dnsNames.0
173- # - .spec.dnsNames.1
174- # options:
175- # delimiter: '.'
176- # index: 1
177- # create: true
Original file line number Diff line number Diff line change @@ -48,6 +48,41 @@ patches:
4848# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix.
4949# Uncomment the following replacements to add the cert-manager CA injection annotations
5050replacements :
51+ - source : # Uncomment the following block if you have any webhook
52+ kind : Service
53+ version : v1
54+ name : webhook-service
55+ fieldPath : .metadata.name # Name of the service
56+ targets :
57+ - select :
58+ kind : Certificate
59+ group : cert-manager.io
60+ version : v1
61+ fieldPaths :
62+ - .spec.dnsNames.0
63+ - .spec.dnsNames.1
64+ options :
65+ delimiter : ' .'
66+ index : 0
67+ create : true
68+ - source :
69+ kind : Service
70+ version : v1
71+ name : webhook-service
72+ fieldPath : .metadata.namespace # Namespace of the service
73+ targets :
74+ - select :
75+ kind : Certificate
76+ group : cert-manager.io
77+ version : v1
78+ fieldPaths :
79+ - .spec.dnsNames.0
80+ - .spec.dnsNames.1
81+ options :
82+ delimiter : ' .'
83+ index : 1
84+ create : true
85+
5186 - source : # Uncomment the following block if you have a ValidatingWebhook (--programmatic-validation)
5287 kind : Certificate
5388 group : cert-manager.io
@@ -140,38 +175,3 @@ replacements:
140175 delimiter : ' /'
141176 index : 1
142177 create : true
143-
144- - source : # Uncomment the following block if you enable cert-manager
145- kind : Service
146- version : v1
147- name : webhook-service
148- fieldPath : .metadata.name # Name of the service
149- targets :
150- - select :
151- kind : Certificate
152- group : cert-manager.io
153- version : v1
154- fieldPaths :
155- - .spec.dnsNames.0
156- - .spec.dnsNames.1
157- options :
158- delimiter : ' .'
159- index : 0
160- create : true
161- - source :
162- kind : Service
163- version : v1
164- name : webhook-service
165- fieldPath : .metadata.namespace # Namespace of the service
166- targets :
167- - select :
168- kind : Certificate
169- group : cert-manager.io
170- version : v1
171- fieldPaths :
172- - .spec.dnsNames.0
173- - .spec.dnsNames.1
174- options :
175- delimiter : ' .'
176- index : 1
177- create : true
Original file line number Diff line number Diff line change @@ -596,11 +596,6 @@ func (sp *Sample) updateKustomization() {
596596 certmanagerForWebhooks , `#` )
597597 hackutils .CheckError ("fixing default/kustomization" , err )
598598
599- err = pluginutil .UncommentCode (
600- filepath .Join (sp .ctx .Dir , "config/default/kustomization.yaml" ),
601- webhookServiceDefaultKustomize , `#` )
602- hackutils .CheckError ("fixing default/kustomization" , err )
603-
604599 err = pluginutil .UncommentCode (
605600 filepath .Join (sp .ctx .Dir , "config/crd/kustomization.yaml" ),
606601 `#- path: patches/cainjection_in_cronjobs.yaml` , `#` )
Original file line number Diff line number Diff line change @@ -34,6 +34,41 @@ const CronjobSample = `
3434 restartPolicy: OnFailure`
3535
3636const certmanagerForWebhooks = `#replacements:
37+ # - source: # Uncomment the following block if you have any webhook
38+ # kind: Service
39+ # version: v1
40+ # name: webhook-service
41+ # fieldPath: .metadata.name # Name of the service
42+ # targets:
43+ # - select:
44+ # kind: Certificate
45+ # group: cert-manager.io
46+ # version: v1
47+ # fieldPaths:
48+ # - .spec.dnsNames.0
49+ # - .spec.dnsNames.1
50+ # options:
51+ # delimiter: '.'
52+ # index: 0
53+ # create: true
54+ # - source:
55+ # kind: Service
56+ # version: v1
57+ # name: webhook-service
58+ # fieldPath: .metadata.namespace # Namespace of the service
59+ # targets:
60+ # - select:
61+ # kind: Certificate
62+ # group: cert-manager.io
63+ # version: v1
64+ # fieldPaths:
65+ # - .spec.dnsNames.0
66+ # - .spec.dnsNames.1
67+ # options:
68+ # delimiter: '.'
69+ # index: 1
70+ # create: true
71+ #
3772# - source: # Uncomment the following block if you have a ValidatingWebhook (--programmatic-validation)
3873# kind: Certificate
3974# group: cert-manager.io
@@ -94,40 +129,4 @@ const certmanagerForWebhooks = `#replacements:
94129# options:
95130# delimiter: '/'
96131# index: 1
97- # create: true
98- #`
99-
100- const webhookServiceDefaultKustomize = `# - source: # Uncomment the following block if you enable cert-manager
101- # kind: Service
102- # version: v1
103- # name: webhook-service
104- # fieldPath: .metadata.name # Name of the service
105- # targets:
106- # - select:
107- # kind: Certificate
108- # group: cert-manager.io
109- # version: v1
110- # fieldPaths:
111- # - .spec.dnsNames.0
112- # - .spec.dnsNames.1
113- # options:
114- # delimiter: '.'
115- # index: 0
116- # create: true
117- # - source:
118- # kind: Service
119- # version: v1
120- # name: webhook-service
121- # fieldPath: .metadata.namespace # Namespace of the service
122- # targets:
123- # - select:
124- # kind: Certificate
125- # group: cert-manager.io
126- # version: v1
127- # fieldPaths:
128- # - .spec.dnsNames.0
129- # - .spec.dnsNames.1
130- # options:
131- # delimiter: '.'
132- # index: 1
133132# create: true`
Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ limitations under the License.
1616
1717package multiversion
1818
19- const caConversionCRDDefaultKustomize = `# - source: # Uncomment the following block if you have a ConversionWebhook (--conversion)
19+ const caConversionCRDDefaultKustomize = `#
20+ # - source: # Uncomment the following block if you have a ConversionWebhook (--conversion)
2021# kind: Certificate
2122# group: cert-manager.io
2223# version: v1
@@ -45,5 +46,4 @@ const caConversionCRDDefaultKustomize = `# - source: # Uncomment the following b
4546# options:
4647# delimiter: '/'
4748# index: 1
48- # create: true
49- #`
49+ # create: true`
You can’t perform that action at this time.
0 commit comments