Skip to content

Commit

Permalink
feat(helm): add pod and deployment annotations to template (apache#14030
Browse files Browse the repository at this point in the history
)
  • Loading branch information
rasta-rocket authored and Allan Caetano de Oliveira committed May 21, 2021
1 parent 3679008 commit 83401ea
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
7 changes: 7 additions & 0 deletions helm/superset/templates/deployment-beat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ metadata:
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.supersetCeleryBeat.deploymentAnnotations }}
annotations:
{{ toYaml .Values.supersetCeleryBeat.deploymentAnnotations | nindent 4 }}
{{- end }}
spec:
# This must be a singleton
replicas: 1
Expand All @@ -44,6 +48,9 @@ spec:
# Optionally force the thing to reload
force-reload: {{ randAlphaNum 5 | quote }}
{{ end }}
{{- if .Values.supersetCeleryBeat.podAnnotations }}
{{ toYaml .Values.supersetCeleryBeat.podAnnotations | nindent 8 }}
{{- end }}
labels:
app: {{ template "superset.name" . }}-celerybeat
release: {{ .Release.Name }}
Expand Down
7 changes: 7 additions & 0 deletions helm/superset/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ metadata:
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.supersetWorker.deploymentAnnotations }}
annotations:
{{ toYaml .Values.supersetWorker.deploymentAnnotations | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand All @@ -42,6 +46,9 @@ spec:
# Optionally force the thing to reload
force-reload: {{ randAlphaNum 5 | quote }}
{{ end }}
{{- if .Values.supersetWorker.podAnnotations }}
{{ toYaml .Values.supersetWorker.podAnnotations | nindent 8 }}
{{- end }}
labels:
app: {{ template "superset.name" . }}-worker
release: {{ .Release.Name }}
Expand Down
7 changes: 7 additions & 0 deletions helm/superset/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ metadata:
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.supersetNode.deploymentAnnotations }}
annotations:
{{ toYaml .Values.supersetNode.deploymentAnnotations | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand All @@ -45,6 +49,9 @@ spec:
# Optionally force the thing to reload
force-reload: {{ randAlphaNum 5 | quote }}
{{- end }}
{{- if .Values.supersetNode.podAnnotations }}
{{ toYaml .Values.supersetNode.podAnnotations | nindent 8 }}
{{- end }}
labels:
app: {{ template "superset.name" . }}
release: {{ .Release.Name }}
Expand Down
18 changes: 18 additions & 0 deletions helm/superset/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ supersetNode:
name: '{{ tpl .Values.envFromSecret . }}'
command: [ "/bin/sh", "-c", "until nc -zv $DB_HOST $DB_PORT -w1; do echo 'waiting for db'; sleep 1; done" ]

## Annotations to be added to supersetNode deployment
deploymentAnnotations: {}

## Annotations to be added to supersetNode pods
podAnnotations: {}

##
## Superset worker configuration
supersetWorker:
Expand All @@ -180,6 +186,12 @@ supersetWorker:
name: '{{ tpl .Values.envFromSecret . }}'
command: [ "/bin/sh", "-c", "until nc -zv $DB_HOST $DB_PORT -w1; do echo 'waiting for db'; sleep 1; done" ]

## Annotations to be added to supersetWorker deployment
deploymentAnnotations: {}

## Annotations to be added to supersetWorker pods
podAnnotations: {}

##
## Superset beat configuration (to trigger scheduled jobs like reports)
supersetCeleryBeat:
Expand All @@ -199,6 +211,12 @@ supersetCeleryBeat:
name: '{{ tpl .Values.envFromSecret . }}'
command: [ "/bin/sh", "-c", "until nc -zv $DB_HOST $DB_PORT -w1; do echo 'waiting for db'; sleep 1; done" ]

## Annotations to be added to supersetCeleryBeat deployment
deploymentAnnotations: {}

## Annotations to be added to supersetCeleryBeat pods
podAnnotations: {}

##
## Init job configuration
init:
Expand Down

0 comments on commit 83401ea

Please sign in to comment.