Add bitnami style podAnnotations

This commit is contained in:
David Burke 2023-02-20 10:57:45 -05:00
parent 98f6e139ee
commit 95717ec228
6 changed files with 28 additions and 0 deletions

12
templates/_tplvalues.tpl Normal file
View file

@ -0,0 +1,12 @@
{{/*
Renders a value that contains template.
Usage:
{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }}
*/}}
{{- define "common.tplvalues.render" -}}
{{- if typeIs "string" .value }}
{{- tpl .value .context }}
{{- else }}
{{- tpl (.value | toYaml) .context }}
{{- end }}
{{- end -}}

View file

@ -19,6 +19,9 @@ spec:
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
tag: "{{ .Values.image.tag }}"
{{- if .Values.beat.podAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.beat.podAnnotations "context" $ ) | nindent 8 }}
{{- end }}
labels:
{{- include "django.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: beat

View file

@ -18,6 +18,9 @@ spec:
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
tag: "{{ .Values.image.tag }}"
{{- if .Values.flower.podAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.flower.podAnnotations "context" $ ) | nindent 8 }}
{{- end }}
labels:
{{- include "django.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: flower

View file

@ -19,6 +19,9 @@ spec:
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
tag: "{{ .Values.image.tag }}"
{{- if .Values.web.podAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.web.podAnnotations "context" $ ) | nindent 8 }}
{{- end }}
labels:
{{- include "django.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: web

View file

@ -18,6 +18,9 @@ spec:
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
tag: "{{ .Values.image.tag }}"
{{- if .Values.worker.podAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.worker.podAnnotations "context" $ ) | nindent 8 }}
{{- end }}
labels:
{{- include "django.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: worker

View file

@ -45,6 +45,7 @@ web:
memory: 128Mi
nodeSelector: {}
tolerations: []
podAnnotations: {}
affinity: {}
# podAntiAffinity:
# preferredDuringSchedulingIgnoredDuringExecution:
@ -105,6 +106,7 @@ worker:
memory: 128Mi
nodeSelector: {}
tolerations: []
podAnnotations: {}
affinity: {}
beat:
@ -118,6 +120,7 @@ beat:
memory: 90Mi
nodeSelector: {}
tolerations: []
podAnnotations: {}
affinity: {}
flower:
@ -131,6 +134,7 @@ flower:
memory: 256Mi
nodeSelector: {}
tolerations: []
podAnnotations: {}
affinity: {}
service:
type: ClusterIP