Merge "Set aai&music Cassandra readiness periodSeconds"
[oom.git] / kubernetes / aai / charts / aai-cassandra / templates / statefulset.yaml
index 1a00b3c..bd62c56 100644 (file)
@@ -1,3 +1,17 @@
+# Copyright © 2018 Amdocs, Bell Canada, AT&T
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 apiVersion: apps/v1beta1
 kind: StatefulSet
 metadata:
@@ -46,7 +60,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:
@@ -78,7 +92,7 @@ spec:
           - name: cassandra-data
             mountPath: /var/lib/cassandra
         resources:
-{{ toYaml .Values.resources | indent 10 }}
+{{ include "common.resources" . | indent 10 }}
       {{- if .Values.nodeSelector }}
       nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 8 }}
@@ -111,4 +125,8 @@ spec:
         resources:
           requests:
             storage: {{ .Values.persistence.size | quote }}
+        selector:
+          matchLabels:
+            app: {{ include "common.name" . }}
+            release: "{{ .Release.Name }}"
   {{- end }}