Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extraValueFiles to operator-install chart #342

Merged
merged 3 commits into from
Aug 16, 2023
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
5 changes: 5 additions & 0 deletions acm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@ Default always defined valueFiles to be included when pushing the cluster wide a
# We cannot use $.Values.global.clusterVersion because that gets resolved to the
# hub's cluster version, whereas we want to include the spoke cluster version
- '/values-{{ `{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}` }}-{{ .name }}.yaml'
{{- if $.Values.global.extraValueFiles }}
{{- range $.Values.global.extraValueFiles }}
- {{ . | quote }}
{{- end }} {{/* range $.Values.global.extraValueFiles */}}
{{- end }} {{/* if $.Values.global.extraValueFiles */}}
{{- end }} {{- /*acm.app.policies.valuefiles */}}
4 changes: 4 additions & 0 deletions clustergroup/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@ Default always defined valueFiles to be included in Applications
{{- if $.Values.global.clusterVersion }}
- "/values-{{ $.Values.global.clusterVersion }}-{{ $.Values.clusterGroup.name }}.yaml"
{{- end }}
{{- if $.Values.global.extraValueFiles }}
{{- range $.Values.global.extraValueFiles }}
- {{ . | quote }}
{{- end }} {{/* range $.Values.global.extraValueFiles */}}
{{- end }} {{/* clustergroup.app.globalvalues.valuefiles */}}
3 changes: 2 additions & 1 deletion clustergroup/templates/plumbing/applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{{- $namespace = "openshift-gitops" }}
{{- end }}
{{- range .Values.clusterGroup.applications }}
{{- if or (.generators) (.generatorFile) (.useGeneratorValues) (.destinationServer) (.destinationNamespace) }}
{{- if eq nil . }} {{- /* This allows us to null out an Application entry by specifying null instead of the normal dictionary */ }}
{{- else if or (.generators) (.generatorFile) (.useGeneratorValues) (.destinationServer) (.destinationNamespace) }}
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
Expand Down
4 changes: 4 additions & 0 deletions clustergroup/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@
}
}
},
"extraValueFiles": {
"type": "array",
"description": "List of extra values files that will be passed to ArgoCD"
},
"gitops": {
"type": "object",
"additionalProperties": false,
Expand Down
6 changes: 6 additions & 0 deletions operator-install/templates/pattern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ spec:
value: {{ .value }}
{{- end }}
{{- end }}
{{- if .Values.main.extraValueFiles }}
extraValueFiles:
{{- range .Values.main.extraValueFiles }}
- {{ . | quote }}
{{- end }}
{{- end }}
Loading