Skip to content
Snippets Groups Projects
Commit b1e2febc authored by Edward Hicks's avatar Edward Hicks :8ball:
Browse files

added readiness checks to use redis' ping/pong functionality. minor

security enhancement to the sentinels
parent cca03744
No related branches found
No related tags found
No related merge requests found
apiVersion: v1
name: osuredis
version: 1.0.7
version: 1.0.8
description: "Helm chart for deploying one of the OCIO Middleware's standard Redis instances"
keywords:
- "redis"
......
......@@ -3,9 +3,11 @@ logfile /data/sentinel.log
protected-mode no
dir /data
port 26379
sentinel deny-scripts-reconfig yes
#sentinel announce-ip osuredis-[[APPNAME]]-[[NODEID]].[[NAMESPACE]].svc.cluster.local
sentinel monitor [[APPNAME]] osuredis-[[APPNAME]]-0.[[NAMESPACE]].svc.cluster.local 6379 2
sentinel auth-pass [[APPNAME]] [[PASSWORD]]
sentinel down-after-milliseconds [[APPNAME]] 5000
sentinel failover-timeout [[APPNAME]] 10000
sentinel auth-pass [[APPNAME]] [[PASSWORD]]
#sentinel announce-ip osuredis-[[APPNAME]]-[[NODEID]].[[NAMESPACE]].svc.cluster.local
......@@ -57,7 +57,7 @@ spec:
port: 6379
resources:
{{- toYaml .Values.proxy.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
......
......@@ -79,12 +79,33 @@ spec:
- name: "persistent-data"
mountPath: "/data"
livenessProbe:
initialDelaySeconds: 300
periodSeconds: 30
initialDelaySeconds: 10
periodSeconds: 60
timeoutSeconds: 10
failureThreshold: 3
tcpSocket:
port: 6379
readinessProbe:
initialDelaySeconds: 10
periodSeconds: 60
timeoutSeconds: 10
exec:
command:
- "redis-cli"
- "-a"
- "{{.Values.appPassword}}"
- "PING"
- "|"
- "tr"
- "-d"
- "[:space:]"
- "|"
- "xargs"
- "-n1"
- "-r"
- "test"
- "PONG"
- "="
resources:
{{- toYaml .Values.redis.resources | nindent 12 }}
- name: "sentinel"
......@@ -101,15 +122,36 @@ spec:
- name: "persistent-data"
mountPath: "/data"
livenessProbe:
initialDelaySeconds: 300
periodSeconds: 30
initialDelaySeconds: 10
periodSeconds: 60
timeoutSeconds: 10
failureThreshold: 3
tcpSocket:
port: 26379
readinessProbe:
initialDelaySeconds: 10
periodSeconds: 60
timeoutSeconds: 10
exec:
command:
- "redis-cli"
- "-p"
- "26379"
- "PING"
- "|"
- "tr"
- "-d"
- "[:space:]"
- "|"
- "xargs"
- "-n1"
- "-r"
- "test"
- "PONG"
- "="
resources:
{{- toYaml .Values.sentinel.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment