Open gnadaban opened 7 months ago
This issue is very similar to https://github.com/argoproj/argo-workflows/discussions/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
.
Does the first executingWorkflowMetadata!=nil should be workflowMetadata? @gnadaban
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