-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add workflow template level pod annotations and labels to template. Fixes: #12945 #12987
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to have test with this change
// add workflow template level pod annotations and labels to template | ||
podMetadata := wftmpl.GetPodMetadata() | ||
if podMetadata != nil { | ||
if template.Metadata.Annotations == nil { | ||
template.Metadata.Annotations = make(map[string]string) | ||
} | ||
for k, v := range podMetadata.Annotations { | ||
template.Metadata.Annotations[k] = v | ||
} | ||
if template.Metadata.Labels == nil { | ||
template.Metadata.Labels = make(map[string]string) | ||
} | ||
for k, v := range podMetadata.Labels { | ||
template.Metadata.Labels[k] = v | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good but I think GetTemplateByName
need to have these as well
so that if the template in clusterWorkflowTemplate is a dag template, the podMetadata still applies
83aa9d7
to
ae8a11f
Compare
add a ut. |
/retest |
1 similar comment
/retest |
@shuangkun The E2E tests are broken due to a bug in Kit. I have a fix for it in #14048. Could you please review that PR? |
Thanks, I was wondering why this test case keeps failing |
654a56d
to
9d5e131
Compare
…rgoproj#12945 Signed-off-by: shuangkun <[email protected]>
Signed-off-by: shuangkun <[email protected]>
Signed-off-by: shuangkun <[email protected]>
Signed-off-by: shuangkun <[email protected]>
Signed-off-by: shuangkun <[email protected]>
9d5e131
to
79008bf
Compare
Fixes #12945
Motivation
add workflow template level pod annotations and labels to template
Modifications
Verification
Local test.