Skip to content

Commit cddf6b4

Browse files
authored
Merge pull request #2794 from laxmikantbpandhare/remove-var-ref
✨ (kustomize/v2-alpha): remove unnecessary varReference for setup cert-manager
2 parents 2f09054 + 1f71b45 commit cddf6b4

File tree

4 files changed

+4
-26
lines changed

4 files changed

+4
-26
lines changed

pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/certmanager/kustomizeconfig.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,12 @@ func (f *KustomizeConfig) SetTemplateDefaults() error {
4444
}
4545

4646
//nolint:lll
47-
const kustomizeConfigTemplate = `# This configuration is for teaching kustomize how to update name ref and var substitution
47+
const kustomizeConfigTemplate = `# This configuration is for teaching kustomize how to update name ref substitution
4848
nameReference:
4949
- kind: Issuer
5050
group: cert-manager.io
5151
fieldSpecs:
5252
- kind: Certificate
5353
group: cert-manager.io
5454
path: spec/issuerRef/name
55-
56-
varReference:
57-
- kind: Certificate
58-
group: cert-manager.io
59-
path: spec/commonName
60-
- kind: Certificate
61-
group: cert-manager.io
62-
path: spec/dnsNames
6355
`

pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/webhook/kustomizeconfig.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (f *KustomizeConfig) SetTemplateDefaults() error {
4444
}
4545

4646
//nolint:lll
47-
const kustomizeConfigWebhookTemplate = `# the following config is for teaching kustomize where to look at when substituting vars.
47+
const kustomizeConfigWebhookTemplate = `# the following config is for teaching kustomize where to look at when substituting nameReference.
4848
# It requires kustomize v2.1.0 or newer to work properly.
4949
nameReference:
5050
- kind: Service
@@ -66,7 +66,4 @@ namespace:
6666
group: admissionregistration.k8s.io
6767
path: webhooks/clientConfig/service/namespace
6868
create: true
69-
70-
varReference:
71-
- path: metadata/annotations
7269
`
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
1-
# This configuration is for teaching kustomize how to update name ref and var substitution
1+
# This configuration is for teaching kustomize how to update name ref substitution
22
nameReference:
33
- kind: Issuer
44
group: cert-manager.io
55
fieldSpecs:
66
- kind: Certificate
77
group: cert-manager.io
88
path: spec/issuerRef/name
9-
10-
varReference:
11-
- kind: Certificate
12-
group: cert-manager.io
13-
path: spec/commonName
14-
- kind: Certificate
15-
group: cert-manager.io
16-
path: spec/dnsNames

testdata/project-v3-with-kustomize-v2/config/webhook/kustomizeconfig.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# the following config is for teaching kustomize where to look at when substituting vars.
1+
# the following config is for teaching kustomize where to look at when substituting nameReference.
22
# It requires kustomize v2.1.0 or newer to work properly.
33
nameReference:
44
- kind: Service
@@ -20,6 +20,3 @@ namespace:
2020
group: admissionregistration.k8s.io
2121
path: webhooks/clientConfig/service/namespace
2222
create: true
23-
24-
varReference:
25-
- path: metadata/annotations

0 commit comments

Comments
 (0)