From fbdb2215802c657967670568aea0f5e3e308ca4b Mon Sep 17 00:00:00 2001 From: Lauren Barker Date: Tue, 15 Feb 2022 15:32:41 -0800 Subject: [PATCH 1/2] Add bizible settings This adds bizible settings added with https://gitlab.com/gitlab-org/gitlab/-/merge_requests/76589 Changelog: added --- charts/gitlab/charts/webservice/values.yaml | 1 + charts/gitlab/templates/_gitlab.yaml.tpl | 3 ++ doc/charts/globals.md | 2 + spec/configuration/gitlab-yml-erb_spec.rb | 54 +++++++++++++++++++++ values.yaml | 1 + 5 files changed, 61 insertions(+) diff --git a/charts/gitlab/charts/webservice/values.yaml b/charts/gitlab/charts/webservice/values.yaml index fc8e93e78d..b1afcaa8e7 100644 --- a/charts/gitlab/charts/webservice/values.yaml +++ b/charts/gitlab/charts/webservice/values.yaml @@ -329,6 +329,7 @@ extra: {} # matomo_disable_cookies: false # one_trust_id: '_your_one_trust_id' # google_tag_manager_nonce_id: '_your_google_tag_manager_id' + # bizible: true rack_attack: git_basic_auth: enabled: false diff --git a/charts/gitlab/templates/_gitlab.yaml.tpl b/charts/gitlab/templates/_gitlab.yaml.tpl index a8133dc0ea..c9bde27f2c 100644 --- a/charts/gitlab/templates/_gitlab.yaml.tpl +++ b/charts/gitlab/templates/_gitlab.yaml.tpl @@ -78,6 +78,9 @@ extra: {{ if .extra.googleTagManagerNonceId }} google_tag_manager_nonce_id: {{ .extra.googleTagManagerNonceId | quote }} {{- end }} + {{ if .extra.bizible }} + bizible: {{ eq true .extra.bizible }} + {{- end }} {{- end -}} {{- define "gitlab.appConfig.rackAttack" -}} diff --git a/doc/charts/globals.md b/doc/charts/globals.md index 0be5111917..a26284397b 100644 --- a/doc/charts/globals.md +++ b/doc/charts/globals.md @@ -825,6 +825,7 @@ global: matomoDisableCookies: oneTrustId: googleTagManagerNonceId: + bizible: object_store: enabled: false proxy_download: true @@ -1008,6 +1009,7 @@ under the `extra` key below `appConfig`: | `extra.matomoDisableCookies`| Boolean | (empty) | Disable Matomo cookies (corresponds to `disableCookies` in the Matomo script) | | `extra.oneTrustId` | String | (empty) | OneTrust ID. | | `extra.googleTagManagerNonceId` | String | (empty) | Google Tag Manager ID. | +| `extra.bizible` | Boolean | `false` | Set to true to enable Bizible script | ### Consolidated object storage diff --git a/spec/configuration/gitlab-yml-erb_spec.rb b/spec/configuration/gitlab-yml-erb_spec.rb index a52806fcba..e80a826548 100644 --- a/spec/configuration/gitlab-yml-erb_spec.rb +++ b/spec/configuration/gitlab-yml-erb_spec.rb @@ -161,6 +161,60 @@ describe 'gitlab.yml.erb configuration' do end end + context 'bizible' do + let(:required_values) do + YAML.safe_load(%( + global: + appConfig: + extra: + bizible: #{value} + )).merge(default_values) + end + + context 'when true' do + let(:value) { true } + + it 'populates the gitlab.yml.erb with true' do + t = HelmTemplate.new(required_values) + expect(t.dig( + 'ConfigMap/test-webservice', + 'data', + 'gitlab.yml.erb' + )).to include('bizible: true') + end + end + + context 'when false' do + let(:value) { false } + + it 'does not populate the gitlab.yml.erb' do + t = HelmTemplate.new(required_values) + + expect(t.exit_code).to eq(0) + expect(t.dig( + 'ConfigMap/test-webservice', + 'data', + 'gitlab.yml.erb' + )).not_to include('bizible') + end + end + + context 'when nil' do + let(:value) { nil } + + it 'does not populate the gitlab.yml.erb' do + t = HelmTemplate.new(required_values) + + expect(t.exit_code).to eq(0) + expect(t.dig( + 'ConfigMap/test-webservice', + 'data', + 'gitlab.yml.erb' + )).not_to include('bizible') + end + end + end + context 'sidekiq.routingRules on web' do let(:required_values) do value.merge(default_values) diff --git a/values.yaml b/values.yaml index 6f2d5de960..e0bd6199ac 100644 --- a/values.yaml +++ b/values.yaml @@ -276,6 +276,7 @@ global: matomoDisableCookies: oneTrustId: googleTagManagerNonceId: + bizible: ## https://docs.gitlab.com/charts/charts/globals#lfs-artifacts-uploads-packages-external-mr-diffs-and-dependency-proxy object_store: -- GitLab From 6664d55e0bc858a4afa0f63865438239ea782ac0 Mon Sep 17 00:00:00 2001 From: Jason Plum Date: Tue, 22 Feb 2022 21:56:25 +0000 Subject: [PATCH 2/2] Set bizible to false since it's default --- charts/gitlab/charts/webservice/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/gitlab/charts/webservice/values.yaml b/charts/gitlab/charts/webservice/values.yaml index b1afcaa8e7..eb0cd096c3 100644 --- a/charts/gitlab/charts/webservice/values.yaml +++ b/charts/gitlab/charts/webservice/values.yaml @@ -329,7 +329,7 @@ extra: {} # matomo_disable_cookies: false # one_trust_id: '_your_one_trust_id' # google_tag_manager_nonce_id: '_your_google_tag_manager_id' - # bizible: true + # bizible: false rack_attack: git_basic_auth: enabled: false -- GitLab