argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
15.11k stars 3.21k forks source link

fix(controller): podSpecPatch updates override the ref template in `Secure` mode #13909

Open chengjoey opened 1 week ago

chengjoey commented 1 week ago

Fixes #13871

Motivation

podSpecPatch seems not to be set when referencing wf template and in Secure mode

Modifications

Verification

wf:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: workflow-template-hello-world
spec:
  workflowTemplateRef:
    name: workflow-template-print-message
  podSpecPatch: |
    containers:
      - name: main
        image: alpine
        command: [echo]
        args: ["hello world"]

kubectl get wf

NAME                            STATUS   AGE   MESSAGE
workflow-template-hello-world   Error    6s    PodSpecPatch may not be setted during execution when the controller is set `templateReferencing: Secure`