Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.

Commit e4d7039

Browse files
committed
Added logic for refcount
1 parent ef83a7f commit e4d7039

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

charts/clustergroup/templates/plumbing/applications.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,19 @@ spec:
142142

143143
{{- if .sources }}
144144
{{- $refcount := 0 }}
145+
{{ $isChart := false }}
145146
sources:
146147
{{- range .sources }}
147148
- repoURL: {{ coalesce .repoURL $.Values.global.repoURL }}
148149
targetRevision: {{ coalesce .targetRevision $.Values.global.targetRevision }}
149150
{{- if .chart }}
150151
chart: {{ .chart }}
152+
{{ $isChart = true }}
151153
{{- else if .path }}
152154
path: {{ .path }}
155+
{{ $isChart = false }}
153156
{{- else }}
157+
{{ $isChart = false }}
154158
{{- end }}
155159
{{- if not (.chart) }}
156160
ref: gitref{{$refcount}}
@@ -237,7 +241,9 @@ spec:
237241
{{- end }}{{- /* END RANGE */}}
238242
{{- end }} {{- /* END FILEPARAMETERS */}}
239243
{{- end }} {{- /* IF NOT PLUGIN-ELSE */}}
244+
{{- if not ( $isChart ) }}
240245
{{ $refcount = add1 $refcount }}
246+
{{- end }}
241247
{{- end }}
242248
{{- else }}
243249
source:

0 commit comments

Comments
 (0)