Skip to content

Commit

Permalink
[charts/redis-ha] Allows changes on command/args/env redis container (#…
Browse files Browse the repository at this point in the history
…238)

* Allows changes on command/args/env redis container

Signed-off-by: Benoit Sobrie <[email protected]>

* Bumped version

Signed-off-by: Benoit Sobrie <[email protected]>

* Allows custom command/args/env on redis container

Signed-off-by: Benoit Sobrie <[email protected]>

* Bumped version

Signed-off-by: Benoit Sobrie <[email protected]>

* Upgrade kind action

Signed-off-by: Aaron Layfield <[email protected]>

---------

Signed-off-by: Benoit Sobrie <[email protected]>
Signed-off-by: Aaron Layfield <[email protected]>
Co-authored-by: Aaron Layfield <[email protected]>
  • Loading branch information
Benoitsob and DandyDeveloper committed Apr 7, 2024
1 parent 1f89802 commit 6bf9e46
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
fi
- name: Create kind cluster
uses: helm/kind-action@v1.2.0
uses: helm/kind-action@v1.9.0
if: steps.list-changed.outputs.changed == 'true'
with:
node_image: "kindest/node:${{ matrix.kubernetesVersion }}"
Expand Down
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.26.4
version: 4.26.5
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
3 changes: 3 additions & 0 deletions charts/redis-ha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ The following table lists the configurable parameters of the Redis chart and the
| `serviceLabels` | Labels to set on Redis HA service | `{}` |
| `rbac.create` | Create and use RBAC resources | `true` |
| `redis.port` | Port to access the redis service | `6379` |
| `redis.customCommand` | Allows overriding the redis container command | `[]` |
| `redis.customArgs` | Allows overriding the redis container arguments | `[]` |
| `redis.envFrom` | Load environment variables from ConfigMap/Secret |``|
| `redis.tlsPort` | TLS Port to access the redis service |``|
| `redis.tlsReplication` | Configures redis with tls-replication parameter, if true sets "tls-replication yes" in redis.conf |``|
| `redis.authClients` | It is possible to disable client side certificates authentication when "authClients" is set to "no" |``|
Expand Down
16 changes: 14 additions & 2 deletions charts/redis-ha/templates/redis-ha-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,17 @@ spec:
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- redis-server
{{- if .Values.redis.customCommand }}
{{ toYaml .Values.redis.customCommand | indent 10 }}
{{- else }}
- redis-server
{{- end }}
args:
- /data/conf/redis.conf
{{- if .Values.redis.customArgs }}
{{ toYaml .Values.redis.customArgs | indent 10 }}
{{- else }}
- /data/conf/redis.conf
{{- end }}
securityContext: {{ toYaml .Values.containerSecurityContext | nindent 10 }}
{{- if .Values.auth }}
env:
Expand All @@ -267,6 +275,10 @@ spec:
{{- end }}
key: {{ .Values.authKey }}
{{- end }}
{{- if .Values.redis.envFrom }}
envFrom:
{{ toYaml .Values.redis.envFrom | indent 10 }}
{{- end }}
livenessProbe:
initialDelaySeconds: {{ .Values.redis.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.redis.livenessProbe.periodSeconds }}
Expand Down
9 changes: 9 additions & 0 deletions charts/redis-ha/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,15 @@ redis:
port: 6379
masterGroupName: "mymaster" # must match ^[\\w-\\.]+$) and can be templated

customCommand: []
# - bash
customArgs: []
# - "custom-startup.sh"

envFrom: []
# - secretRef:
# name: add-env-secret

## Configures redis with tls-port parameter
# tlsPort: 6385

Expand Down

0 comments on commit 6bf9e46

Please sign in to comment.