X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fcommon%2Fmariadb-galera%2Ftemplates%2Fstatefulset.yaml;h=20a03499bbe129191cca98994bf2c66ca48295c4;hb=a859647740e19b62c44244e256c48a8847900259;hp=ed7e1fc578f132cd7f9094203fb1e6e0c6d79db0;hpb=df11cd53bffd239887ec4a406dc5281aa217b2ca;p=oom.git diff --git a/kubernetes/common/mariadb-galera/templates/statefulset.yaml b/kubernetes/common/mariadb-galera/templates/statefulset.yaml index ed7e1fc578..20a03499bb 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,7 +48,7 @@ spec: imagePullSecrets: - name: {{ include "common.namespace" . }}-docker-registry-key containers: - - name: {{ include "common.fullname" . }} + - name: {{ include "common.name" . }} image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy | quote}} env: @@ -93,7 +107,6 @@ spec: {{- if .Values.persistence.enabled }} - mountPath: /var/lib/mysql name: {{ include "common.fullname" . }}-data - subPath: data initContainers: - name: mariadb-galera-prepare image: "{{ include "common.repository" . }}/{{ .Values.imageInit }}" @@ -104,15 +117,12 @@ 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 }}