X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fcommon%2Fmariadb-galera%2Ftemplates%2Fstatefulset.yaml;h=8b2aafbd49cbd773c08eba2f3f8c592affb6ef60;hb=1af5fbeb9f212a544a3230f0ad1a7a7bfd990338;hp=b8ba75e52c824f2971d2845fbb3c0c322b0b4dc3;hpb=1e5876cf4eb41747186fd2eb626005c6ca88e7d1;p=oom.git diff --git a/kubernetes/common/mariadb-galera/templates/statefulset.yaml b/kubernetes/common/mariadb-galera/templates/statefulset.yaml index b8ba75e52c..8b2aafbd49 100644 --- a/kubernetes/common/mariadb-galera/templates/statefulset.yaml +++ b/kubernetes/common/mariadb-galera/templates/statefulset.yaml @@ -1,3 +1,17 @@ +# Copyright © 2018 Amdocs, Bell Canada +# +# 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: {{ .Values.service.name }} replicas: {{ .Values.replicaCount }} template: metadata: @@ -34,8 +48,8 @@ spec: imagePullSecrets: - name: {{ include "common.namespace" . }}-docker-registry-key containers: - - name: {{ include "common.fullname" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + - name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy | quote}} env: - name: POD_NAMESPACE @@ -59,13 +73,13 @@ spec: key: db-root-password ports: - containerPort: {{ .Values.service.internalPort }} - name: {{ .Values.service.name }} + name: {{ .Values.service.portName }} - containerPort: {{ .Values.service.sstPort }} - name: {{ .Values.service.sstName }} + name: {{ .Values.service.sstPortName }} - containerPort: {{ .Values.service.replicationPort }} name: {{ .Values.service.replicationName }} - containerPort: {{ .Values.service.istPort }} - name: {{ .Values.service.istName }} + name: {{ .Values.service.istPortName }} readinessProbe: exec: command: @@ -93,10 +107,9 @@ spec: {{- if .Values.persistence.enabled }} - mountPath: /var/lib/mysql name: {{ include "common.fullname" . }}-data - subPath: data initContainers: - name: mariadb-galera-prepare - image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.imageInit }} + image: "{{ include "common.repository" . }}/{{ .Values.imageInit }}" command: ["sh", "-c", "chown -R 27:27 /var/lib/mysql"] volumeMounts: - name: {{ include "common.fullname" . }}-data @@ -104,16 +117,13 @@ spec: volumeClaimTemplates: - metadata: name: {{ include "common.fullname" . }}-data - annotations: - {{- if .Values.persistence.storageClass }} - volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }} - {{- else }} - volume.alpha.kubernetes.io/storage-class: default - {{- end }} + labels: + name: {{ include "common.fullname" . }} spec: accessModes: - {{ .Values.persistence.accessMode | quote }} + storageClassName: {{ include "common.fullname" . }}-data resources: requests: storage: {{ .Values.persistence.size | quote }} -{{- end }} \ No newline at end of file +{{- end }}