Skip to content

Commit 16c5976

Browse files
committed
fix: reloader.stakater.com annotations placement
1 parent 734157e commit 16c5976

File tree

5 files changed

+12
-1
lines changed

5 files changed

+12
-1
lines changed

toggle-django-helm/templates/_helpers.tpl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,15 @@ Generate env configs for app types
140140
{{/*
141141
Generate default annotations for app deployments
142142
*/}}
143+
{{- define "django-app.appDefaultDeploymentAnnotations" -}}
144+
annotations:
145+
reloader.stakater.com/auto: "true"
146+
{{- end }}
147+
148+
{{/*
149+
Generate default annotations for app pods
150+
*/}}
143151
{{- define "django-app.appDefaultAnnotations" -}}
144-
reloader.stakater.com/auto: "true"
145152
checksum/secret: {{ include (print .Template.BasePath "/config/secret.yaml") . | sha256sum }}
146153
checksum/configmap: {{ include (print .Template.BasePath "/config/configmap.yaml") . | sha256sum }}
147154
{{- with .Values.podAnnotations }}

toggle-django-helm/templates/api/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ apiVersion: apps/v1
44
kind: Deployment
55
metadata:
66
name: {{ template "django-app.fullname" . }}-api
7+
{{- with (include "django-app.appDefaultDeploymentAnnotations" $) -}}{{ . | nindent 2 }}{{- end }}
78
labels:
89
app: {{ include "django-app.fullname" . }}
910
component: api

toggle-django-helm/templates/celery-flower/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ apiVersion: apps/v1
55
kind: Deployment
66
metadata:
77
name: {{ template "django-app.fullname" . }}-celery-flower
8+
{{- with (include "django-app.appDefaultDeploymentAnnotations" $) -}}{{ . | nindent 2 }}{{- end }}
89
labels:
910
app: {{ include "django-app.fullname" . }}
1011
component: worker-flower

toggle-django-helm/templates/worker-beat/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ apiVersion: apps/v1
44
kind: Deployment
55
metadata:
66
name: {{ template "django-app.fullname" . }}-worker-beat
7+
{{- with (include "django-app.appDefaultDeploymentAnnotations" $) -}}{{ . | nindent 2 }}{{- end }}
78
labels:
89
app: {{ include "django-app.fullname" . }}
910
component: worker-beat

toggle-django-helm/templates/worker/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ apiVersion: apps/v1
77
kind: Deployment
88
metadata:
99
name: {{ template "django-app.fullname" $ }}-worker-{{ $queue_name }}
10+
{{- with (include "django-app.appDefaultDeploymentAnnotations" $) -}}{{ . | nindent 2 }}{{- end }}
1011
labels:
1112
app: {{ include "django-app.fullname" $ }}
1213
component: worker

0 commit comments

Comments
 (0)