Skip to content

Commit

Permalink
helm: don't quote container command args passed via *.extraArgs values (
Browse files Browse the repository at this point in the history
#10029)

* helm: don't quote args passed via extraArgs values

Signed-off-by: Vladimir Varankin <[email protected]>

* update CHANGELOG

Signed-off-by: Vladimir Varankin <[email protected]>

* add tests for extraArgs values

Signed-off-by: Vladimir Varankin <[email protected]>

* fixup! update CHANGELOG

---------

Signed-off-by: Vladimir Varankin <[email protected]>
  • Loading branch information
narqo authored Nov 28, 2024
1 parent b941204 commit b1ae3b9
Show file tree
Hide file tree
Showing 85 changed files with 4,131 additions and 23 deletions.
3 changes: 2 additions & 1 deletion operations/helm/charts/mimir-distributed/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ Entries should include a reference to the Pull Request that introduced the chang

## main / unreleased

* [BUGFIX] Update `serviceAccountName` in the `alertmanager-statefulset` template. #10016
* [CHANGE] Update rollout-operator version to 0.20.0. #9995
* [CHANGE] Remove the `track_sizes` feature for Memcached pods since it is unused. #10032
* [FEATURE] Add support for GEM's federation-frontend. See the `federation_frontend` section in the values file. #9673
* [ENHANCEMENT] Add support for setting type and internal traffic policy for Kubernetes service. Set `internalTrafficPolicy=Cluster` by default in all services with type `ClusterIP`. #9619
* [ENHANCEMENT] Add the possibility to create a dedicated serviceAccount for the `alertmanager` component by setting `alertmanager.serviceAcount.create` to true in the values. #9781
* [ENHANCEMENT] helm: add `enabled` field for admin-api, compactor, distributor, gateway, ingester, querier, query-frontend and store-gateway components. This helps when deploying the GEM federation-frontend on its own. #9734
* [BUGFIX] Do not quote container command args passed via *.extraArgs values. #10029
* [BUGFIX] Update `serviceAccountName` in the `alertmanager-statefulset` template. #10016
* [BUGFIX] Fix PVC template in AlertManager to not show diff in ArgoCD. #9774
* [BUGFIX] Fix how `fullnameOverride` is reflected in generated manifests. #9564
* [BUGFIX] Fix `extraObjects` linting with helm lint by padding with an extra new line. #9863
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Pin kube version so results are the same for running in CI and locally where the installed kube version may be different.
kubeVersionOverride: "1.20"

test_extra_args: &test_extra_args
extraArgs:
flag-empty: null
flag-string: hello
flag-bool: false
flag-float: 1.23
flag-json1: "{\"foo\":\"bar\"}"
flag-json2: '{"foo":"bar"}'
flag-number: 0

admin_api:
<<: *test_extra_args

alertmanager:
<<: *test_extra_args

compactor:
<<: *test_extra_args

continuous_test:
<<: *test_extra_args

distributor:
<<: *test_extra_args

gateway:
<<: *test_extra_args

overrides_exporter:
<<: *test_extra_args

query_frontend:
<<: *test_extra_args

query_scheduler:
<<: *test_extra_args

ruler:
<<: *test_extra_args

ruler_querier:
<<: *test_extra_args

ruler_query_scheduler:
<<: *test_extra_args

smoke_test:
<<: *test_extra_args

store_gateway:
<<: *test_extra_args
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
- "-config.expand-env=true"
- "-config.file=/etc/mimir/mimir.yaml"
{{- range $key, $value := .Values.admin_api.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.admin_api.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
- "-config.expand-env=true"
- "-config.file=/etc/mimir/mimir.yaml"
{{- range $key, $value := .Values.alertmanager.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.alertmanager.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ spec:
# needs to be higher to avoid connections being closed abruptly.
- "-server.http-idle-timeout=6m"
{{- range $key, $value := .Values.alertmanager.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.alertmanager.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ spec:
- "-config.expand-env=true"
- "-config.file=/etc/mimir/mimir.yaml"
{{- range $key, $value := .Values.compactor.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.compactor.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ spec:
- "-tests.bearer-token={{ .Values.continuous_test.auth.bearerToken }}"
{{- end }}
{{- range $key, $value := .Values.continuous_test.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
- name: config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
{{- end }}
{{- end }}
{{- range $key, $value := .Values.distributor.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.distributor.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
- "-config.expand-env=true"
- "-config.file=/etc/mimir/mimir.yaml"
{{- range $key, $value := .Values.federation_frontend.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.federation_frontend.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
- "-config.expand-env=true"
- "-config.file=/etc/mimir/mimir.yaml"
{{- range $key, $value := .extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- with .extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
- -target=graphite-querier
- -config.file=/etc/mimir/mimir.yaml
{{- range $key, $value := .Values.graphite.querier.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.graphite.querier.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
- -target=graphite-write-proxy
- -config.file=/etc/mimir/mimir.yaml
{{- range $key, $value := .Values.graphite.write_proxy.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.graphite.write_proxy.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ spec:
- "-server.grpc-max-concurrent-streams=500"
{{- end }}
{{- range $key, $value := .Values.ingester.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.ingester.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
- "-config.expand-env=true"
- "-config.file=/etc/mimir/mimir.yaml"
{{- range $key, $value := .Values.overrides_exporter.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.overrides_exporter.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
{{- end }}
{{- end }}
{{- range $key, $value := .Values.querier.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.querier.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ spec:
- "-server.grpc.keepalive.max-connection-age=30s"
- "-shutdown-delay=90s"
{{- range $key, $value := .Values.query_frontend.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.query_frontend.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
- "-config.expand-env=true"
- "-config.file=/etc/mimir/mimir.yaml"
{{- range $key, $value := .Values.query_scheduler.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.query_scheduler.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ spec:
{{- end }}
{{- end }}
{{- range $key, $value := .Values.ruler_querier.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.ruler_querier.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spec:
- "-server.grpc.keepalive.max-connection-age=30s"
- "-shutdown-delay=90s"
{{- range $key, $value := .Values.ruler_query_frontend.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.ruler_query_frontend.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
- "-config.expand-env=true"
- "-config.file=/etc/mimir/mimir.yaml"
{{- range $key, $value := .Values.ruler_query_scheduler.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.ruler_query_scheduler.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ spec:
{{- end }}
{{- end }}
{{- range $key, $value := .Values.ruler.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.ruler.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
- "-tests.write-read-series-test.max-query-age=48h"
- "-server.http-listen-port={{ include "mimir.serverHttpListenPort" . }}"
{{- range $key, $value := .Values.smoke_test.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.smoke_test.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ spec:
{{- end }}
{{- end }}
{{- range $key, $value := .Values.store_gateway.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.store_gateway.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
- "-config.expand-env=true"
- "-config.file=/etc/mimir/mimir.yaml"
{{- range $key, $value := .Values.tokengenJob.extraArgs }}
- "-{{ $key }}={{ $value }}"
- -{{ $key }}={{ $value }}
{{- end }}
volumeMounts:
{{- if .Values.tokengenJob.extraVolumeMounts }}
Expand Down
Loading

0 comments on commit b1ae3b9

Please sign in to comment.