From 00e9f164cb630038c5eba38144ac907a563b5195 Mon Sep 17 00:00:00 2001 From: groundhog2k <10630407+groundhog2k@users.noreply.github.com> Date: Sun, 24 Jan 2021 12:10:16 +0100 Subject: [PATCH] Fixed issues #192, #191, #169 for Redis (#194) * Fixed issues #192, #191, #169 forRabbitMQ * Fixed issues #192, #191, #169 for Redis --- charts/redis/Chart.yaml | 2 +- charts/redis/README.md | 5 +++-- charts/redis/templates/statefulset.yaml | 17 ++++++++++++++--- charts/redis/values.yaml | 6 ++++++ 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/charts/redis/Chart.yaml b/charts/redis/Chart.yaml index b36edea3..9709ee80 100644 --- a/charts/redis/Chart.yaml +++ b/charts/redis/Chart.yaml @@ -8,7 +8,7 @@ maintainers: - name: groundhog2k # This is the chart version -version: 0.2.6 +version: 0.2.7 # This is the version number of the application being deployed. appVersion: "6.0.10" diff --git a/charts/redis/README.md b/charts/redis/README.md index bb27dfa7..76e6431f 100644 --- a/charts/redis/README.md +++ b/charts/redis/README.md @@ -1,6 +1,6 @@ # Redis -   +   A Helm chart for Redis on Kubernetes @@ -56,6 +56,8 @@ $ helm uninstall my-release | imagePullSecrets | list | `[]` | Image pull secrets | | livenessProbe | object | `see values.yaml` | Liveness probe configurationm | | readinessProbe | object | `see values.yaml` | Readiness probe configuration | +| customLivenessProbe | object | `{}` | Custom liveness probe (overwrites default liveness probe configuration) | +| customReadinessProbe | object | `{}` | Custom readiness probe (overwrites default readiness probe configuration) | | resources | object | `{}` | Resource limits and requests | | nodeSelector | object | `{}` | Deployment node selector | | podAnnotations | object | `{}` | Additional pod annotations | @@ -92,5 +94,4 @@ $ helm uninstall my-release | Key | Type | Default | Description | |-----|------|---------|-------------| -| arguments | string | `nil` | Arguments for the container entrypoint process | | redisConfig | string | `nil` | Custom redis.conf | diff --git a/charts/redis/templates/statefulset.yaml b/charts/redis/templates/statefulset.yaml index a50d84df..3c964f9c 100644 --- a/charts/redis/templates/statefulset.yaml +++ b/charts/redis/templates/statefulset.yaml @@ -12,10 +12,11 @@ spec: {{- include "redis.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} annotations: + checksum/customconfig: {{ include (print $.Template.BasePath "/customconfig.yaml") . | sha256sum }} + {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} labels: {{- include "redis.selectorLabels" . | nindent 8 }} spec: @@ -40,7 +41,11 @@ spec: - name: redis containerPort: 6379 protocol: TCP - {{- if .Values.livenessProbe.enabled }} + {{- if .Values.customLivenessProbe }} + livenessProbe: + {{- toYaml .Values.customLivenessProbe | nindent 12 }} + {{- else }} + {{- if .Values.livenessProbe.enabled }} livenessProbe: exec: command: @@ -55,6 +60,11 @@ spec: periodSeconds: {{ .periodSeconds }} {{- end }} {{- end }} + {{- end }} + {{- if .Values.customReadinessProbe }} + readinessProbe: + {{- toYaml .Values.customReadinessProbe | nindent 12 }} + {{- else }} {{- if .Values.readinessProbe.enabled }} readinessProbe: exec: @@ -70,6 +80,7 @@ spec: periodSeconds: {{ .periodSeconds }} {{- end }} {{- end }} + {{- end }} {{- with .Values.resources }} resources: {{- toYaml . | nindent 12 }} diff --git a/charts/redis/values.yaml b/charts/redis/values.yaml index ff7b428a..ee01f4bf 100644 --- a/charts/redis/values.yaml +++ b/charts/redis/values.yaml @@ -65,6 +65,9 @@ tolerations: [] affinity: {} +## Custom liveness probe (overwrites default liveness probe) +customLivenessProbe: {} + ## Default liveness probe livenessProbe: enabled: true @@ -74,6 +77,9 @@ livenessProbe: successThreshold: 1 periodSeconds: 10 +## Custom readiness probe (overwrites default readiness probe) +customReadinessProbe: {} + ## Default readiness probe readinessProbe: enabled: true -- GitLab