[bitnami/template] allow specific annotations for controllers (#21010)

* [bitnami/template] allow specific annotations for controllers
Signed-off-by: Alexey Grevtsev <alexey.grevtsev@chainstack.com>

* Update template/CHART_NAME/templates/daemonset.yaml
This commit is contained in:
Alexey Grevtsev
2023-11-22 10:08:48 -03:00
committed by GitHub
parent 60d729992f
commit 4e31af3890
5 changed files with 24 additions and 6 deletions

View File

@@ -10,8 +10,9 @@ metadata:
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: %%COMPONENT_NAME%%
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- if or .Values.%%MAIN_OBJECT_BLOCK%%.daemonsetAnnotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" (dict "values" .Values.%%MAIN_OBJECT_BLOCK%%.daemonsetAnnotations .Values.commonAnnotations "context" .) | fromYaml }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.%%MAIN_OBJECT_BLOCK%%.updateStrategy }}

View File

@@ -10,8 +10,9 @@ metadata:
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: %%COMPONENT_NAME%%
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- if or .Values.%%MAIN_OBJECT_BLOCK%%.deploymentAnnotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" (dict "values" .Values.%%MAIN_OBJECT_BLOCK%%.deploymentAnnotations .Values.commonAnnotations "context" .) | fromYaml }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if not .Values.%%MAIN_OBJECT_BLOCK%%.autoscaling.enabled }}

View File

@@ -10,8 +10,9 @@ metadata:
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: %%COMPONENT_NAME%%
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- if or .Values.%%MAIN_OBJECT_BLOCK%%.statefulsetAnnotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" (dict "values" .Values.%%MAIN_OBJECT_BLOCK%%.statefulsetAnnotations .Values.commonAnnotations "context" .) | fromYaml }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if not .Values.autoscaling.enabled }}

View File

@@ -206,6 +206,18 @@ diagnosticMode:
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
##
hostAliases: []
## @param %%MAIN_OBJECT_BLOCK%%.daemonsetAnnotations Annotations for %%MAIN_CONTAINER_NAME%% daemonset
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
daemonsetAnnotations: {}
## @param %%MAIN_OBJECT_BLOCK%%.deploymentAnnotations Annotations for %%MAIN_CONTAINER_NAME%% deployment
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
deploymentAnnotations: {}
## @param %%MAIN_OBJECT_BLOCK%%.statefulsetAnnotations Annotations for %%MAIN_CONTAINER_NAME%% statefulset
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
statefulsetAnnotations: {}
## @param %%MAIN_OBJECT_BLOCK%%.podLabels Extra labels for %%MAIN_CONTAINER_NAME%% pods
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
##

View File

@@ -18,6 +18,9 @@ Some of the items that need to be implemented are:
- affinity
- nodeSelector
- tolerations (that would override the default one)
- daemonsetAnnotations
- deploymentAnnotations
- statefulsetAnnotations
- podAnnotations
- priorityClassName
- lifecycleHooks