Skip to content

Commit

Permalink
fix(helm): Fixed migrate not being consistent in name for hooks
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
elliotcourant committed Aug 30, 2024
1 parent 4376207 commit 13df6a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions helm/oncall/templates/engine/job-migrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 13df6a0

Please sign in to comment.