Merge "[DCAEMOD] Uses new tpls for repos / images"
[oom.git] / kubernetes / common / etcd / templates / statefulset.yaml
index 96cda89..f5592bd 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 # Copyright © 2019 Intel Corporation Inc
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,7 +12,8 @@
 # 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
+*/}}
+apiVersion: apps/v1
 kind: StatefulSet
 metadata:
   name: {{ include "common.fullname" .  }}
@@ -23,6 +25,9 @@ metadata:
 spec:
   serviceName: {{ include "common.servicename" .}}
   replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.name" .  }}
   template:
     metadata:
       labels:
@@ -45,7 +50,7 @@ spec:
 {{- end }}
       containers:
       - name: {{ include "common.fullname" .  }}
-        image: "{{ .Values.repository }}/{{ .Values.image }}"
+        image: {{ include "repositoryGenerator.googleK8sRepository" . }}/{{ .Values.image }}
         imagePullPolicy: "{{ .Values.pullPolicy }}"
         ports:
         - containerPort: {{ .Values.service.peerInternalPort }}