Skip to content

Commit

Permalink
feat: added minReadySeconds parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
mojixcoder committed Dec 10, 2023
1 parent 4dc90f3 commit 516835e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This repository contains Redis cluster helm charts that can survive pod restarts
`redis.port` | Redis server port | `6379`
`redis.bus` | Redis cluster bus port | `16379`
`redis.resources` | The resources of the redis container | `{}`
`redis.minReadySeconds` | minimum number of seconds for which a newly created Pod should be running and ready without any of its containers crashing, for it to be considered available | `10`
`cluster.init` | A boolean to specify whether the cluster should be initialized. (Can be false when cluster is already created and maybe you just want to change the resources of the cluster) | `true`
`cluster.master` | Number of master nodes | `3`
`cluster.replicas` | Number of replicas of each master | `1`
Expand Down
3 changes: 3 additions & 0 deletions templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ spec:
matchLabels: {{ include "redis-cluster.labels" . | nindent 6 }}
serviceName: {{ include "redis-cluster.name" . }}-headless
replicas: {{ include "redis-cluster.replicaCount" . }}
{{- if .Values.redis.minReadySeconds }}
minReadySeconds: {{ .Values.redis.minReadySeconds }}
{{- end }}
template:
metadata:
labels: {{ include "redis-cluster.labels" . | nindent 8 }}
Expand Down
5 changes: 3 additions & 2 deletions values.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
nameOverride: redis-cluster
fullnameOverride: redis-cluster
nameOverride: ""
fullnameOverride: ""

redis:
image: redis:7.2.3
port: 6379
bus: 16379
minReadySeconds: 0

cluster:
init: true
Expand Down

0 comments on commit 516835e

Please sign in to comment.