From 89150ede73cbb962e1cd0f88d4a9a9fb5d82f5d5 Mon Sep 17 00:00:00 2001 From: Elliot Courant Date: Fri, 30 Aug 2024 17:36:14 -0500 Subject: [PATCH] fix(helm): Fixed migrate not being consistent in name for hooks This makes it so that the yaml being created for the migrate job is consistent when `useHook` is `true` or `false`. At the moment if use hook is false, the the name on the yaml and in the metadata match. But if use hook is true then the name on the object itself is different from the one in the metadata. --- helm/oncall/templates/engine/job-migrate.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helm/oncall/templates/engine/job-migrate.yaml b/helm/oncall/templates/engine/job-migrate.yaml index 0978295427..5f3c9af4ac 100644 --- a/helm/oncall/templates/engine/job-migrate.yaml +++ b/helm/oncall/templates/engine/job-migrate.yaml @@ -26,7 +26,11 @@ spec: {{- end }} template: metadata: + {{- if .Values.migrate.useHook }} + name: {{ printf "%s-migrate" (include "oncall.engine.fullname" .) }} + {{- else }} name: {{ printf "%s-migrate-%s" (include "oncall.engine.fullname" .) (now | date "2006-01-02-15-04-05") }} + {{- end }} {{- with .Values.podAnnotations }} annotations: random-annotation: {{ randAlphaNum 10 | lower }}