Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/clustergroup/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A Helm chart to create per-clustergroup ArgoCD applications and any
keywords:
- pattern
name: pattern-clustergroup
version: 0.0.2
version: 0.0.3
maintainers:
- email: michele@redhat.com
name: michele
Expand Down
33 changes: 19 additions & 14 deletions charts/clustergroup/templates/plumbing/applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,32 +141,39 @@ spec:
project: {{ .project }}

{{- if .sources }}
{{- $refcount := 0 }}
{{ $isChart := false }}
sources:
{{- range .sources }}
{{- range .sources }}
- repoURL: {{ coalesce .repoURL $.Values.global.repoURL }}
targetRevision: {{ coalesce .targetRevision $.Values.global.targetRevision }}
{{- if .chart }}
chart: {{ .chart }}
{{ $isChart = true }}
{{- else if .path }}
path: {{ .path }}
{{ $isChart = false }}
{{- else }}
ref: gitref
{{ $isChart = false }}
{{- end }}
{{- if and (not .kustomize) (.chart) }}
{{- if not (.chart) }}
ref: gitref{{$refcount}}
{{- end }}
{{- if and (not .kustomize) }}
helm:
ignoreMissingValueFiles: true
valueFiles:
- "$gitref/values-global.yaml"
- "$gitref/values-{{ $.Values.clusterGroup.name }}.yaml"
- "$gitref{{ $refcount }}/values-global.yaml"
- "$gitref{{ $refcount }}/values-{{ $.Values.clusterGroup.name }}.yaml"
{{- if $.Values.global.clusterPlatform }}
- "$gitref/values-{{ $.Values.global.clusterPlatform }}.yaml"
- "$gitref{{ $refcount }}/values-{{ $.Values.global.clusterPlatform }}.yaml"
{{- if $.Values.global.clusterVersion }}
- "$gitref/values-{{ $.Values.global.clusterPlatform }}-{{ $.Values.global.clusterVersion }}.yaml"
- "$gitref{{ $refcount }}/values-{{ $.Values.global.clusterPlatform }}-{{ $.Values.global.clusterVersion }}.yaml"
{{- end }}
- "$gitref/values-{{ $.Values.global.clusterPlatform }}-{{ $.Values.clusterGroup.name }}.yaml"
- "$gitref{{ $refcount }}/values-{{ $.Values.global.clusterPlatform }}-{{ $.Values.clusterGroup.name }}.yaml"
{{- end }}
{{- if $.Values.global.clusterVersion }}
- "$gitref/values-{{ $.Values.global.clusterVersion }}-{{ $.Values.clusterGroup.name }}.yaml"
- "$gitref{{ $refcount }}/values-{{ $.Values.global.clusterVersion }}-{{ $.Values.clusterGroup.name }}.yaml"
{{- end }}
{{- range $valueFile := .extraValueFiles }}
- {{ $valueFile | quote }}
Expand Down Expand Up @@ -234,13 +241,11 @@ spec:
{{- end }}{{- /* END RANGE */}}
{{- end }} {{- /* END FILEPARAMETERS */}}
{{- end }} {{- /* IF NOT PLUGIN-ELSE */}}




{{- if not ( $isChart ) }}
{{ $refcount = add1 $refcount }}
{{- end }}
{{- end }}
{{- else }}

source:
repoURL: {{ coalesce .repoURL $.Values.global.repoURL }}
targetRevision: {{ coalesce .targetRevision $.Values.global.targetRevision }}
Expand Down