|
@@ -8,11 +8,8 @@ kind: StatefulSet
|
|
|
metadata:
|
|
|
name: {{ template "common.names.fullname" . }}
|
|
|
namespace: {{ include "common.names.namespace" . | quote }}
|
|
|
- labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
|
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
|
app.kubernetes.io/component: %%COMPONENT_NAME%%
|
|
|
- {{- if .Values.commonLabels }}
|
|
|
- {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
|
- {{- end }}
|
|
|
{{- if .Values.commonAnnotations }}
|
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
|
{{- end }}
|
|
@@ -21,8 +18,9 @@ spec:
|
|
|
replicas: {{ .Values.replicaCount }}
|
|
|
{{- end }}
|
|
|
podManagementPolicy: {{ .Values.podManagementPolicy | quote }}
|
|
|
+ {{- $podLabels := merge .Values.%%MAIN_OBJECT_BLOCK%%.podLabels .Values.commonLabels }}
|
|
|
selector:
|
|
|
- matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }}
|
|
|
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
|
|
app.kubernetes.io/component: %%COMPONENT_NAME%%
|
|
|
serviceName: {{ template "common.names.fullname" . }}
|
|
|
{{- if .Values.%%MAIN_OBJECT_BLOCK%%.updateStrategy }}
|
|
@@ -33,14 +31,8 @@ spec:
|
|
|
{{- if .Values.%%MAIN_OBJECT_BLOCK%%.podAnnotations }}
|
|
|
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.%%MAIN_OBJECT_BLOCK%%.podAnnotations "context" $) | nindent 8 }}
|
|
|
{{- end }}
|
|
|
- labels: {{- include "common.labels.standard" . | nindent 8 }}
|
|
|
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
|
|
app.kubernetes.io/component: %%COMPONENT_NAME%%
|
|
|
- {{- if .Values.%%MAIN_OBJECT_BLOCK%%.podLabels }}
|
|
|
- {{- include "common.tplvalues.render" (dict "value" .Values.%%MAIN_OBJECT_BLOCK%%.podLabels "context" $) | nindent 8 }}
|
|
|
- {{- end }}
|
|
|
- {{- if .Values.commonLabels }}
|
|
|
- {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }}
|
|
|
- {{- end }}
|
|
|
spec:
|
|
|
serviceAccountName: {{ template "%%TEMPLATE_NAME%%.serviceAccountName" . }}
|
|
|
{{- include "%%TEMPLATE_NAME%%.imagePullSecrets" . | nindent 6 }}
|
|
@@ -51,8 +43,8 @@ spec:
|
|
|
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.%%MAIN_OBJECT_BLOCK%%.affinity "context" $) | nindent 8 }}
|
|
|
{{- else }}
|
|
|
affinity:
|
|
|
- podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.%%MAIN_OBJECT_BLOCK%%.podAffinityPreset "component" "%%COMPONENT_NAME%%" "context" $) | nindent 10 }}
|
|
|
- podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.%%MAIN_OBJECT_BLOCK%%.podAntiAffinityPreset "component" "%%COMPONENT_NAME%%" "context" $) | nindent 10 }}
|
|
|
+ podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.%%MAIN_OBJECT_BLOCK%%.podAffinityPreset "component" "%%COMPONENT_NAME%%" "customLabels" $podLabels "context" $) | nindent 10 }}
|
|
|
+ podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.%%MAIN_OBJECT_BLOCK%%.podAntiAffinityPreset "component" "%%COMPONENT_NAME%%" "customLabels" $podLabels "context" $) | nindent 10 }}
|
|
|
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.%%MAIN_OBJECT_BLOCK%%.nodeAffinityPreset.type "key" .Values.%%MAIN_OBJECT_BLOCK%%.nodeAffinityPreset.key "values" .Values.%%MAIN_OBJECT_BLOCK%%.nodeAffinityPreset.values) | nindent 10 }}
|
|
|
{{- end }}
|
|
|
{{- if .Values.%%MAIN_OBJECT_BLOCK%%.nodeSelector }}
|
|
@@ -192,15 +184,12 @@ spec:
|
|
|
volumeClaimTemplates:
|
|
|
- metadata:
|
|
|
name: data
|
|
|
- annotations:
|
|
|
- {{- if .Values.persistence.annotations }}
|
|
|
- {{- include "common.tplvalues.render" (dict "value" .Values.persistence.annotations "context" $) | nindent 10 }}
|
|
|
- {{- end }}
|
|
|
- {{- if .Values.commonAnnotations }}
|
|
|
- {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 10 }}
|
|
|
- {{- end }}
|
|
|
+ {{- if or .Values.persistence.annotations .Values.commonAnnotations }}
|
|
|
+ {{- $claimAnnotations := merge .Values.persistence.annotations .Values.commonAnnotations }}
|
|
|
+ annotations: {{- include "common.tplvalues.render" ( dict "value" $claimAnnotations "context" $ ) | nindent 10 }}
|
|
|
+ {{- end }}
|
|
|
{{- if .Values.commonLabels }}
|
|
|
- labels: {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 10 }}
|
|
|
+ labels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 10 }}
|
|
|
{{- end }}
|
|
|
spec:
|
|
|
accessModes:
|