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

[bitnami/redis-cluster] add support to disable persistence and add custom config #13545

Merged
merged 1 commit into from
Nov 17, 2022
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 bitnami/redis-cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ name: redis-cluster
sources:
- https://github.com/bitnami/containers/tree/main/bitnami/redis
- http://redis.io/
version: 8.2.7
version: 8.3.0
2 changes: 2 additions & 0 deletions bitnami/redis-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ The command removes all the Kubernetes components associated with the chart and
| `service.externalTrafficPolicy` | Service external traffic policy | `Cluster` |
| `service.sessionAffinity` | Session Affinity for Kubernetes service, can be "None" or "ClientIP" | `None` |
| `service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` |
| `persistence.enabled` | Enable persistence on Redis® | `true` |
| `persistence.path` | Path to mount the volume at, to use other images Redis® images. | `/bitnami/redis/data` |
| `persistence.subPath` | The subdirectory of the volume to mount to, useful in dev environments and one PV for multiple services | `""` |
| `persistence.storageClass` | Storage class of backing PVC | `""` |
Expand Down Expand Up @@ -192,6 +193,7 @@ The command removes all the Kubernetes components associated with the chart and
| `redis.sidecars` | Extra sidecar containers to add to the deployment | `[]` |
| `redis.podLabels` | Additional labels for Redis® pod | `{}` |
| `redis.priorityClassName` | Redis® Master pod priorityClassName | `""` |
| `redis.defaultConfigOverride` | Optional default Redis® configuration for the nodes | `""` |
| `redis.configmap` | Additional Redis® configuration for the nodes | `""` |
| `redis.extraEnvVars` | An array to add extra environment variables | `[]` |
| `redis.extraEnvVarsCM` | ConfigMap with extra environment variables | `""` |
Expand Down
5 changes: 5 additions & 0 deletions bitnami/redis-cluster/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ metadata:
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
{{- if .Values.redis.defaultConfigOverride }}
redis-default.conf: |-
{{- include "common.tplvalues.render" (dict "value" .Values.redis.defaultConfigOverride "context" $) | nindent 4 }}
{{- else }}
redis-default.conf: |-
# Redis configuration file example.
#
Expand Down Expand Up @@ -2290,6 +2294,7 @@ data:
# to suppress
#
# ignore-warnings ARM64-COW-BUG
{{- end }}
{{- if .Values.redis.configmap }}
{{- include "common.tplvalues.render" (dict "value" .Values.redis.configmap "context" $) | nindent 4 }}
{{- end }}
6 changes: 6 additions & 0 deletions bitnami/redis-cluster/templates/redis-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,11 @@ spec:
secretName: {{ include "redis-cluster.tlsSecretName" . }}
defaultMode: 256
{{- end }}
{{- if not .Values.persistence.enabled }}
- name: redis-data
emptyDir: {}
{{- end }}
{{- if .Values.persistence.enabled }}
volumeClaimTemplates:
- metadata:
name: redis-data
Expand Down Expand Up @@ -449,4 +454,5 @@ spec:
{{- toYaml .Values.persistence.matchExpressions | nindent 12 }}
{{- end -}}
{{- end }}
{{- end }}
{{- end }}
10 changes: 10 additions & 0 deletions bitnami/redis-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,11 @@ service:
## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
##
persistence:
## @param persistence.enabled Enable persistence on Redis®
## If enabled, nodes are using Persistent Volume Claims
## If disabled, an emptyDir volume is used
##
enabled: true
## @param persistence.path Path to mount the volume at, to use other images Redis® images.
##
path: /bitnami/redis/data
Expand Down Expand Up @@ -461,6 +466,11 @@ redis:
## @param redis.priorityClassName Redis® Master pod priorityClassName
##
priorityClassName: ""
## @param redis.defaultConfigOverride Optional default Redis® configuration for the nodes
## If not set, the default Redis configuration from the chart is used
## ref: https://redis.io/topics/config
##
defaultConfigOverride: ""
## @param redis.configmap Additional Redis® configuration for the nodes
## ref: https://redis.io/topics/config
##
Expand Down