From ddbb939c483ee4418255b4dbf6b54e6eca3f874a Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Fri, 12 Mar 2021 17:40:43 +0100 Subject: [PATCH 1/5] Allow opting out of workhorse redis --- charts/gitlab/charts/webservice/templates/configmap.yml | 2 ++ doc/charts/globals.md | 2 ++ values.yaml | 1 + 3 files changed, 5 insertions(+) diff --git a/charts/gitlab/charts/webservice/templates/configmap.yml b/charts/gitlab/charts/webservice/templates/configmap.yml index a000ab55f9..7a4795c120 100644 --- a/charts/gitlab/charts/webservice/templates/configmap.yml +++ b/charts/gitlab/charts/webservice/templates/configmap.yml @@ -155,6 +155,7 @@ data: installation_type: | gitlab-helm-chart workhorse-config.toml.erb: | + {{- if .Values.global.workhorse.redis }} [redis] {{- if not .Values.global.redis.sentinels }} URL = "{{ template "gitlab.redis.scheme" . }}://{{ template "gitlab.redis.host" . }}:{{ template "gitlab.redis.port" . }}" @@ -166,6 +167,7 @@ data: Password = "<%= File.read("/etc/gitlab/redis/redis-password").strip.dump[1..-2] %>" {{- end }} {{- include "workhorse.object_storage.config" $ | nindent 4 }} + {{- end }} [image_resizer] max_scaler_procs = {{ .Values.workhorse.imageScaler.maxProcs | int }} max_filesize = {{ .Values.workhorse.imageScaler.maxFileSizeBytes | int }} diff --git a/doc/charts/globals.md b/doc/charts/globals.md index 458a2cff5a..04eda35f9a 100644 --- a/doc/charts/globals.md +++ b/doc/charts/globals.md @@ -1419,6 +1419,7 @@ global: serviceName: webservice-default host: api.example.com port: 8181 + redis: false ``` | Name | Type | | Default | Description | @@ -1427,6 +1428,7 @@ global: | scheme | String | `http` | Scheme of the API endpoint | | host | String | | Fully qualified hostname or IP address of an API endpoint. Overrides the presence of `serviceName`. | | port | Integer | `8181` | Port number of associated API server. | +| redis | Boolean | `true` | Whether publish/subscribe over Redis is enabled. | ### Bootsnap Cache diff --git a/values.yaml b/values.yaml index 5d31cf5b20..cb00abfb49 100644 --- a/values.yaml +++ b/values.yaml @@ -578,6 +578,7 @@ global: ## Global settings related to Workhorse workhorse: serviceName: webservice-default + redis: true # scheme: # host: # port: -- GitLab From e1438c2cb2f4363a6e5ec03a93776be47d6cb229 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Fri, 12 Mar 2021 17:55:46 +0100 Subject: [PATCH 2/5] Make redis config key a code string to bypass markdownlint --- doc/charts/globals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/charts/globals.md b/doc/charts/globals.md index 04eda35f9a..c4d2d782eb 100644 --- a/doc/charts/globals.md +++ b/doc/charts/globals.md @@ -1428,7 +1428,7 @@ global: | scheme | String | `http` | Scheme of the API endpoint | | host | String | | Fully qualified hostname or IP address of an API endpoint. Overrides the presence of `serviceName`. | | port | Integer | `8181` | Port number of associated API server. | -| redis | Boolean | `true` | Whether publish/subscribe over Redis is enabled. | +| `redis` | Boolean | `true` | Whether publish/subscribe over Redis is enabled. | ### Bootsnap Cache -- GitLab From a2545a9964561a122f858170f9a5d6eda1ef6d4e Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Fri, 12 Mar 2021 17:58:51 +0100 Subject: [PATCH 3/5] changelog --- changelogs/unreleased/workhorse-redis-optional.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelogs/unreleased/workhorse-redis-optional.yml diff --git a/changelogs/unreleased/workhorse-redis-optional.yml b/changelogs/unreleased/workhorse-redis-optional.yml new file mode 100644 index 0000000000..f158386da4 --- /dev/null +++ b/changelogs/unreleased/workhorse-redis-optional.yml @@ -0,0 +1,5 @@ +--- +title: Allow opting out of workhorse redis +merge_request: 1889 +author: +type: performance -- GitLab From 56a7e4f2f8511c5d24e57da50f26c846fda0fc15 Mon Sep 17 00:00:00 2001 From: Igor Date: Mon, 29 Mar 2021 13:09:50 +0000 Subject: [PATCH 4/5] Apply 1 suggestion(s) to 1 file(s) --- doc/charts/globals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/charts/globals.md b/doc/charts/globals.md index c4d2d782eb..43af80edcd 100644 --- a/doc/charts/globals.md +++ b/doc/charts/globals.md @@ -1419,7 +1419,7 @@ global: serviceName: webservice-default host: api.example.com port: 8181 - redis: false + redis: true ``` | Name | Type | | Default | Description | -- GitLab From ac0465c5d3b71a3641124dcbef98931c3a0961a8 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Mon, 29 Mar 2021 15:10:51 +0200 Subject: [PATCH 5/5] Fix gating off of object_storage --- charts/gitlab/charts/webservice/templates/configmap.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/gitlab/charts/webservice/templates/configmap.yml b/charts/gitlab/charts/webservice/templates/configmap.yml index 7a4795c120..39f73433e0 100644 --- a/charts/gitlab/charts/webservice/templates/configmap.yml +++ b/charts/gitlab/charts/webservice/templates/configmap.yml @@ -166,8 +166,8 @@ data: {{- if .Values.global.redis.password.enabled }} Password = "<%= File.read("/etc/gitlab/redis/redis-password").strip.dump[1..-2] %>" {{- end }} - {{- include "workhorse.object_storage.config" $ | nindent 4 }} {{- end }} + {{- include "workhorse.object_storage.config" $ | nindent 4 }} [image_resizer] max_scaler_procs = {{ .Values.workhorse.imageScaler.maxProcs | int }} max_filesize = {{ .Values.workhorse.imageScaler.maxFileSizeBytes | int }} -- GitLab