You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When podMetadata is specified in a ClusterWorkflowTemplate and the template is invoked from a Workflow instance, the pods are not getting the annotations and labels.
I'm not familiar with the code but the #6512 change seems to have replaced one behavior with another.
Since both Workflow and (Cluster)WorkflowTemplate resources have the spec.podMetadata field, users rightfully expect that they should be able to specify ClusterWorkflowTemplate-level annotations and labels for pods instead of repeating the same information in eg. every container template within that ClusterWorkflowTemplate.
In addition, when the ClusterWorkflowTemplate is invoked from a Workflow, these annotations and labels should be possible to override, so IMO the Workflow spec.podMetadata should take precedence.
I'm not sure if this is correct, but perhaps in workflow/controller/workflowpod.go something like this would work:
This issue is very similar to #12729, just the opposite.
The difference lies in whether the ClusterWorkflowTemplate is used as a WFT or a WF.
If you use the ClusterWorkflowTemplate as a WFT, you can add the metadata into template whalesay-template.
Howerver, I think it may also be necessary to merge the spec of woc.wf and woc.execWf.
Pre-requisites
:latest
What happened/what did you expect to happen?
When
podMetadata
is specified in a ClusterWorkflowTemplate and the template is invoked from a Workflow instance, the pods are not getting the annotations and labels.I'm not familiar with the code but the #6512 change seems to have replaced one behavior with another.
Since both Workflow and (Cluster)WorkflowTemplate resources have the spec.podMetadata field, users rightfully expect that they should be able to specify ClusterWorkflowTemplate-level annotations and labels for pods instead of repeating the same information in eg. every container template within that ClusterWorkflowTemplate.
In addition, when the ClusterWorkflowTemplate is invoked from a Workflow, these annotations and labels should be possible to override, so IMO the Workflow spec.podMetadata should take precedence.
I'm not sure if this is correct, but perhaps in
workflow/controller/workflowpod.go
something like this would work:Version
v3.5.5
Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.
Logs from the workflow controller
Logs from in your workflow's wait container
The text was updated successfully, but these errors were encountered: