*/}}
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:
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
+ {{- include "common.imagePullSecrets" . | nindent 6 }}
containers:
- name: {{ include "common.name" . }}
image: {{ include "repositoryGenerator.googleK8sRepository" . }}/{{ .Values.image }}
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 }}