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 82
82
sed -i '25s/^#//' $KUSTOMIZATION_FILE_PATH
83
83
# Uncomment only ValidatingWebhookConfiguration
84
84
# 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
87
87
cd testdata/project-v4-with-plugins/
88
88
go mod tidy
89
89
Original file line number Diff line number Diff line change @@ -48,6 +48,41 @@ patches:
48
48
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix.
49
49
# Uncomment the following replacements to add the cert-manager CA injection annotations
50
50
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
+
51
86
- source : # Uncomment the following block if you have a ValidatingWebhook (--programmatic-validation)
52
87
kind : Certificate
53
88
group : cert-manager.io
@@ -109,7 +144,7 @@ replacements:
109
144
delimiter : ' /'
110
145
index : 1
111
146
create : true
112
-
147
+ #
113
148
# - source: # Uncomment the following block if you have a ConversionWebhook (--conversion)
114
149
# kind: Certificate
115
150
# group: cert-manager.io
@@ -140,38 +175,3 @@ replacements:
140
175
# delimiter: '/'
141
176
# index: 1
142
177
# 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:
48
48
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix.
49
49
# Uncomment the following replacements to add the cert-manager CA injection annotations
50
50
# 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
+ #
51
86
# - source: # Uncomment the following block if you have a ValidatingWebhook (--programmatic-validation)
52
87
# kind: Certificate
53
88
# group: cert-manager.io
@@ -140,38 +175,3 @@ patches:
140
175
# delimiter: '/'
141
176
# index: 1
142
177
# 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:
48
48
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix.
49
49
# Uncomment the following replacements to add the cert-manager CA injection annotations
50
50
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
+
51
86
- source : # Uncomment the following block if you have a ValidatingWebhook (--programmatic-validation)
52
87
kind : Certificate
53
88
group : cert-manager.io
@@ -140,38 +175,3 @@ replacements:
140
175
delimiter : ' /'
141
176
index : 1
142
177
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() {
596
596
certmanagerForWebhooks , `#` )
597
597
hackutils .CheckError ("fixing default/kustomization" , err )
598
598
599
- err = pluginutil .UncommentCode (
600
- filepath .Join (sp .ctx .Dir , "config/default/kustomization.yaml" ),
601
- webhookServiceDefaultKustomize , `#` )
602
- hackutils .CheckError ("fixing default/kustomization" , err )
603
-
604
599
err = pluginutil .UncommentCode (
605
600
filepath .Join (sp .ctx .Dir , "config/crd/kustomization.yaml" ),
606
601
`#- path: patches/cainjection_in_cronjobs.yaml` , `#` )
Original file line number Diff line number Diff line change @@ -34,6 +34,41 @@ const CronjobSample = `
34
34
restartPolicy: OnFailure`
35
35
36
36
const 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
+ #
37
72
# - source: # Uncomment the following block if you have a ValidatingWebhook (--programmatic-validation)
38
73
# kind: Certificate
39
74
# group: cert-manager.io
@@ -94,40 +129,4 @@ const certmanagerForWebhooks = `#replacements:
94
129
# options:
95
130
# delimiter: '/'
96
131
# 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
133
132
# create: true`
Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ limitations under the License.
16
16
17
17
package multiversion
18
18
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)
20
21
# kind: Certificate
21
22
# group: cert-manager.io
22
23
# version: v1
@@ -45,5 +46,4 @@ const caConversionCRDDefaultKustomize = `# - source: # Uncomment the following b
45
46
# options:
46
47
# delimiter: '/'
47
48
# index: 1
48
- # create: true
49
- #`
49
+ # create: true`
You can’t perform that action at this time.
0 commit comments