diff --git a/chart/templates/deployment-sidekiq.yaml b/chart/templates/deployment-sidekiq.yaml
index 994a66445eab255064220983ff773ab514199e20..b2e5af522e5354537679e95d5a23d8806ab5baac 100644
--- a/chart/templates/deployment-sidekiq.yaml
+++ b/chart/templates/deployment-sidekiq.yaml
@@ -14,12 +14,12 @@ spec:
       component: rails
   template:
     metadata:
-    {{- with .Values.podAnnotations }}
       annotations:
+      {{- with .Values.podAnnotations }}
         {{- toYaml . | nindent 8 }}
+      {{- end }}
         # roll the pods to pick up any db migrations
         rollme: {{ randAlphaNum 5 | quote }}
-    {{- end }}
       labels:
         {{- include "mastodon.selectorLabels" . | nindent 8 }}
         component: rails
diff --git a/chart/templates/deployment-web.yaml b/chart/templates/deployment-web.yaml
index ab722c77b1cb083001f9cf127c8e843162111c9f..c50f32d983484de18abc6c51c348e29705d05ec6 100644
--- a/chart/templates/deployment-web.yaml
+++ b/chart/templates/deployment-web.yaml
@@ -14,12 +14,12 @@ spec:
       component: rails
   template:
     metadata:
-    {{- with .Values.podAnnotations }}
       annotations:
+      {{- with .Values.podAnnotations }}
         {{- toYaml . | nindent 8 }}
+      {{- end }}
         # roll the pods to pick up any db migrations
         rollme: {{ randAlphaNum 5 | quote }}
-    {{- end }}
       labels:
         {{- include "mastodon.selectorLabels" . | nindent 8 }}
         component: rails