Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redis-ha: add custom command and args for sentinel container #277

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/redis-ha/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ keywords:
- redis
- keyvalue
- database
version: 4.27.0
version: 4.27.1
appVersion: 7.2.4
description: This Helm chart provides a highly available Redis implementation with a master/slave configuration and uses Sentinel sidecars for failover management
icon: https://upload.wikimedia.org/wikipedia/en/thumb/6/6b/Redis_Logo.svg/1200px-Redis_Logo.svg.png
Expand Down
2 changes: 2 additions & 0 deletions charts/redis-ha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ The following table lists the configurable parameters of the Redis chart and the
| `sentinel.password` | A password that configures a `requirepass` in the conf parameters (Requires `sentinel.auth: enabled`) |``|
| `sentinel.existingSecret` | An existing secret containing a key defined by `sentinel.authKey` that configures `requirepass` in the conf parameters (Requires `sentinel.auth: enabled`, cannot be used in conjunction with `.Values.sentinel.password`) |``|
| `sentinel.authKey` | The key holding the sentinel password in an existing secret. | `sentinel-password` |
| `sentinel.customCommand` | Allows overriding the sentinel container command | `[]` |
| `sentinel.customArgs` | Allows overriding the sentinel container arguments | `[]` |
| `sentinel.quorum` | Minimum number of servers necessary to maintain quorum | `2` |
| `sentinel.config` | Valid sentinel config options in this section will be applied as config options to each sentinel (see below) | see values.yaml |
| `sentinel.customConfig` | Allows for custom sentinel.conf files to be applied. If this is used then `sentinel.config` is ignored |``|
Expand Down
8 changes: 8 additions & 0 deletions charts/redis-ha/templates/redis-ha-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,17 @@ spec:
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
{{- if .Values.sentinel.customCommand }}
{{ toYaml .Values.sentinel.customCommand | indent 10 }}
{{- else }}
- redis-sentinel
{{- end }}
args:
{{- if .Values.sentinel.customArgs }}
{{ toYaml .Values.sentinel.customArgs | indent 10 }}
{{- else }}
- /data/conf/sentinel.conf
{{- end }}
securityContext: {{ toYaml .Values.containerSecurityContext | nindent 10 }}
{{- if or .Values.auth .Values.sentinel.auth}}
env:
Expand Down
3 changes: 3 additions & 0 deletions charts/redis-ha/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,9 @@ sentinel:
## Defines the key holding the sentinel password in existing secret.
authKey: sentinel-password

customCommand: []
customArgs: []

# liveness probe parameters for sentinel container
livenessProbe:
initialDelaySeconds: 30
Expand Down
Loading