Set aai&music Cassandra readiness periodSeconds
[oom.git] / kubernetes / common / music / charts / music-cassandra / templates / statefulset.yaml
index 103b1df..ae5f7c5 100644 (file)
@@ -74,7 +74,7 @@ spec:
             - -c
             - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
-          timeoutSeconds: {{ .Values.liveness.periodSeconds }}
+          periodSeconds: {{ .Values.readiness.periodSeconds }}
         lifecycle:
           preStop:
             exec:
@@ -103,7 +103,7 @@ spec:
               fieldRef:
                 fieldPath: status.podIP
         volumeMounts:
-          - name: cassandra-data
+          - name: {{ template "common.name" . }}-data
             mountPath: /var/lib/cassandra
         resources:
 {{ toYaml .Values.resources | indent 10 }}
@@ -112,12 +112,12 @@ spec:
         hostPath:
           path: /etc/localtime
   {{- if not .Values.persistence.enabled }}
-      - name: cassandra-data
+      - name: {{ template "common.name" . }}-data
         emptyDir: {}
   {{- else }}
   volumeClaimTemplates:
     - metadata:
-        name: cassandra-data
+        name: {{ template "common.name" . }}-data
         labels:
           app: {{ template "common.fullname" . }}
           chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
@@ -132,4 +132,10 @@ spec:
         resources:
           requests:
             storage: {{ .Values.persistence.size | quote }}
+        selector:
+          matchLabels:
+            app: {{ include "common.name" . }}
+            release: "{{ .Release.Name }}"
   {{- end }}
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"