Merge "[AAI] Make aai log level configurable"
[oom.git] / kubernetes / common / etcd / templates / statefulset.yaml
index 48c8b6d..722a27d 100644 (file)
 */}}
 apiVersion: apps/v1
 kind: StatefulSet
-metadata:
-  name: {{ include "common.fullname" .  }}
-  labels:
-    heritage: "{{ .Release.Service }}"
-    release: "{{ include "common.release" . }}"
-    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
-    app: {{ include "common.name" . }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
 spec:
-  serviceName: {{ include "common.servicename" .}}
+  selector: {{- include "common.selectors" . | nindent 4 }}
+  serviceName: {{ include "common.servicename" . }}
   replicas: {{ .Values.replicaCount }}
-  selector:
-    matchLabels:
-      app: {{ include "common.name" .  }}
   template:
-    metadata:
-      labels:
-        heritage: "{{ .Release.Service }}"
-        release: "{{ include "common.release" . }}"
-        chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
-        app: {{ include "common.name" . }}
+    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
 {{- if .Values.affinity }}
       affinity:
@@ -48,6 +35,7 @@ spec:
       tolerations:
 {{ toYaml .Values.tolerations | indent 8 }}
 {{- end }}
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       containers:
       - name: {{ include "common.name" .  }}
         image: {{ include "repositoryGenerator.googleK8sRepository" . }}/{{ .Values.image }}
@@ -65,15 +53,14 @@ spec:
           periodSeconds: {{ .Values.liveness.periodSeconds }}
           timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
         {{ end -}}
-        resources:
-{{ include "common.resources" . | indent 10 }}
+        resources: {{ include "common.resources" . | nindent 10 }}
         env:
         - name: INITIAL_CLUSTER_SIZE
           value: {{ .Values.replicaCount | quote }}
         - name: SET_NAME
           value: {{ include "common.fullname" . }}
         - name: SERVICE_NAME
-          value: {{ include "common.servicename" . }}
+          value: {{ include "common.servicename" . }}.{{ include "common.namespace" . }}.svc.{{ .Values.global.clusterName }}
 {{- if .Values.extraEnv }}
 {{ toYaml .Values.extraEnv | indent 8 }}
 {{- end }}