Skip to content

Commit

Permalink
Simple but useful template that can be used JUST to make values templ…
Browse files Browse the repository at this point in the history
…ates.

Example syntax: `helm template charts/valueGenerator --set-file "proxy=helmValues/localTesting/captureProxy.yaml"  --set-file "source=helmValues/localTesting/sourceElasticsearchCluster.yaml" --set-file "target=helmValues/localTesting/targetOpenSearchCluster.yaml"   | grep -v "^---$" | helm install mcc charts/aggregates/mockCustomerClusters -f - --dry-run`

Signed-off-by: Greg Schohn <[email protected]>
  • Loading branch information
gregschohn committed Oct 31, 2024
1 parent 0b89305 commit 763de17
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deployment/k8s/charts/valueGenerator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v2
description: "This chart deploys nothing and is only meant to be used to consume fragments of yaml and root them into an aggregated file"
name: valueGenerator
version: 0.1.0
11 changes: 11 additions & 0 deletions deployment/k8s/charts/valueGenerator/templates/values.yaml.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- define "values" -}}
{{- range $key, $value := .Values }}
{{ $key }}:
{{- if kindIs "string" $value }}
{{- $value | fromYaml | toYaml | nindent 2 }}
{{- else }}
{{- $value | toYaml | nindent 2 }}
{{- end }}
{{- end }}
{{- end -}}
{{ include "values" . }}

0 comments on commit 763de17

Please sign in to comment.