Skip to content

Commit

Permalink
fix(kube-state-metrics): render extraArgs as YAML to allow multi-line…
Browse files Browse the repository at this point in the history
… strings in arguments (#2167)

The newly introduced `--custom-resource-state-config` argument
(kubernetes/kube-state-metrics#1710) accepts a multi-line string as value.
The deployment.yaml template currently loops over each .Values.extraArgs, which causes indentation
issues when passing a multi-line string. This PR fixes that by rendering .Values.extraArgs as YAML
with proper indentation.

Signed-off-by: Mitch Hulscher <[email protected]>
  • Loading branch information
mhulscher authored Jun 17, 2022
1 parent 2617a81 commit b8c5c82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kube-state-metrics/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords:
- prometheus
- kubernetes
type: application
version: 4.9.1
version: 4.9.2
appVersion: 2.5.0
home: https://github.com/kubernetes/kube-state-metrics/
sources:
Expand Down
4 changes: 1 addition & 3 deletions kube-state-metrics/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ spec:
{{- end }}
args:
{{- if .Values.extraArgs }}
{{- range .Values.extraArgs }}
- {{ . }}
{{- end }}
{{- .Values.extraArgs | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.service.port }}
- --port={{ .Values.service.port | default 8080}}
Expand Down

0 comments on commit b8c5c82

Please sign in to comment.