Skip to content

Commit

Permalink
fix: use env when pod version annotation is missing. Fixes #10237 (#1…
Browse files Browse the repository at this point in the history
…0457)

Signed-off-by: Isitha Subasinghe <isitha@pipekit.io>
Co-authored-by: Alex Collins <alexec@users.noreply.github.com>
  • Loading branch information
isubasinghe and alexec committed Feb 13, 2023
1 parent 393a6ca commit 08c8500
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions workflow/util/pod_name.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ func ensurePodNamePrefixLength(prefix string) string {
// given workflow
func GetWorkflowPodNameVersion(wf *v1alpha1.Workflow) PodNameVersion {
annotations := wf.GetAnnotations()
version := annotations[common.AnnotationKeyPodNameVersion]

version, ok := annotations[common.AnnotationKeyPodNameVersion]
if !ok {
return GetPodNameVersion()
}
switch version {
case PodNameV1.String():
return PodNameV1
Expand Down

0 comments on commit 08c8500

Please sign in to comment.