From 92a7e354be3209f693724da6ebb3ecf60cceff14 Mon Sep 17 00:00:00 2001 From: Jason Vigil Date: Wed, 23 Jun 2021 14:03:11 -0600 Subject: [PATCH] [Backport 2.6] Quote yugabyte gflag overrides 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 https://github.com/yugabyte/charts/commit/4e560f0969620ae97d79ef493311078dd5e62804 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 --- stable/yugabyte/templates/service.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stable/yugabyte/templates/service.yaml b/stable/yugabyte/templates/service.yaml index c898b08e8f..3fb183d0a9 100644 --- a/stable/yugabyte/templates/service.yaml +++ b/stable/yugabyte/templates/service.yaml @@ -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 \ @@ -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 \