Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Commit e476297

Browse files
Merge pull request #120 from Normo/119-redis-sentinel-password
feat: configure redis sentinel authentication
2 parents 23c971b + 9366371 commit e476297

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,25 @@ use_internal_redis: 'false'
238238

239239
#### Password to Authenticate Redis Services within Cluster
240240

241-
It is recommended to enable authentication for Redis Master, Redis Replica and
242-
Redis Sentinel by providing the respective password:
241+
It is recommended to enable authentication for Redis Master and Redis Replicas
242+
by providing the respective password:
243243

244244
```yaml
245245
redis_password: 'changeme'
246246
```
247247

248248
_Caution: You have to use your own private and encrypted password here._
249249

250+
#### Password to Authenticate Redis Sentinels
251+
252+
Support for Redis Sentinel password authentication was introduced in GitLab 16.1.
253+
254+
```yaml
255+
gitlab_redis_sentinel_password: 'changeme'
256+
```
257+
258+
_Caution: You have to use your own private and encrypted password here._
259+
250260
#### Reference Name of the Redis Cluster
251261

252262
Choose a name of the Redis Cluster for references:

molecule/default/molecule.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ provisioner:
3030
host_vars:
3131
instancegitlab:
3232
gitlab_edition: "gitlab-ce"
33+
gitlab_ip_range: "0.0.0.0/0"
3334
gitlab_additional_configurations:
3435
- package:
3536
- key: "modify_kernel_parameters"

templates/gitlab.rb.j2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ gitlab_rails['redis_sentinels'] = [
2424
{ "host" => "{{ redis_sentinel_ip }}", "port" => "{{ redis_sentinel_port }}" },
2525
{% endfor %}
2626
]
27-
gitlab_rails['monitoring_whitelist'] = ["{{ gitlab_ip_range }}"]
27+
{% if gitlab_redis_sentinel_password | default('') | length %}
28+
gitlab_rails['redis_sentinels_password'] = "{{ gitlab_redis_sentinel_password }}"
29+
{% endif %}
2830
{% endif %}
31+
gitlab_rails['monitoring_whitelist'] = ["{{ gitlab_ip_range }}"]
2932

3033
{% if use_internal_gitaly %}
3134
git_data_dirs({"default" => {"path" => "{{ gitlab_git_data_dir }}"} })

0 commit comments

Comments
 (0)