@@ -105,13 +105,13 @@ func TestReconciliation(t *testing.T) {
105
105
{
106
106
Content : runtime.RawExtension {
107
107
Raw : mustMarshalJSON (t , makeTestKustomization (nsn ("unused" , "unused" ), func (ks * kustomizev1.Kustomization ) {
108
- ks .Name = "{{. cluster}}-demo"
108
+ ks .Name = "{{ .element. cluster }}-demo"
109
109
ks .Annotations = map [string ]string {
110
- "testing.cluster" : "{{. cluster}}" ,
110
+ "testing.cluster" : "{{ .element. cluster }}" ,
111
111
"testing" : "newVersion" ,
112
112
}
113
- ks .Spec .Path = "./templated/clusters/{{ .cluster }}/"
114
- ks .Spec .KubeConfig = & meta.KubeConfigReference {SecretRef : meta.SecretKeyReference {Name : "{{ .cluster }}" }}
113
+ ks .Spec .Path = "./templated/clusters/{{ .element. cluster }}/"
114
+ ks .Spec .KubeConfig = & meta.KubeConfigReference {SecretRef : meta.SecretKeyReference {Name : "{{ .element. cluster }}" }}
115
115
ks .Spec .Force = true
116
116
})),
117
117
},
@@ -195,13 +195,13 @@ func TestReconciliation(t *testing.T) {
195
195
{
196
196
Content : runtime.RawExtension {
197
197
Raw : mustMarshalJSON (t , makeTestKustomization (nsn ("unused" , "unused" ), func (ks * kustomizev1.Kustomization ) {
198
- ks .Name = "{{. cluster}}-demo"
198
+ ks .Name = "{{ .element. cluster }}-demo"
199
199
ks .Annotations = map [string ]string {
200
- "testing.cluster" : "{{. cluster}}" ,
200
+ "testing.cluster" : "{{ .element. cluster }}" ,
201
201
"testing" : "newVersion" ,
202
202
}
203
- ks .Spec .Path = "./templated/clusters/{{ .cluster }}/"
204
- ks .Spec .KubeConfig = & meta.KubeConfigReference {SecretRef : meta.SecretKeyReference {Name : "{{ .cluster }}" }}
203
+ ks .Spec .Path = "./templated/clusters/{{ .element. cluster }}/"
204
+ ks .Spec .KubeConfig = & meta.KubeConfigReference {SecretRef : meta.SecretKeyReference {Name : "{{ .element. cluster }}" }}
205
205
ks .Spec .Force = true
206
206
})),
207
207
},
@@ -367,18 +367,18 @@ func makeTestGitOpsSet(t *testing.T, opts ...func(*templatesv1.GitOpsSet)) *temp
367
367
Templates : []templatesv1.GitOpsSetTemplate {
368
368
{
369
369
Content : runtime.RawExtension {
370
- Raw : mustMarshalJSON (t , makeTestKustomization (nsn ("default" , "{{. cluster}}-demo" ), func (k * kustomizev1.Kustomization ) {
370
+ Raw : mustMarshalJSON (t , makeTestKustomization (nsn ("default" , "{{ .element. cluster }}-demo" ), func (k * kustomizev1.Kustomization ) {
371
371
k .Spec = kustomizev1.KustomizationSpec {
372
372
Interval : metav1.Duration {Duration : 5 * time .Minute },
373
- Path : "./clusters/{{. cluster}}/" ,
373
+ Path : "./clusters/{{ .element. cluster }}/" ,
374
374
Prune : true ,
375
375
SourceRef : kustomizev1.CrossNamespaceSourceReference {
376
376
Kind : "GitRepository" ,
377
377
Name : "demo-repo" ,
378
378
},
379
379
KubeConfig : & meta.KubeConfigReference {
380
380
SecretRef : meta.SecretKeyReference {
381
- Name : "{{. cluster}}" ,
381
+ Name : "{{ .element. cluster }}" ,
382
382
},
383
383
},
384
384
}
0 commit comments