From 8d12c2ae3bb6519c21f062d314a8db2411f40c8c Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Thu, 7 May 2020 19:50:24 -0700 Subject: [PATCH 01/25] Moved Redis documentation to installation/deployment.md --- doc/charts/gitlab/webservice/index.md | 32 +------- doc/installation/deployment.md | 106 +++++++++++++++++++++++++- 2 files changed, 106 insertions(+), 32 deletions(-) diff --git a/doc/charts/gitlab/webservice/index.md b/doc/charts/gitlab/webservice/index.md index 885067df7b..847e37c1b8 100644 --- a/doc/charts/gitlab/webservice/index.md +++ b/doc/charts/gitlab/webservice/index.md @@ -231,36 +231,8 @@ resources: ### Redis -```yaml -redis: - host: redis.example.com - serviceName: redis - port: 6379 - sentinels: - - host: sentinel1.example.com - port: 26379 - password: - enabled: true - secret: gitlab-redis - key: redis-password -``` - -| Name | Type | Default | Description | -|:------------------ |:-------:|:------- |:----------- | -| `host` | String | | The hostname of the Redis server with the database to use. This can be omitted in lieu of `serviceName`. If using Redis Sentinels, the `host` attribute needs to be set to the cluster name as specified in the `sentinel.conf`.| -| `serviceName` | String | `redis` | The name of the `service` which is operating the Redis database. If this is present, and `host` is not, the chart will template the hostname of the service (and current `.Release.Name`) in place of the `host` value. This is convenient when using Redis as a part of the overall GitLab chart. | -| `port` | Integer | `6379` | The port on which to connect to the Redis server. | -| `password.key` | String | | The `password.key` attribute for Redis defines the name of the key in the secret (below) that contains the password. | -| `password.secret` | String | | The `password.secret` attribute for Redis defines the name of the Kubernetes `Secret` to pull from. | -| `password.enabled` | Bool | true | The `password.enabled` provides a toggle for using a password with the Redis instance. | -| `sentinels.[].host`| String | | The hostname of Redis Sentinel server for a Redis HA setup. | -| `sentinels.[].port`| Integer | `26379` | The port on which to connect to the Redis Sentinel server. | - -_Note:_ The current Redis Sentinel support only supports Sentinels that have -been deployed separately from the GitLab chart. As a result, the Redis -deployment through the GitLab chart should be disabled with `redis.install=false`. -The Secret containing the Redis password will need to be manually created -before deploying the GitLab chart. +The Redis documentation has been consolidated in the [installation/deployment](../../../installation/deployment.md#redis) +page. Please consult this page for the latest Redis configuration options. ### PostgreSQL diff --git a/doc/installation/deployment.md b/doc/installation/deployment.md index cf95f673bd..577e5f7e15 100644 --- a/doc/installation/deployment.md +++ b/doc/installation/deployment.md @@ -109,16 +109,118 @@ You can bring an external Redis instance by setting `redis.install=false`, and following our [advanced documentation](../advanced/external-redis/index.md) for configuration. +```yaml +global: + redis: + host: redis.example.com + serviceName: redis + port: 6379 + password: + enabled: true + secret: gitlab-redis + key: redis-password +``` + +| Name | Type | Default | Description | +|:------------------ |:-------:|:------- |:----------- | +| `host` | String | | The hostname of the Redis server with the database to use. This can be omitted in lieu of `serviceName`. | +| `serviceName` | String | `redis` | The name of the `service` which is operating the Redis database. If this is present, and `host` is not, the chart will template the hostname of the service (and current `.Release.Name`) in place of the `host` value. This is convenient when using Redis as a part of the overall GitLab chart. | +| `port` | Integer | `6379` | The port on which to connect to the Redis server. | +| `password.key` | String | | The `password.key` attribute for Redis defines the name of the key in the secret (below) that contains the password. | +| `password.secret` | String | | The `password.secret` attribute for Redis defines the name of the Kubernetes `Secret` to pull from. | +| `password.enabled` | Bool | true | The `password.enabled` provides a toggle for using a password with the Redis instance. | + + +#### Redis Sentinel Support + +The current Redis Sentinel support only supports Sentinels that have +been deployed separately from the GitLab chart. As a result, the Redis +deployment through the GitLab chart should be disabled with `redis.install=false`. +The Secret containing the Redis password will need to be manually created +before deploying the GitLab chart. + The installation of an HA Redis cluster from the GitLab chart does not support using sentinels. If sentinel support is desired, a Redis cluster needs to be created separately from the GitLab chart install. This can be -done inside or outside the Kubernetes cluster. Sentinel settings can be -found in the [webservice chart](../charts/gitlab/webservice/index.md#redis). +done inside or outside the Kubernetes cluster. An issue to track the [supporting of sentinels in a GitLab deployed Redis cluster](https://gitlab.com/gitlab-org/charts/gitlab/issues/1810) has been created for tracking purposes. +```yaml +redis: + install: false +global: + redis: + host: redis.example.com + serviceName: redis + port: 6379 + sentinels: + - host: sentinel1.example.com + port: 26379 + - host: sentinel2.exeample.com + port: 26379 + password: + enabled: true + secret: gitlab-redis + key: redis-password +``` + +| Name | Type | Default | Description | +|:------------------ |:-------:|:------- |:----------- | +| `host` | String | | The `host` attribute needs to be set to the cluster name as specified in the `sentinel.conf`.| +| `sentinels.[].host`| String | | The hostname of Redis Sentinel server for a Redis HA setup. | +| `sentinels.[].port`| Integer | `26379` | The port on which to connect to the Redis Sentinel server. | + +NOTE: **Note**: +All the prior Redis attributes in the general [Redis section](#redis) continue +to apply with the Sentinel support unless respecified in the table above. + +#### Multiple Redis Support + +```yaml +redis: + install: false +global: + redis: + host: redis.example + port: 9001 + password: + enabled: true + secret: redis-secret + key: redis-password + cache: + host: cache.redis.example + port: 9002 + password: + enabled: true + secret: cache-secret + key: cache-password + sharedState: + host: shared.redis.example + port: 9003 + password: + enabled: true + secret: shared-secret + key: shared-password + queues: + host: queues.redis.example + port: 9004 + password: + enabled: true + secret: queues-secret + key: queues-password + actioncable: + host: cable.redis.example + port: 9005 + password: + enabled: true + secret: cable-secret + key: cable-password +``` + + ### MinIO By default this chart provides an in-cluster MinIO deployment to provide an object storage API. -- GitLab From 42f398aca9ee2c2c1de0b5dd691ff3c5bc0428ef Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Fri, 8 May 2020 15:06:26 -0700 Subject: [PATCH 02/25] Added documenation for multi-redis attributes --- doc/installation/deployment.md | 37 ++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/doc/installation/deployment.md b/doc/installation/deployment.md index 577e5f7e15..640b737938 100644 --- a/doc/installation/deployment.md +++ b/doc/installation/deployment.md @@ -126,9 +126,9 @@ global: | `host` | String | | The hostname of the Redis server with the database to use. This can be omitted in lieu of `serviceName`. | | `serviceName` | String | `redis` | The name of the `service` which is operating the Redis database. If this is present, and `host` is not, the chart will template the hostname of the service (and current `.Release.Name`) in place of the `host` value. This is convenient when using Redis as a part of the overall GitLab chart. | | `port` | Integer | `6379` | The port on which to connect to the Redis server. | +| `password.enabled` | Bool | true | The `password.enabled` provides a toggle for using a password with the Redis instance. | | `password.key` | String | | The `password.key` attribute for Redis defines the name of the key in the secret (below) that contains the password. | | `password.secret` | String | | The `password.secret` attribute for Redis defines the name of the Kubernetes `Secret` to pull from. | -| `password.enabled` | Bool | true | The `password.enabled` provides a toggle for using a password with the Redis instance. | #### Redis Sentinel Support @@ -179,47 +179,72 @@ to apply with the Sentinel support unless respecified in the table above. #### Multiple Redis Support +The GitLab chart includes support for running with separate Redis instances +for different persistence classes, currently: cache, queues, shared_state and +actioncable. + +| Instance | Purpose | +|:-------------|:----------------------------------------------------| +| cache | Store cached data | +| queues | Store Sidekiq background jobs | +| shared_state | Store session-related and other persistent data | +| actioncable | Pub/Sub queue backend for ActionCable | + +Any number of the instances may be specified and for the instances that +are not specified, they are handled by the primary Redis instance specified +by `global.redis.host` or use the deployed Redis instance from the chart. + ```yaml redis: install: false global: redis: host: redis.example - port: 9001 + port: 6379 password: enabled: true secret: redis-secret key: redis-password cache: host: cache.redis.example - port: 9002 + port: 6379 password: enabled: true secret: cache-secret key: cache-password sharedState: host: shared.redis.example - port: 9003 + port: 6379 password: enabled: true secret: shared-secret key: shared-password queues: host: queues.redis.example - port: 9004 + port: 6379 password: enabled: true secret: queues-secret key: queues-password actioncable: host: cable.redis.example - port: 9005 + port: 6379 password: enabled: true secret: cable-secret key: cable-password ``` +The following table describes the attributes for each dictionary of the +Redis instances. + +| Name | Type | Default | Description | +|:------------------ |:-------:|:------- |:----------- | +| `.host` | String | | The hostname of the Redis server with the database to use. | +| `.port` | Integer | `6379` | The port on which to connect to the Redis server. | +| `.password.enabled`| Bool | true | The `password.enabled` provides a toggle for using a password with the Redis instance. | +| `.password.key` | String | | The `password.key` attribute for Redis defines the name of the key in the secret (below) that contains the password. | +| `.password.secret` | String | | The `password.secret` attribute for Redis defines the name of the Kubernetes `Secret` to pull from. | ### MinIO -- GitLab From 9b2804d06d5f6038e2c9070bc560ee49dbfc6252 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Fri, 8 May 2020 15:34:48 -0700 Subject: [PATCH 03/25] Added note about using Sentinels with multi Redis --- doc/installation/deployment.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/installation/deployment.md b/doc/installation/deployment.md index 640b737938..c779391d5b 100644 --- a/doc/installation/deployment.md +++ b/doc/installation/deployment.md @@ -246,6 +246,10 @@ Redis instances. | `.password.key` | String | | The `password.key` attribute for Redis defines the name of the key in the secret (below) that contains the password. | | `.password.secret` | String | | The `password.secret` attribute for Redis defines the name of the Kubernetes `Secret` to pull from. | +NOTE: **Note**: +Each instance definition may also use the Redis Sentinel support. Please +refer to the [Sentinel configuration](#redis-sentinel-support). + ### MinIO By default this chart provides an in-cluster MinIO deployment to provide an object storage API. -- GitLab From 6ceb030735f4b2bab1a57c683498f4e4458f6a72 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Mon, 11 May 2020 11:37:09 -0700 Subject: [PATCH 04/25] Added references to multiple redis in external redis doc --- doc/advanced/external-redis/index.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/advanced/external-redis/index.md b/doc/advanced/external-redis/index.md index 847a143008..f66599a43d 100644 --- a/doc/advanced/external-redis/index.md +++ b/doc/advanced/external-redis/index.md @@ -36,3 +36,14 @@ running, the `global.redis.host` attribute needs to be set to the cluster name as specified in the `sentinel.conf`. Sentinel servers can be referenced using the `global.redis.sentinels[0].host` and `global.redis.sentinels[0].port` values for the `--set` flag. The index is zero based. + +## Using Multiple Redis Instances + +The GitLab chart supports splitting several of the resource intensive +Redis operations across multiple Redis instances. The persistence classes +that are supported for moving to other Redis instances are `cache`, `queues`, +`shared_state` and `actioncable`. + +More detailed information on configuring the chart for using multiple Redis +instances can be found in the [installation/deployment](../../installation/deployment.md#multiple-redis-support) +documentation. -- GitLab From ae93bcce3ab126b62f1b07a6ab20a2b9e37d45d2 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Mon, 11 May 2020 11:40:42 -0700 Subject: [PATCH 05/25] Added changelog --- changelogs/unreleased/2027-multiple-redis.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelogs/unreleased/2027-multiple-redis.yml diff --git a/changelogs/unreleased/2027-multiple-redis.yml b/changelogs/unreleased/2027-multiple-redis.yml new file mode 100644 index 0000000000..06e983af1c --- /dev/null +++ b/changelogs/unreleased/2027-multiple-redis.yml @@ -0,0 +1,5 @@ +--- +title: Updated documention to include multi Redis support +merge_request: 1330 +author: +type: changed -- GitLab From fe33249cdbd1dc40412018ce9bc01345817880bc Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Mon, 11 May 2020 11:44:47 -0700 Subject: [PATCH 06/25] Fixed error failing doc-lint --- doc/installation/deployment.md | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/installation/deployment.md b/doc/installation/deployment.md index c779391d5b..eca0088661 100644 --- a/doc/installation/deployment.md +++ b/doc/installation/deployment.md @@ -130,7 +130,6 @@ global: | `password.key` | String | | The `password.key` attribute for Redis defines the name of the key in the secret (below) that contains the password. | | `password.secret` | String | | The `password.secret` attribute for Redis defines the name of the Kubernetes `Secret` to pull from. | - #### Redis Sentinel Support The current Redis Sentinel support only supports Sentinels that have -- GitLab From 4a345fa0ffbd01b43f057d79be5f8fd95dbf9514 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Tue, 12 May 2020 20:05:09 +0000 Subject: [PATCH 07/25] Apply suggestion to doc/advanced/external-redis/index.md --- doc/advanced/external-redis/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/advanced/external-redis/index.md b/doc/advanced/external-redis/index.md index f66599a43d..534974ab72 100644 --- a/doc/advanced/external-redis/index.md +++ b/doc/advanced/external-redis/index.md @@ -39,7 +39,7 @@ values for the `--set` flag. The index is zero based. ## Using Multiple Redis Instances -The GitLab chart supports splitting several of the resource intensive +GitLab supports splitting several of the resource intensive Redis operations across multiple Redis instances. The persistence classes that are supported for moving to other Redis instances are `cache`, `queues`, `shared_state` and `actioncable`. -- GitLab From 1c882251d1ef684dc74b84a581ab588aad661195 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Tue, 12 May 2020 20:06:23 +0000 Subject: [PATCH 08/25] Apply suggestion to doc/advanced/external-redis/index.md --- doc/advanced/external-redis/index.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/advanced/external-redis/index.md b/doc/advanced/external-redis/index.md index 534974ab72..d5f6664a0a 100644 --- a/doc/advanced/external-redis/index.md +++ b/doc/advanced/external-redis/index.md @@ -40,9 +40,8 @@ values for the `--set` flag. The index is zero based. ## Using Multiple Redis Instances GitLab supports splitting several of the resource intensive -Redis operations across multiple Redis instances. The persistence classes -that are supported for moving to other Redis instances are `cache`, `queues`, -`shared_state` and `actioncable`. +Redis operations across multiple Redis instances. This chart supports distributing +those persistence classes to other Redis instances: `cache`, `queues`, `shared_state` and `actioncable`. More detailed information on configuring the chart for using multiple Redis instances can be found in the [installation/deployment](../../installation/deployment.md#multiple-redis-support) -- GitLab From c3aa6bd582dbad6b3bae462c664fee2d9dae64b5 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Tue, 12 May 2020 20:08:23 +0000 Subject: [PATCH 09/25] Apply suggestion to doc/installation/deployment.md --- doc/installation/deployment.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/installation/deployment.md b/doc/installation/deployment.md index eca0088661..a40a2f3fa5 100644 --- a/doc/installation/deployment.md +++ b/doc/installation/deployment.md @@ -179,8 +179,8 @@ to apply with the Sentinel support unless respecified in the table above. #### Multiple Redis Support The GitLab chart includes support for running with separate Redis instances -for different persistence classes, currently: cache, queues, shared_state and -actioncable. +for different persistence classes, currently: `cache`, `queues`, `shared_state` and +`actioncable` | Instance | Purpose | |:-------------|:----------------------------------------------------| -- GitLab From 7e0fb040b4afa20fe55aea1f2ca69e3c2037f798 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Tue, 12 May 2020 20:08:48 +0000 Subject: [PATCH 10/25] Apply suggestion to doc/installation/deployment.md --- doc/installation/deployment.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/installation/deployment.md b/doc/installation/deployment.md index a40a2f3fa5..5f8fb0d05c 100644 --- a/doc/installation/deployment.md +++ b/doc/installation/deployment.md @@ -189,8 +189,8 @@ for different persistence classes, currently: `cache`, `queues`, `shared_state` | shared_state | Store session-related and other persistent data | | actioncable | Pub/Sub queue backend for ActionCable | -Any number of the instances may be specified and for the instances that -are not specified, they are handled by the primary Redis instance specified +Any number of the instances may be specified. Any instances not specified +will be handled by the primary Redis instance specified by `global.redis.host` or use the deployed Redis instance from the chart. ```yaml -- GitLab From 02b5c95a1b60e2eeffa536d714c8c064b121a1f2 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Tue, 12 May 2020 20:12:02 +0000 Subject: [PATCH 11/25] Apply suggestion to doc/advanced/external-redis/index.md --- doc/advanced/external-redis/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/advanced/external-redis/index.md b/doc/advanced/external-redis/index.md index d5f6664a0a..b416c25d8b 100644 --- a/doc/advanced/external-redis/index.md +++ b/doc/advanced/external-redis/index.md @@ -37,7 +37,7 @@ name as specified in the `sentinel.conf`. Sentinel servers can be referenced using the `global.redis.sentinels[0].host` and `global.redis.sentinels[0].port` values for the `--set` flag. The index is zero based. -## Using Multiple Redis Instances +## Using multiple Redis instances GitLab supports splitting several of the resource intensive Redis operations across multiple Redis instances. This chart supports distributing -- GitLab From 68ee6960e0788a47fbd43744d7f746022f899206 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Tue, 12 May 2020 20:12:38 +0000 Subject: [PATCH 12/25] Apply suggestion to doc/installation/deployment.md --- doc/installation/deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/installation/deployment.md b/doc/installation/deployment.md index 5f8fb0d05c..645decaa87 100644 --- a/doc/installation/deployment.md +++ b/doc/installation/deployment.md @@ -130,7 +130,7 @@ global: | `password.key` | String | | The `password.key` attribute for Redis defines the name of the key in the secret (below) that contains the password. | | `password.secret` | String | | The `password.secret` attribute for Redis defines the name of the Kubernetes `Secret` to pull from. | -#### Redis Sentinel Support +#### Redis Sentinel support The current Redis Sentinel support only supports Sentinels that have been deployed separately from the GitLab chart. As a result, the Redis -- GitLab From 3c46634d2532405d41892efc5e0d2700f9e58699 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Tue, 12 May 2020 20:12:53 +0000 Subject: [PATCH 13/25] Apply suggestion to doc/installation/deployment.md --- doc/installation/deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/installation/deployment.md b/doc/installation/deployment.md index 645decaa87..777d913435 100644 --- a/doc/installation/deployment.md +++ b/doc/installation/deployment.md @@ -176,7 +176,7 @@ NOTE: **Note**: All the prior Redis attributes in the general [Redis section](#redis) continue to apply with the Sentinel support unless respecified in the table above. -#### Multiple Redis Support +#### Multiple Redis support The GitLab chart includes support for running with separate Redis instances for different persistence classes, currently: `cache`, `queues`, `shared_state` and -- GitLab From a34098dca2e4d822c345965022f88f7c665fa02a Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Thu, 14 May 2020 20:22:45 +0000 Subject: [PATCH 14/25] Apply suggestion to doc/installation/deployment.md --- doc/installation/deployment.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/installation/deployment.md b/doc/installation/deployment.md index 777d913435..9681659a24 100644 --- a/doc/installation/deployment.md +++ b/doc/installation/deployment.md @@ -192,6 +192,7 @@ for different persistence classes, currently: `cache`, `queues`, `shared_state` Any number of the instances may be specified. Any instances not specified will be handled by the primary Redis instance specified by `global.redis.host` or use the deployed Redis instance from the chart. +For example: ```yaml redis: -- GitLab From 5acb3ee2a42d05e8731c424d06cfbb25f5131b96 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Thu, 14 May 2020 20:27:41 +0000 Subject: [PATCH 15/25] Apply suggestion to doc/installation/deployment.md --- doc/installation/deployment.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/installation/deployment.md b/doc/installation/deployment.md index 9681659a24..382656ec62 100644 --- a/doc/installation/deployment.md +++ b/doc/installation/deployment.md @@ -247,9 +247,8 @@ Redis instances. | `.password.secret` | String | | The `password.secret` attribute for Redis defines the name of the Kubernetes `Secret` to pull from. | NOTE: **Note**: -Each instance definition may also use the Redis Sentinel support. Please -refer to the [Sentinel configuration](#redis-sentinel-support). - +Each instance definition may also use Redis Sentinel support. Sentinel +configurations **are not shared**. Please refer to the [Sentinel configuration](#redis-sentinel-support). ### MinIO By default this chart provides an in-cluster MinIO deployment to provide an object storage API. -- GitLab From 1a4008d75d3f99eb33b018b39da0d4e9d52dd481 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Thu, 14 May 2020 20:30:33 +0000 Subject: [PATCH 16/25] Apply suggestion to doc/installation/deployment.md --- doc/installation/deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/installation/deployment.md b/doc/installation/deployment.md index 382656ec62..1db42d8f39 100644 --- a/doc/installation/deployment.md +++ b/doc/installation/deployment.md @@ -135,7 +135,7 @@ global: The current Redis Sentinel support only supports Sentinels that have been deployed separately from the GitLab chart. As a result, the Redis deployment through the GitLab chart should be disabled with `redis.install=false`. -The Secret containing the Redis password will need to be manually created +The Kubernetes Secret containing the Redis password will need to be manually created before deploying the GitLab chart. The installation of an HA Redis cluster from the GitLab chart does not -- GitLab From a173011c74bf96e58edf6c77c1a30d0c27fad546 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Thu, 14 May 2020 14:18:26 -0700 Subject: [PATCH 17/25] Moved Redis documentation to globals.md --- doc/charts/globals.md | 148 +++++++++++++++++++++++++++++--- doc/installation/deployment.md | 150 +-------------------------------- 2 files changed, 139 insertions(+), 159 deletions(-) diff --git a/doc/charts/globals.md b/doc/charts/globals.md index 0361dda7b5..052d72ceb9 100644 --- a/doc/charts/globals.md +++ b/doc/charts/globals.md @@ -162,31 +162,157 @@ global: ## Configure Redis settings -The GitLab global Redis settings are located under the `global.redis` key. For more -details on these settings, see the documentation within the [Webservice chart](gitlab/webservice/index.md#redis). +The GitLab global Redis settings are located under the `global.redis` key. -```YAML +By default we use an single, non-replicated Redis instance. If desired, a +highly available Redis can be deployed instead. To install an HA Redis +cluster one needs to set `redis.cluster.enabled=true` when the GitLab +chart is installed. + +You can bring an external Redis instance by setting `redis.install=false`, and +following our [advanced documentation](../advanced/external-redis/index.md) for +configuration. + +```yaml global: redis: host: redis.example.com - # serviceName: + serviceName: redis + port: 6379 + password: + enabled: true + secret: gitlab-redis + key: redis-password +``` + +| Name | Type | Default | Description | +|:------------------ |:-------:|:------- |:----------- | +| `host` | String | | The hostname of the Redis server with the database to use. This can be omitted in lieu of `serviceName`. | +| `serviceName` | String | `redis` | The name of the `service` which is operating the Redis database. If this is present, and `host` is not, the chart will template the hostname of the service (and current `.Release.Name`) in place of the `host` value. This is convenient when using Redis as a part of the overall GitLab chart. | +| `port` | Integer | `6379` | The port on which to connect to the Redis server. | +| `password.enabled` | Bool | true | The `password.enabled` provides a toggle for using a password with the Redis instance. | +| `password.key` | String | | The `password.key` attribute for Redis defines the name of the key in the secret (below) that contains the password. | +| `password.secret` | String | | The `password.secret` attribute for Redis defines the name of the Kubernetes `Secret` to pull from. | + +#### Redis Sentinel support + +The current Redis Sentinel support only supports Sentinels that have +been deployed separately from the GitLab chart. As a result, the Redis +deployment through the GitLab chart should be disabled with `redis.install=false`. +The Kubernetes Secret containing the Redis password will need to be manually created +before deploying the GitLab chart. + +The installation of an HA Redis cluster from the GitLab chart does not +support using sentinels. If sentinel support is desired, a Redis cluster +needs to be created separately from the GitLab chart install. This can be +done inside or outside the Kubernetes cluster. + +An issue to track the [supporting of sentinels in a GitLab deployed +Redis cluster](https://gitlab.com/gitlab-org/charts/gitlab/issues/1810) has +been created for tracking purposes. + +```yaml +redis: + install: false +global: + redis: + host: redis.example.com + serviceName: redis port: 6379 sentinels: - host: sentinel1.example.com port: 26379 - - host: sentinel2.example.com + - host: sentinel2.exeample.com port: 26379 password: enabled: true - secret: gitlab-redis-secret + secret: gitlab-redis key: redis-password ``` -_Note:_ The current Redis Sentinel support only supports Sentinels that have -been deployed separately from the GitLab chart. As a result, the Redis -deployment through the GitLab chart should be disabled with `redis.install=false`. -The Secret containing the Redis password will need to be manually created -before deploying the GitLab chart. +| Name | Type | Default | Description | +|:------------------ |:-------:|:------- |:----------- | +| `host` | String | | The `host` attribute needs to be set to the cluster name as specified in the `sentinel.conf`.| +| `sentinels.[].host`| String | | The hostname of Redis Sentinel server for a Redis HA setup. | +| `sentinels.[].port`| Integer | `26379` | The port on which to connect to the Redis Sentinel server. | + +NOTE: **Note**: +All the prior Redis attributes in the general [configure Redis settings](#configure-redis-settings) +continue to apply with the Sentinel support unless respecified in the table above. + +#### Multiple Redis support + +The GitLab chart includes support for running with separate Redis instances +for different persistence classes, currently: `cache`, `queues`, `shared_state` and +`actioncable` + +| Instance | Purpose | +|:-------------|:----------------------------------------------------| +| cache | Store cached data | +| queues | Store Sidekiq background jobs | +| shared_state | Store session-related and other persistent data | +| actioncable | Pub/Sub queue backend for ActionCable | + +Any number of the instances may be specified. Any instances not specified +will be handled by the primary Redis instance specified +by `global.redis.host` or use the deployed Redis instance from the chart. +For example: + +```yaml +redis: + install: false +global: + redis: + host: redis.example + port: 6379 + password: + enabled: true + secret: redis-secret + key: redis-password + cache: + host: cache.redis.example + port: 6379 + password: + enabled: true + secret: cache-secret + key: cache-password + sharedState: + host: shared.redis.example + port: 6379 + password: + enabled: true + secret: shared-secret + key: shared-password + queues: + host: queues.redis.example + port: 6379 + password: + enabled: true + secret: queues-secret + key: queues-password + actioncable: + host: cable.redis.example + port: 6379 + password: + enabled: true + secret: cable-secret + key: cable-password +``` + +The following table describes the attributes for each dictionary of the +Redis instances. + +| Name | Type | Default | Description | +|:------------------ |:-------:|:------- |:----------- | +| `.host` | String | | The hostname of the Redis server with the database to use. | +| `.port` | Integer | `6379` | The port on which to connect to the Redis server. | +| `.password.enabled`| Bool | true | The `password.enabled` provides a toggle for using a password with the Redis instance. | +| `.password.key` | String | | The `password.key` attribute for Redis defines the name of the key in the secret (below) that contains the password. | +| `.password.secret` | String | | The `password.secret` attribute for Redis defines the name of the Kubernetes `Secret` to pull from. | + +NOTE: **Note**: +Each instance definition may also use Redis Sentinel support. Sentinel +configurations **are not shared**. Please refer to the [Sentinel configuration](#redis-sentinel-support). ## Configure Grafana integration diff --git a/doc/installation/deployment.md b/doc/installation/deployment.md index 1db42d8f39..7e9bb432ed 100644 --- a/doc/installation/deployment.md +++ b/doc/installation/deployment.md @@ -100,155 +100,9 @@ use it as shown below. ### Redis -By default we use an single, non-replicated Redis instance. If desired, a -highly available Redis can be deployed instead. To install an HA Redis -cluster one needs to set `redis.cluster.enabled=true` when the GitLab -chart is installed. +All the Redis configuration settings have been moved and consolidated on the +[charts/globals.md](../charts/globals.md#configure-redis-settings) page. -You can bring an external Redis instance by setting `redis.install=false`, and -following our [advanced documentation](../advanced/external-redis/index.md) for -configuration. - -```yaml -global: - redis: - host: redis.example.com - serviceName: redis - port: 6379 - password: - enabled: true - secret: gitlab-redis - key: redis-password -``` - -| Name | Type | Default | Description | -|:------------------ |:-------:|:------- |:----------- | -| `host` | String | | The hostname of the Redis server with the database to use. This can be omitted in lieu of `serviceName`. | -| `serviceName` | String | `redis` | The name of the `service` which is operating the Redis database. If this is present, and `host` is not, the chart will template the hostname of the service (and current `.Release.Name`) in place of the `host` value. This is convenient when using Redis as a part of the overall GitLab chart. | -| `port` | Integer | `6379` | The port on which to connect to the Redis server. | -| `password.enabled` | Bool | true | The `password.enabled` provides a toggle for using a password with the Redis instance. | -| `password.key` | String | | The `password.key` attribute for Redis defines the name of the key in the secret (below) that contains the password. | -| `password.secret` | String | | The `password.secret` attribute for Redis defines the name of the Kubernetes `Secret` to pull from. | - -#### Redis Sentinel support - -The current Redis Sentinel support only supports Sentinels that have -been deployed separately from the GitLab chart. As a result, the Redis -deployment through the GitLab chart should be disabled with `redis.install=false`. -The Kubernetes Secret containing the Redis password will need to be manually created -before deploying the GitLab chart. - -The installation of an HA Redis cluster from the GitLab chart does not -support using sentinels. If sentinel support is desired, a Redis cluster -needs to be created separately from the GitLab chart install. This can be -done inside or outside the Kubernetes cluster. - -An issue to track the [supporting of sentinels in a GitLab deployed -Redis cluster](https://gitlab.com/gitlab-org/charts/gitlab/issues/1810) has -been created for tracking purposes. - -```yaml -redis: - install: false -global: - redis: - host: redis.example.com - serviceName: redis - port: 6379 - sentinels: - - host: sentinel1.example.com - port: 26379 - - host: sentinel2.exeample.com - port: 26379 - password: - enabled: true - secret: gitlab-redis - key: redis-password -``` - -| Name | Type | Default | Description | -|:------------------ |:-------:|:------- |:----------- | -| `host` | String | | The `host` attribute needs to be set to the cluster name as specified in the `sentinel.conf`.| -| `sentinels.[].host`| String | | The hostname of Redis Sentinel server for a Redis HA setup. | -| `sentinels.[].port`| Integer | `26379` | The port on which to connect to the Redis Sentinel server. | - -NOTE: **Note**: -All the prior Redis attributes in the general [Redis section](#redis) continue -to apply with the Sentinel support unless respecified in the table above. - -#### Multiple Redis support - -The GitLab chart includes support for running with separate Redis instances -for different persistence classes, currently: `cache`, `queues`, `shared_state` and -`actioncable` - -| Instance | Purpose | -|:-------------|:----------------------------------------------------| -| cache | Store cached data | -| queues | Store Sidekiq background jobs | -| shared_state | Store session-related and other persistent data | -| actioncable | Pub/Sub queue backend for ActionCable | - -Any number of the instances may be specified. Any instances not specified -will be handled by the primary Redis instance specified -by `global.redis.host` or use the deployed Redis instance from the chart. -For example: - -```yaml -redis: - install: false -global: - redis: - host: redis.example - port: 6379 - password: - enabled: true - secret: redis-secret - key: redis-password - cache: - host: cache.redis.example - port: 6379 - password: - enabled: true - secret: cache-secret - key: cache-password - sharedState: - host: shared.redis.example - port: 6379 - password: - enabled: true - secret: shared-secret - key: shared-password - queues: - host: queues.redis.example - port: 6379 - password: - enabled: true - secret: queues-secret - key: queues-password - actioncable: - host: cable.redis.example - port: 6379 - password: - enabled: true - secret: cable-secret - key: cable-password -``` - -The following table describes the attributes for each dictionary of the -Redis instances. - -| Name | Type | Default | Description | -|:------------------ |:-------:|:------- |:----------- | -| `.host` | String | | The hostname of the Redis server with the database to use. | -| `.port` | Integer | `6379` | The port on which to connect to the Redis server. | -| `.password.enabled`| Bool | true | The `password.enabled` provides a toggle for using a password with the Redis instance. | -| `.password.key` | String | | The `password.key` attribute for Redis defines the name of the key in the secret (below) that contains the password. | -| `.password.secret` | String | | The `password.secret` attribute for Redis defines the name of the Kubernetes `Secret` to pull from. | - -NOTE: **Note**: -Each instance definition may also use Redis Sentinel support. Sentinel -configurations **are not shared**. Please refer to the [Sentinel configuration](#redis-sentinel-support). ### MinIO By default this chart provides an in-cluster MinIO deployment to provide an object storage API. -- GitLab From c164a06c7f9f543a08150e224f25b8535c6d111e Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Thu, 14 May 2020 15:10:50 -0700 Subject: [PATCH 18/25] Added Sentinel example to multi-redis example --- examples/redis/multiple.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/examples/redis/multiple.yaml b/examples/redis/multiple.yaml index 42e7d14721..66af2cab5a 100644 --- a/examples/redis/multiple.yaml +++ b/examples/redis/multiple.yaml @@ -9,8 +9,17 @@ global: secret: redis-secret key: redis-password cache: - host: cache.redis.example - port: 9002 + # use Sentinel servers for the cache example + # any redis connection can use sentinels, but each connection + # needs to be explicitly specified + # host: cache.redis.example + # port: 9002 + host: # specified in sentinel.conf + sentinels: + - host: sentinel1.redis.example + port: 26379 + - host: sentinel2.redis.example + port: 26379 password: enabled: true secret: cache-secret -- GitLab From 04db72aae1ac7ff465fc68c5426aebf46d0e62c9 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Thu, 14 May 2020 15:15:56 -0700 Subject: [PATCH 19/25] Fixed header levels for Redis sub-topics --- doc/charts/globals.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/charts/globals.md b/doc/charts/globals.md index 052d72ceb9..f6654d63d7 100644 --- a/doc/charts/globals.md +++ b/doc/charts/globals.md @@ -194,7 +194,7 @@ global: | `password.key` | String | | The `password.key` attribute for Redis defines the name of the key in the secret (below) that contains the password. | | `password.secret` | String | | The `password.secret` attribute for Redis defines the name of the Kubernetes `Secret` to pull from. | -#### Redis Sentinel support +### Redis Sentinel support The current Redis Sentinel support only supports Sentinels that have been deployed separately from the GitLab chart. As a result, the Redis @@ -240,7 +240,7 @@ NOTE: **Note**: All the prior Redis attributes in the general [configure Redis settings](#configure-redis-settings) continue to apply with the Sentinel support unless respecified in the table above. -#### Multiple Redis support +### Multiple Redis support The GitLab chart includes support for running with separate Redis instances for different persistence classes, currently: `cache`, `queues`, `shared_state` and -- GitLab From 7817aec6e6fb51d0dc482792825e0c0c53ab3910 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Thu, 14 May 2020 15:19:41 -0700 Subject: [PATCH 20/25] Updated missed link in external redis page --- doc/advanced/external-redis/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/advanced/external-redis/index.md b/doc/advanced/external-redis/index.md index b416c25d8b..b7ee75ce41 100644 --- a/doc/advanced/external-redis/index.md +++ b/doc/advanced/external-redis/index.md @@ -44,5 +44,5 @@ Redis operations across multiple Redis instances. This chart supports distributi those persistence classes to other Redis instances: `cache`, `queues`, `shared_state` and `actioncable`. More detailed information on configuring the chart for using multiple Redis -instances can be found in the [installation/deployment](../../installation/deployment.md#multiple-redis-support) +instances can be found in the [installation/deployment](../../chart/globals.md#multiple-redis-support) documentation. -- GitLab From 671e0bd5813e69b30a0c2cd0db9f30f70d72fd07 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Thu, 14 May 2020 15:22:26 -0700 Subject: [PATCH 21/25] Fixed reference to charts/global.md --- doc/advanced/external-redis/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/advanced/external-redis/index.md b/doc/advanced/external-redis/index.md index b7ee75ce41..dfb4cd465b 100644 --- a/doc/advanced/external-redis/index.md +++ b/doc/advanced/external-redis/index.md @@ -44,5 +44,5 @@ Redis operations across multiple Redis instances. This chart supports distributi those persistence classes to other Redis instances: `cache`, `queues`, `shared_state` and `actioncable`. More detailed information on configuring the chart for using multiple Redis -instances can be found in the [installation/deployment](../../chart/globals.md#multiple-redis-support) +instances can be found in the [installation/deployment](../../charts/globals.md#multiple-redis-support) documentation. -- GitLab From 851a89eac58297aba719437537f2fef7a280b403 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Fri, 15 May 2020 08:39:40 -0700 Subject: [PATCH 22/25] Added note that primary redis definition still needed --- doc/charts/globals.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/charts/globals.md b/doc/charts/globals.md index f6654d63d7..d16710c94d 100644 --- a/doc/charts/globals.md +++ b/doc/charts/globals.md @@ -310,9 +310,15 @@ Redis instances. | `.password.key` | String | | The `password.key` attribute for Redis defines the name of the key in the secret (below) that contains the password. | | `.password.secret` | String | | The `password.secret` attribute for Redis defines the name of the Kubernetes `Secret` to pull from. | +NOTE: **Note**: +The primary Redis definition is required as there are additional persistence + classes that have not been separated. + NOTE: **Note**: Each instance definition may also use Redis Sentinel support. Sentinel -configurations **are not shared**. Please refer to the [Sentinel configuration](#redis-sentinel-support). +configurations **are not shared** and needs to be specified for each +instance that uses Sentinels. Please refer to the [Sentinel configuration](#redis-sentinel-support) +for the attributes that are used to configure Sentinel servers. ## Configure Grafana integration -- GitLab From f7a8931cc8e5096007d10a38339fa4b2d39d191d Mon Sep 17 00:00:00 2001 From: Jason Plum Date: Fri, 15 May 2020 18:48:02 +0000 Subject: [PATCH 23/25] Apply suggestion to doc/advanced/external-redis/index.md --- doc/advanced/external-redis/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/advanced/external-redis/index.md b/doc/advanced/external-redis/index.md index dfb4cd465b..ade8004d58 100644 --- a/doc/advanced/external-redis/index.md +++ b/doc/advanced/external-redis/index.md @@ -44,5 +44,5 @@ Redis operations across multiple Redis instances. This chart supports distributi those persistence classes to other Redis instances: `cache`, `queues`, `shared_state` and `actioncable`. More detailed information on configuring the chart for using multiple Redis -instances can be found in the [installation/deployment](../../charts/globals.md#multiple-redis-support) +instances can be found in the [globals](../../charts/globals.md#multiple-redis-support) documentation. -- GitLab From d7761d8133e16e6702f8558d2917a5dd5840473e Mon Sep 17 00:00:00 2001 From: Jason Plum Date: Fri, 15 May 2020 18:48:51 +0000 Subject: [PATCH 24/25] Apply suggestion to doc/charts/gitlab/webservice/index.md --- doc/charts/gitlab/webservice/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/charts/gitlab/webservice/index.md b/doc/charts/gitlab/webservice/index.md index 847e37c1b8..6f4e070f8d 100644 --- a/doc/charts/gitlab/webservice/index.md +++ b/doc/charts/gitlab/webservice/index.md @@ -231,7 +231,7 @@ resources: ### Redis -The Redis documentation has been consolidated in the [installation/deployment](../../../installation/deployment.md#redis) +The Redis documentation has been consolidated in the [globals](../../charts/globals.md#multiple-redis-support) page. Please consult this page for the latest Redis configuration options. ### PostgreSQL -- GitLab From c1c1d32d35150eff89dae138d4f53ec6d86e57df Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Fri, 15 May 2020 19:15:20 +0000 Subject: [PATCH 25/25] Apply suggestion to doc/charts/gitlab/webservice/index.md --- doc/charts/gitlab/webservice/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/charts/gitlab/webservice/index.md b/doc/charts/gitlab/webservice/index.md index 6f4e070f8d..3fffd9b2e2 100644 --- a/doc/charts/gitlab/webservice/index.md +++ b/doc/charts/gitlab/webservice/index.md @@ -231,7 +231,7 @@ resources: ### Redis -The Redis documentation has been consolidated in the [globals](../../charts/globals.md#multiple-redis-support) +The Redis documentation has been consolidated in the [globals](../../globals.md#multiple-redis-support) page. Please consult this page for the latest Redis configuration options. ### PostgreSQL -- GitLab