feat(argo-cd): Add Probes for redis (#2400)
* feat(argo-cd): Add Probes for redis Signed-off-by: François Blondel <francois.blondel@diva-e.com> * fix: redis: move probes scripts from tpl file into configmap Signed-off-by: François Blondel <francois.blondel@diva-e.com> * Version Bump Signed-off-by: François Blondel <francois.blondel@diva-e.com> * feat: set Redis probes optionnal and disabled by default Signed-off-by: François Blondel <francois.blondel@diva-e.com> --------- Signed-off-by: François Blondel <francois.blondel@diva-e.com> Co-authored-by: François Blondel <francois.blondel@diva-e.com>
This commit is contained in:
parent
4a50afcc77
commit
5da598289d
5 changed files with 176 additions and 5 deletions
|
|
@ -72,6 +72,32 @@ spec:
|
|||
envFrom:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.redis.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
initialDelaySeconds: {{ .Values.redis.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.redis.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.redis.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.redis.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.redis.livenessProbe.failureThreshold }}
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- /health/redis_liveness.sh
|
||||
{{- end }}
|
||||
{{- if .Values.redis.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
initialDelaySeconds: {{ .Values.redis.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.redis.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.redis.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.redis.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.redis.readinessProbe.failureThreshold }}
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- /health/redis_readiness.sh
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: redis
|
||||
containerPort: {{ .Values.redis.containerPorts.redis }}
|
||||
|
|
@ -82,8 +108,10 @@ spec:
|
|||
securityContext:
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- with .Values.redis.volumeMounts }}
|
||||
volumeMounts:
|
||||
- mountPath: /health
|
||||
name: health
|
||||
{{- with .Values.redis.volumeMounts }}
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.redis.exporter.enabled }}
|
||||
|
|
@ -102,6 +130,28 @@ spec:
|
|||
- name: metrics
|
||||
containerPort: {{ .Values.redis.containerPorts.metrics }}
|
||||
protocol: TCP
|
||||
{{- if .Values.redis.exporter.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: {{ .Values.redis.containerPorts.metrics }}
|
||||
initialDelaySeconds: {{ .Values.redis.exporter.livenessProbe.initialDelaySeconds }}
|
||||
timeoutSeconds: {{ .Values.redis.exporter.livenessProbe.timeoutSeconds }}
|
||||
periodSeconds: {{ .Values.redis.exporter.livenessProbe.periodSeconds }}
|
||||
successThreshold: {{ .Values.redis.exporter.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.redis.exporter.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.redis.exporter.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: {{ .Values.redis.containerPorts.metrics }}
|
||||
initialDelaySeconds: {{ .Values.redis.exporter.readinessProbe.initialDelaySeconds }}
|
||||
timeoutSeconds: {{ .Values.redis.exporter.readinessProbe.timeoutSeconds }}
|
||||
periodSeconds: {{ .Values.redis.exporter.readinessProbe.periodSeconds }}
|
||||
successThreshold: {{ .Values.redis.exporter.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.redis.exporter.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{- toYaml .Values.redis.exporter.resources | nindent 10 }}
|
||||
{{- with .Values.redis.exporter.containerSecurityContext }}
|
||||
|
|
@ -139,8 +189,12 @@ spec:
|
|||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.redis.volumes }}
|
||||
volumes:
|
||||
- name: health
|
||||
configMap:
|
||||
name: {{ include "argo-cd.redis.fullname" . }}-health-configmap
|
||||
defaultMode: 0755
|
||||
{{- with .Values.redis.volumes }}
|
||||
{{- toYaml . | nindent 8}}
|
||||
{{- end }}
|
||||
{{- with .Values.redis.dnsConfig }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue