Skip to content

Commit

Permalink
chore(common): improve developer experience by providing tab-completi…
Browse files Browse the repository at this point in the history
…on (#1004)
  • Loading branch information
cwrau authored Jul 1, 2024
1 parent 67552e7 commit 4785b0f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions charts/common/templates/_helm.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Returns the chart version for a given chart in a given repository.
{{ include "common.helm.chartVersion" (dict "context" $ "repo" "bitnami" "chart" "redis") -}}
*/}}
{{- define "common.helm.chartVersion" -}}
{{- $_ := set . "Values" .context.Values -}}
{{- $_ := mustMerge . (pick .context "Values") -}}
{{- dig .repo "charts" .chart nil .Values.global.helmRepositories | required (printf "The repo '%s' is either missing or doesn't contain the chart '%s'" .repo .chart) -}}
{{- end -}}

Expand All @@ -20,8 +20,7 @@ Returns a HelmRelease.spec.chart.spec for a given chart in a given repository.
{{ include "common.helm.chartSpec" (dict "context" $ "repo" "bitnami" "chart" "redis" "prependReleaseName" true) -}}
*/}}
{{- define "common.helm.chartSpec" -}}
{{- $_ := set . "Release" .context.Release -}}
{{- $_ = set . "Values" .context.Values -}}
{{- $_ := mustMerge . (pick .context "Values" "Release") -}}
{{- $spec := dict -}}
{{- if eq (dig .repo "type" "helm" .Values.global.helmRepositories) "helm" -}}
{{- $spec = mustMerge (dict
Expand Down

0 comments on commit 4785b0f

Please sign in to comment.