Skip to content

Commit

Permalink
chore(common): formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cwrau committed Oct 31, 2024
1 parent bdabbd8 commit 5e9a302
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
34 changes: 19 additions & 15 deletions charts/common/templates/_helm.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,28 @@ Returns a HelmRelease.spec.chart.spec for a given chart in a given repository.
{{- $spec := dict -}}
{{- if eq (dig .repo "type" "helm" .Values.global.helmRepositories) "helm" -}}
{{- $spec = mustMerge (dict
"chart" .chart
"sourceRef" (dict
"kind" "HelmRepository"
"name" (eq .prependReleaseName true | ternary (printf "%s-%s" .Release.Name .repo) .repo)
"namespace" .Release.Namespace)
"version" (include "common.helm.chartVersion" (dict "repo" .repo "chart" .chart "context" .context))
) $spec
"chart" .chart
"sourceRef" (dict
"kind" "HelmRepository"
"name" (eq .prependReleaseName true | ternary (printf "%s-%s" .Release.Name .repo) .repo)
"namespace" .Release.Namespace
)
"version" (include "common.helm.chartVersion" (dict "repo" .repo "chart" .chart "context" .context))
)
$spec
-}}
{{- else -}}
{{- $spec = mustMerge (dict
"chart" (dig .repo "charts" .chart "path" (printf "charts/%s" .chart) .Values.global.helmRepositories)
"sourceRef" (dict
"kind" "GitRepository"
"name" (eq .prependReleaseName true | ternary (printf "%s-%s-%s" .Release.Name .repo .chart) (printf "%s-%s" .repo .chart))
"namespace" .Release.Namespace)
"reconcileStrategy" (.reconcileStrategy | default "Revision")
) $spec
"chart" (dig .repo "charts" .chart "path" (printf "charts/%s" .chart) .Values.global.helmRepositories)
"sourceRef" (dict
"kind" "GitRepository"
"name" (eq .prependReleaseName true | ternary (printf "%s-%s-%s" .Release.Name .repo .chart) (printf "%s-%s" .repo .chart))
"namespace" .Release.Namespace
)
"reconcileStrategy" (.reconcileStrategy | default "Revision")
)
$spec
-}}
{{- end -}}
{{- $spec | toYaml -}}
{{- toYaml $spec -}}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/common/templates/_telemetry.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@
{{- range $key, $value := $env -}}
{{- $podEnv = append $podEnv (dict "name" $key "value" ($value | toString)) -}}
{{- end -}}
{{- $podEnv | toYaml -}}
{{- toYaml $podEnv -}}
{{- end -}}
{{- end -}}

0 comments on commit 5e9a302

Please sign in to comment.