Skip to content

Commit ae12274

Browse files
committed
Fix for multiple OperatorGroup rendering
- Fixed issue with rendering multiple OperatorGroup. Added the beginning (---) to signal document start. - Updated the applications.yaml to include beginning (---) to signal document start.
1 parent 0283fc2 commit ae12274

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

clustergroup/templates/_helpers.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ spec:
196196
{{- range $k, $v := $ns }}{{- /* We loop here even though the map has always just one key */}}
197197
{{- if $v }}
198198
{{- if or $v.operatorGroup (not (hasKey $v "operatorGroup")) }}{{- /* Checks if the user sets operatorGroup: false */}}
199+
---
199200
apiVersion: operators.coreos.com/v1
200201
kind: OperatorGroup
201202
metadata:
@@ -212,6 +213,7 @@ spec:
212213
{{- end }}{{- /* End of if hasKey $v "targetNamespaces" */}}
213214
{{- end }}{{- /* End if $v.operatorGroup */}}
214215
{{- else }}{{- /* else if $v == nil */}}
216+
---
215217
apiVersion: operators.coreos.com/v1
216218
kind: OperatorGroup
217219
metadata:

clustergroup/templates/core/operatorgroup.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
{{- if kindIs "map" $ns }}
1616
{{- range $k, $v := $ns }}{{- /* We loop here even though the map has always just one key */}}
1717
{{- if $v.operatorGroup }}{{- /* Checks if the user sets operatorGroup: false */}}
18+
---
1819
apiVersion: operators.coreos.com/v1
1920
kind: OperatorGroup
2021
metadata:
@@ -32,6 +33,7 @@ spec:
3233
{{- end }}{{- /* range $k, $v := $ns */}}
3334
{{- end }}{{- /* End of if operatorGroup */}}
3435
{{- else if kindIs "string" $ns }}
36+
---
3537
apiVersion: operators.coreos.com/v1
3638
kind: OperatorGroup
3739
metadata:

clustergroup/templates/plumbing/applications.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ spec:
4040
limit: {{ default 20 $.Values.global.options.applicationRetryLimit }}
4141
{{- end }}
4242
{{- if .ignoreDifferences }}
43-
ignoreDifferences: {{ .ignoreDifferences | toPrettyJson }}
43+
ignoreDifferences: {{ .ignoreDifferences | toPrettyJson | nindent 2 }}
4444
{{- end }}
4545
source:
4646
repoURL: {{ coalesce .repoURL $.Values.global.repoURL }}
@@ -119,6 +119,7 @@ spec:
119119
server: {{ coalesce .destinationServer "https://kubernetes.default.svc" }}
120120
namespace: {{ coalesce .destinationNamespace .namespace $namespace }}
121121
{{- else }}
122+
---
122123
apiVersion: argoproj.io/v1alpha1
123124
kind: Application
124125
metadata:
@@ -280,7 +281,6 @@ spec:
280281
retry:
281282
limit: {{ default 20 $.Values.global.applicationRetryLimit }}
282283
{{- end }}{{- /* .syncPolicy */}}
283-
---
284284
{{- end }}{{- /* if or (.generators) (.generatorFile) (.useGeneratorValues) (.destinationServer) (.destinationNamespace) */}}
285285
{{- end }}{{- /* range .Values.clusterGroup.applications */}}
286286
{{- end }}{{- /* if not (eq .Values.enabled "core") */}}

0 commit comments

Comments
 (0)