summaryrefslogtreecommitdiffstats
path: root/kubernetes/portal/charts/portal-cassandra/templates
diff options
context:
space:
mode:
authorMandeep Khinda <mandeep.khinda@amdocs.com>2018-04-24 03:06:11 +0000
committerMandeep Khinda <mandeep.khinda@amdocs.com>2018-04-24 03:09:27 +0000
commit99d802b0e65beedd6ee17b6b469363cd5f9491b3 (patch)
tree4d067d6242c344320fbaf4e366271c69c88ebafc /kubernetes/portal/charts/portal-cassandra/templates
parent8f72e1e58c389603efa0aa2ae178e1cf3218a2b7 (diff)
changing portal liveness/readiness probe
Inspired by aai-cassandra's stateful set Using nodetool instead of a port. Issue-ID: MUSIC-72 Change-Id: I877300d772c3357855756a9dcac6f148381615da Signed-off-by: Mandeep Khinda <mandeep.khinda@amdocs.com>
Diffstat (limited to 'kubernetes/portal/charts/portal-cassandra/templates')
-rw-r--r--kubernetes/portal/charts/portal-cassandra/templates/deployment.yaml18
1 files changed, 14 insertions, 4 deletions
diff --git a/kubernetes/portal/charts/portal-cassandra/templates/deployment.yaml b/kubernetes/portal/charts/portal-cassandra/templates/deployment.yaml
index cfd3ac507c..920efbcd49 100644
--- a/kubernetes/portal/charts/portal-cassandra/templates/deployment.yaml
+++ b/kubernetes/portal/charts/portal-cassandra/templates/deployment.yaml
@@ -42,14 +42,20 @@ spec:
- containerPort: {{ .Values.service.internalPort5 }}
{{ if eq .Values.liveness.enabled true }}
livenessProbe:
- tcpSocket:
- port: {{ .Values.service.internalPort }}
+ exec:
+ command:
+ - /bin/bash
+ - -c
+ - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.liveness.periodSeconds }}
{{ end }}
readinessProbe:
- tcpSocket:
- port: {{ .Values.service.internalPort }}
+ exec:
+ command:
+ - /bin/bash
+ - -c
+ - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.readiness.periodSeconds }}
env:
@@ -57,6 +63,10 @@ spec:
value: "{{ .Values.config.cassandraUsername }}"
- name: CASSPASS
value: "{{ .Values.config.cassandraPassword }}"
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
volumeMounts:
- mountPath: /etc/localtime
name: localtime