Skip to content

Commit

Permalink
[Backport 2.6] Quote yugabyte gflag overrides
Browse files Browse the repository at this point in the history
Summary:
In order to maintain compatibility with previous chart behavior, it's
necessary to quote gflag overrides in order to prevent breakages due to
multi-word gflag values.

This issue was introduced in 4e560f0

Test Plan:
Run template containing multi-word gflag value without this change:
$ helm install yugabyte ./ --set gflags.master.test1234="asdf asdf" --dry-run --debug
...
              --test1234=asdf asdf \
...

Run template contianing multi-word gflag value with this change:
$ helm install yugabyte ./ --set gflags.master.test1234="asdf asdf" --dry-run --debug
...
              --test1234="asdf asdf" \
...
Verify that the argument value is properly quoted.

Reviewers: sanketh

Reviewed By: sanketh

Subscribers: yugaware

Differential Revision: https://phabricator.dev.yugabyte.com/D12064
  • Loading branch information
jvigil-yugabyte committed Jun 24, 2021
1 parent bfadd37 commit 92a7e35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stable/yugabyte/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ spec:
--num_cpus={{ ceil $root.Values.resource.master.requests.cpu }} \
--undefok=num_cpus,enable_ysql \
{{- range $flag, $override := $root.Values.gflags.master }}
--{{ $flag }}={{ $override }} \
--{{ $flag }}={{ quote $override }} \
{{- end }}
{{- if $root.Values.tls.enabled }}
--certs_dir=/opt/certs/yugabyte \
Expand Down Expand Up @@ -346,7 +346,7 @@ spec:
--use_cassandra_authentication=true \
{{- end }}
{{- range $flag, $override := $root.Values.gflags.tserver }}
--{{ $flag }}={{ $override }} \
--{{ $flag }}={{ quote $override }} \
{{- end }}
{{- if $root.Values.tls.enabled }}
--certs_dir=/opt/certs/yugabyte \
Expand Down

0 comments on commit 92a7e35

Please sign in to comment.