@@ -9,7 +9,7 @@ metadata:
99 namespace : {{ .Release.Namespace }}
1010 labels :
1111 {{- include "cluster.labels" . | nindent 4 }}
12- {{- with .Values.cockroachdb.crdbCluster.podLabels }}
12+ {{- with .Values.cockroachdb.crdbCluster.podTemplate.metadata.labels }}
1313 {{- toYaml . | nindent 4 }}
1414 {{- end }}
1515 {{- with .Values.k8s.labels }}
@@ -59,57 +59,18 @@ spec:
5959 {{- with .Values.cockroachdb.crdbCluster.walFailoverSpec }}
6060 walFailoverSpec : {{- toYaml . | nindent 8 }}
6161 {{- end }}
62- env :
63- - name : GODEBUG
64- value : {{ include "godebugList" . }}
65- {{- with .Values.cockroachdb.crdbCluster.env }}
66- {{- toYaml . | nindent 8 }}
67- {{- end }}
68- {{- with .Values.cockroachdb.crdbCluster.topologySpreadConstraints }}
69- topologySpreadConstraints : {{- toYaml . | nindent 8 }}
70- {{- end }}
71- {{- if .Values.cockroachdb.crdbCluster.terminationGracePeriod }}
72- terminationGracePeriod : {{ .Values.cockroachdb.crdbCluster.terminationGracePeriod }}
73- {{- end }}
74- podLabels :
75- app.kubernetes.io/name : {{ template "cockroachdb.name" . }}
76- app.kubernetes.io/instance : {{ .Release.Name | quote }}
77- {{- with .Values.cockroachdb.crdbCluster.podLabels }}
78- {{- toYaml . | nindent 8 }}
79- {{- end }}
80- podAnnotations :
81- helm.sh/restartedAt : {{ .Values.cockroachdb.crdbCluster.timestamp | quote }}
82- {{- with .Values.cockroachdb.crdbCluster.podAnnotations }}
83- {{- toYaml . | nindent 8 }}
84- {{- end }}
85- {{- with .Values.cockroachdb.crdbCluster.resources }}
86- resourceRequirements : {{- toYaml . | nindent 8 }}
87- {{- end }}
8862 {{- with .Values.cockroachdb.crdbCluster.localityLabels }}
8963 localityLabels : {{- toYaml . | nindent 8 }}
9064 {{- end }}
9165 {{- with .Values.cockroachdb.crdbCluster.localityMappings }}
9266 localityMappings : {{- toYaml . | nindent 8 }}
9367 {{- end }}
94- {{- with .Values.cockroachdb.crdbCluster.tolerations }}
95- tolerations : {{- toYaml . | nindent 8 }}
96- {{- end }}
97- {{- with .Values.cockroachdb.crdbCluster.nodeSelector }}
98- nodeSelector : {{- toYaml . | nindent 8 }}
99- {{- end }}
100- {{- with .Values.cockroachdb.crdbCluster.affinity }}
101- affinity : {{- toYaml . | nindent 8 }}
102- {{- end }}
103- serviceAccountName : {{ include "cockroachdb.serviceAccount.name" . }}
10468 {{- if .Values.cockroachdb.crdbCluster.loggingConfigMapName }}
10569 loggingConfigMapName : {{ .Values.cockroachdb.crdbCluster.loggingConfigMapName }}
10670 {{- end }}
10771 {{- with .Values.cockroachdb.crdbCluster.loggingConfigVars }}
10872 loggingConfigVars : {{- toYaml . | nindent 8 }}
10973 {{- end }}
110- {{- with .Values.cockroachdb.crdbCluster.sideCars }}
111- sideCars : {{- toYaml . | nindent 8 }}
112- {{- end }}
11374 {{- if .Values.cockroachdb.crdbCluster.service.ports.grpc.port }}
11475 grpcPort : {{ .Values.cockroachdb.crdbCluster.service.ports.grpc.port }}
11576 {{- end }}
@@ -123,7 +84,139 @@ spec:
12384 startFlags : {{- toYaml . | nindent 8 }}
12485 {{- end }}
12586 {{- with .Values.cockroachdb.crdbCluster.podTemplate }}
126- podTemplate : {{- toYaml . | nindent 8 }}
87+ podTemplate :
88+ metadata :
89+ labels :
90+ app.kubernetes.io/name : {{ template "cockroachdb.name" $ }}
91+ app.kubernetes.io/instance : {{ $.Release.Name | quote }}
92+ {{- with .metadata.labels }}
93+ {{- toYaml . | nindent 12 }}
94+ {{- end }}
95+ annotations :
96+ helm.sh/restartedAt : {{ $.Values.cockroachdb.crdbCluster.timestamp | quote }}
97+ {{- with .metadata.annotations }}
98+ {{- toYaml . | nindent 12 }}
99+ {{- end }}
100+ spec :
101+ {{- if .spec.imagePullSecrets }}
102+ imagePullSecrets :
103+ {{- range .spec.imagePullSecrets }}
104+ - name : {{ .name }}
105+ {{- end }}
106+ {{- end }}
107+ {{- with .spec.topologySpreadConstraints }}
108+ topologySpreadConstraints :
109+ {{- toYaml . | nindent 12 }}
110+ {{- end }}
111+ {{- if .spec.terminationGracePeriodSeconds }}
112+ terminationGracePeriodSeconds : {{ .spec.terminationGracePeriodSeconds }}
113+ {{- end }}
114+ {{- with .spec.tolerations }}
115+ tolerations :
116+ {{- toYaml . | nindent 12 }}
117+ {{- end }}
118+ {{- with .spec.nodeSelector }}
119+ nodeSelector :
120+ {{- toYaml . | nindent 12 }}
121+ {{- end }}
122+ {{- with .spec.affinity }}
123+ affinity :
124+ {{- toYaml . | nindent 12 }}
125+ {{- end }}
126+ serviceAccountName : {{ include "cockroachdb.serviceAccount.name" $ }}
127+ {{- if .spec.initContainers }}
128+ initContainers :
129+ {{- range .spec.initContainers }}
130+ - name : {{ .name }}
131+ {{- if .image }}
132+ image : {{ .image }}
133+ {{- end }}
134+ {{- if .imagePullPolicy }}
135+ imagePullPolicy : {{ .imagePullPolicy }}
136+ {{- end }}
137+ {{- if .env }}
138+ env :
139+ {{- toYaml .env | nindent 16 }}
140+ {{- end }}
141+ {{- with .resources }}
142+ resources :
143+ {{- toYaml . | nindent 16 }}
144+ {{- end }}
145+ {{- with .volumeMounts }}
146+ volumeMounts :
147+ {{- toYaml . | nindent 16 }}
148+ {{- end }}
149+ {{- with .ports }}
150+ ports :
151+ {{- toYaml . | nindent 16 }}
152+ {{- end }}
153+ {{- end }}
154+ {{- end }}
155+ {{- if .spec.containers }}
156+ containers :
157+ {{- range .spec.containers }}
158+ - name : {{ .name }}
159+ {{- if .image }}
160+ image : {{ .image }}
161+ {{- end }}
162+ {{- if .imagePullPolicy }}
163+ imagePullPolicy : {{ .imagePullPolicy }}
164+ {{- end }}
165+ {{- if eq .name "cockroachdb" }}
166+ env :
167+ - name : GODEBUG
168+ value : {{ include "godebugList" $ }}
169+ {{- with .env }}
170+ {{- toYaml . | nindent 16 }}
171+ {{- end }}
172+ {{- else if .env }}
173+ env :
174+ {{- toYaml .env | nindent 16 }}
175+ {{- end }}
176+ {{- with .resources }}
177+ resources :
178+ {{- toYaml . | nindent 16 }}
179+ {{- end }}
180+ {{- with .volumeMounts }}
181+ volumeMounts :
182+ {{- toYaml . | nindent 16 }}
183+ {{- end }}
184+ {{- with .ports }}
185+ ports :
186+ {{- toYaml . | nindent 16 }}
187+ {{- end }}
188+ {{- end }}
189+ {{- end }}
190+ {{- if .spec.volumes }}
191+ volumes :
192+ {{- range .spec.volumes }}
193+ - name : {{ .name }}
194+ {{- with .configMap }}
195+ configMap :
196+ {{- toYaml . | nindent 6 }}
197+ {{- end }}
198+ {{- with .secret }}
199+ secret :
200+ {{- toYaml . | nindent 6 }}
201+ {{- end }}
202+ {{- with .persistentVolumeClaim }}
203+ persistentVolumeClaim :
204+ {{- toYaml . | nindent 6 }}
205+ {{- end }}
206+ {{- with .emptyDir }}
207+ emptyDir :
208+ {{- toYaml . | nindent 6 }}
209+ {{- end }}
210+ {{- with .hostPath }}
211+ hostPath :
212+ {{- toYaml . | nindent 6 }}
213+ {{- end }}
214+ {{- with .projected }}
215+ projected :
216+ {{- toYaml . | nindent 6 }}
217+ {{- end }}
218+ {{- end }}
219+ {{- end }}
127220 {{- end }}
128221 {{- with .Values.cockroachdb.crdbCluster.persistentVolumeClaimRetentionPolicy }}
129222 persistentVolumeClaimRetentionPolicy : {{- toYaml . | nindent 8 }}
0 commit comments