Skip to content

Commit

Permalink
Allow specifying pod annotations for only the Django deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
juyrjola committed Jul 24, 2024
1 parent 15c745c commit 45a3a29
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/django/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.6.1
version: 0.6.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 1 addition & 1 deletion charts/django/templates/celery/beat/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
{{- include "django.labels" . | nindent 8 }}
app.kubernetes.io/component: {{ .Values.celery.beat.componentName }}
annotations:
{{- with .Values.podAnnotations }}
{{- with .Values.commonPodAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
checksum/env-configmap: {{ include (print $.Template.BasePath "/env-configmap.yaml") . | sha256sum }}
Expand Down
2 changes: 1 addition & 1 deletion charts/django/templates/celery/flower/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
type: {{ .Values.celery.flower.strategy }}
template:
metadata:
{{- with .Values.podAnnotations }}
{{- with .Values.commonPodAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
checksum/config: {{ include (print $.Template.BasePath "/env-configmap.yaml") . | sha256sum }}
Expand Down
2 changes: 1 addition & 1 deletion charts/django/templates/celery/worker/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
{{- include "django.labels" . | nindent 8 }}
app.kubernetes.io/component: {{ .Values.celery.worker.componentName }}
annotations:
{{- with .Values.podAnnotations }}
{{- with .Values.commonPodAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
checksum/env-configmap: {{ include (print $.Template.BasePath "/env-configmap.yaml") . | sha256sum }}
Expand Down
3 changes: 3 additions & 0 deletions charts/django/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ spec:
{{- include "django.labels" . | nindent 8 }}
app.kubernetes.io/component: {{ include "django.fullname" . }}
annotations:
{{- with .Values.commonPodAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
4 changes: 4 additions & 0 deletions charts/django/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name: ""

# Annotations for all deployments (django, celery, etc.)
commonPodAnnotations: {}

# Annotations for the Django pod only
podAnnotations: {}

podSecurityContext: {}
Expand Down

0 comments on commit 45a3a29

Please sign in to comment.