X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Faai%2Fcharts%2Faai-cassandra%2Ftemplates%2Fstatefulset.yaml;h=bd62c5600164f0f0ae675c2421840e3bc3afdffd;hb=714f651dd19530510b74e29aa4a5ab084883d0dd;hp=aa3482d293e09df189b947589a539de08647ae5a;hpb=f2c835390a34a0595f2361cb407110d55095c377;p=oom.git diff --git a/kubernetes/aai/charts/aai-cassandra/templates/statefulset.yaml b/kubernetes/aai/charts/aai-cassandra/templates/statefulset.yaml index aa3482d293..bd62c56001 100644 --- a/kubernetes/aai/charts/aai-cassandra/templates/statefulset.yaml +++ b/kubernetes/aai/charts/aai-cassandra/templates/statefulset.yaml @@ -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: @@ -9,7 +23,7 @@ metadata: release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: - serviceName: {{ include "common.fullname" . }} + serviceName: {{ include "common.servicename" . }} replicas: {{ .Values.replicaCount }} podManagementPolicy: {{ .Values.podManagementPolicy }} updateStrategy: @@ -29,7 +43,6 @@ spec: - containerPort: {{ .Values.service.internalPort }} - containerPort: {{ .Values.service.internalPort2 }} - containerPort: {{ .Values.service.internalPort3 }} - - containerPort: {{ .Values.service.internalPort4 }} {{- if eq .Values.liveness.enabled true }} livenessProbe: exec: @@ -47,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: @@ -60,7 +73,7 @@ spec: - name: HEAP_NEWSIZE value: {{ .Values.config.heap.min }} - name: CASSANDRA_SEEDS - value: "{{- range $i, $e := until $seed_size }}{{ template "common.fullname" $global }}-{{ $i }},{{- end }}" + value: "{{- range $i, $e := until $seed_size }}{{ template "common.fullname" $global }}-{{ $i }}.{{ include "common.servicename" $global }},{{- end }}" - name: JVM_OPTS value: {{ .Values.config.jvmOpts | quote }} - name: CASSANDRA_CLUSTER_NAME @@ -77,9 +90,9 @@ spec: fieldPath: status.podIP volumeMounts: - name: cassandra-data - mountPath: /var/lib/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 }} @@ -112,4 +125,8 @@ spec: resources: requests: storage: {{ .Values.persistence.size | quote }} + selector: + matchLabels: + app: {{ include "common.name" . }} + release: "{{ .Release.Name }}" {{- end }}