argoproj / argoproj/argo-workflows

HTTP/Plugin template does not respect templateDefaults

Open
#15,869 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
17k
Forks
3.7k
Avg merge
1d 20h
Merged PRs (30d)
138

Description

### Pre-requisites

- [x] I have double-checked my configuration
- [x] I have tested with the `:latest` image tag (i.e. `quay.io/argoproj/workflow-controller:latest`) and can confirm the issue still exists on `:latest`. If not, I have explained why, **in detail**, in my description below.
- [x] I have searched existing issues and could not find a match for this bug
- [ ] I'd like to contribute the fix myself (see [contributing guide](https://github.com/argoproj/argo-workflows/blob/main/docs/CONTRIBUTING.md))

### What happened? What did you expect to happen?

`templateDefaults` is not respected in Agent pods that are created when using HTTP/Plugin templates.

Could not test in the `latest` image tag due to following error when running the [official example](https://github.com/argoproj/argo-workflows/blob/main/examples/http-hello-world.yaml):
```
Normal WorkflowNodeRunning 17m workflow-controller Running node http-template-vtvvk[0].good: create agent pod failed with reason:"failed to create Agent pod. Reason: Pod "http-template-vtvvk-1340600742-agent" is invalid: [spec.containers[0].volumeMounts[0].name: Not found: "tmp", spec.containers[0].volumeMounts[1].name: Not found: "config"]"
Warning WorkflowNodeError 17m workflow-controller Error node http-template-vtvvk[0].good: create agent pod failed with reason:"failed to create Agent pod. Reason: Pod "http-template-vtvvk-1340600742-agent" is invalid: [spec.containers[0].volumeMounts[0].name: Not found: "tmp", spec.containers[0].volumeMounts[1].name: Not found: "config"]"
Normal WorkflowNodeRunning 17m workflow-controller Running node http-template-vtvvk[0].bad: create agent pod failed with reason:"failed to create Agent pod. Reason: Pod "http-template-vtvvk-1340600742-agent" is invalid: [spec.containers[0].volumeMounts[0].name: Not found: "tmp", spec.containers[0].volumeMounts[1].name: Not found: "config"]"
Warning WorkflowNodeError 17m workflow-controller Error node http-template-vtvvk[0].bad: create agent pod failed with reason:"failed to create Agent pod. Reason: Pod "http-template-vtvvk-1340600742-agent" is invalid: [spec.containers[0].volumeMounts[0].name: Not found: "tmp", spec.containers[0].volumeMounts[1].name: Not found: "config"]"
```

### Version(s)

v3.7.3

### Paste a minimal workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflow that uses private images.

```YAML
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: http-template-
annotations:
workflows.argoproj.io/description: |
Http template will demostrate http template functionality
workflows.argoproj.io/version: '>= 3.2.0'
spec:
# add templateDefaults
templateDefaults:
metadata:
labels:
foo: from-template-defaults
entrypoint: main
templates:
- name: main
steps:
- - name: good
template: http
arguments:
parameters: [{name: url, value: "https://raw.githubusercontent.com/argoproj/argo-workflows/4e450e250168e6b4d51a126b784e90b11a0162bc/pkg/apis/workflow/v1alpha1/generated.swagger.json"}]
- name: bad
template: http
continueOn:
failed: true
arguments:
parameters: [{name: url, value: "https://raw.githubusercontent.com/argoproj/argo-workflows/thisisnotahash/pkg/apis/workflow/v1alpha1/generated.swagger.json"}]

- name: http
inputs:
parameters:
- name: url
http:
# url: http://dummy.restapiexample.com/api/v1/employees
url: "{{inputs.parameters.url}}"
```

### Logs from the workflow controller

```text
time="2026-04-06T01:34:05.868Z" level=info msg="Processing workflow" Phase= ResourceVersion=674064257 namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:05.878Z" level=info msg="resolved artifact repository" artifactRepositoryRef=default-artifact-repository
time="2026-04-06T01:34:05.878Z" level=info msg="Task-result reconciliation" namespace=test numObjs=0 workflow=http-template-swdlj
time="2026-04-06T01:34:05.878Z" level=info msg="Updated phase -> Running" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:05.878Z" level=warning msg="Node was nil, will be initialized as type Skipped" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:05.879Z" level=info msg="was unable to obtain node for , letting display name to be nodeName" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:05.879Z" level=info msg="Steps node http-template-swdlj initialized Running" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:05.879Z" level=info msg="StepGroup node http-template-swdlj-2783450795 initialized Running" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:05.879Z" level=warning msg="Node was nil, will be initialized as type Skipped" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:05.880Z" level=info msg="HTTP node http-template-swdlj-2377829518 initialized Pending" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:05.880Z" level=warning msg="Node was nil, will be initialized as type Skipped" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:05.880Z" level=info msg="HTTP node http-template-swdlj-3038278722 initialized Pending" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:05.880Z" level=info msg="Workflow step group node http-template-swdlj-2783450795 not yet completed" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:05.880Z" level=info msg="TaskSet Reconciliation" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:05.880Z" level=info msg="Creating TaskSet" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:05.899Z" level=info msg=reconcileAgentPod namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:05.914Z" level=warning msg="couldn't retrieve node for nodeName , will get nil templateDeadline" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:05.914Z" level=warning msg="couldn't get boundaryTemplate through nodeName " namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:06.157Z" level=info msg="Created Agent pod" namespace=test podName=http-template-swdlj-1340600742-agent workflow=http-template-swdlj
time="2026-04-06T01:34:06.157Z" level=info msg=updateAgentPodStatus namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:06.157Z" level=info msg=assessAgentPodStatus namespace=test podName=http-template-swdlj-1340600742-agent
time="2026-04-06T01:34:06.157Z" level=info msg="Workflow to be dehydrated" Workflow Size=3432
time="2026-04-06T01:34:06.174Z" level=info msg="add pod event" pod=http-template-swdlj-1340600742-agent
time="2026-04-06T01:34:06.192Z" level=info msg="update pod event" pod=http-template-swdlj-1340600742-agent
time="2026-04-06T01:34:06.247Z" level=info msg="update pod event" pod=http-template-swdlj-1340600742-agent
time="2026-04-06T01:34:06.252Z" level=info msg="Workflow update successful" namespace=test phase=Running resourceVersion=674064267 workflow=http-template-swdlj
time="2026-04-06T01:34:06.254Z" level=info msg="Processing workflow" Phase=Running ResourceVersion=674064267 namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:06.255Z" level=info msg="Task-result reconciliation" namespace=test numObjs=0 workflow=http-template-swdlj
time="2026-04-06T01:34:06.255Z" level=info msg=updateAgentPodStatus namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:06.255Z" level=info msg=assessAgentPodStatus namespace=test podName=http-template-swdlj-1340600742-agent
time="2026-04-06T01:34:06.256Z" level=info msg="Workflow step group node http-template-swdlj-2783450795 not yet completed" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:06.256Z" level=info msg="TaskSet Reconciliation" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:06.256Z" level=info msg="Creating TaskSet" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:06.290Z" level=info msg=reconcileAgentPod namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:06.290Z" level=info msg=updateAgentPodStatus namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:06.290Z" level=info msg=assessAgentPodStatus namespace=test podName=http-template-swdlj-1340600742-agent
time="2026-04-06T01:34:07.026Z" level=info msg="update pod event" pod=http-template-swdlj-1340600742-agent
time="2026-04-06T01:34:08.028Z" level=info msg="update pod event" pod=http-template-swdlj-1340600742-agent
time="2026-04-06T01:34:10.182Z" level=info msg="update pod event" pod=http-template-swdlj-1340600742-agent
time="2026-04-06T01:34:12.808Z" level=info msg="Performing periodic workflow GC"
time="2026-04-06T01:34:12.904Z" level=info msg="update pod event" pod=http-template-swdlj-1340600742-agent
time="2026-04-06T01:34:12.905Z" level=info msg="Deleting old offloads that are not live" len_wfs=0
time="2026-04-06T01:34:12.906Z" level=info msg="Workflow GC finished"
time="2026-04-06T01:34:16.175Z" level=info msg="Processing workflow" Phase=Running ResourceVersion=674064267 namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:16.177Z" level=info msg="Task-result reconciliation" namespace=test numObjs=0 workflow=http-template-swdlj
time="2026-04-06T01:34:16.177Z" level=info msg=updateAgentPodStatus namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:16.177Z" level=info msg=assessAgentPodStatus namespace=test podName=http-template-swdlj-1340600742-agent
time="2026-04-06T01:34:16.179Z" level=info msg="Workflow step group node http-template-swdlj-2783450795 not yet completed" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:16.179Z" level=info msg="TaskSet Reconciliation" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:16.179Z" level=info msg="Creating TaskSet" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:16.225Z" level=info msg=reconcileAgentPod namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:16.225Z" level=info msg=updateAgentPodStatus namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:16.225Z" level=info msg=assessAgentPodStatus namespace=test podName=http-template-swdlj-1340600742-agent
time="2026-04-06T01:34:34.002Z" level=info msg="Processing workflow" Phase=Running ResourceVersion=674064267 namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:34.004Z" level=info msg="Task-result reconciliation" namespace=test numObjs=0 workflow=http-template-swdlj
time="2026-04-06T01:34:34.004Z" level=info msg=updateAgentPodStatus namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:34.004Z" level=info msg=assessAgentPodStatus namespace=test podName=http-template-swdlj-1340600742-agent
time="2026-04-06T01:34:34.006Z" level=info msg="Workflow step group node http-template-swdlj-2783450795 not yet completed" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:34.006Z" level=info msg="TaskSet Reconciliation" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:34.006Z" level=info msg="Creating TaskSet" namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:34.038Z" level=info msg=reconcileAgentPod namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:34.038Z" level=info msg=updateAgentPodStatus namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:34.038Z" level=info msg=assessAgentPodStatus namespace=test podName=http-template-swdlj-1340600742-agent
time="2026-04-06T01:34:34.039Z" level=info msg="Workflow to be dehydrated" Workflow Size=4050
time="2026-04-06T01:34:34.092Z" level=info msg="Workflow update successful" namespace=test phase=Running resourceVersion=674064549 workflow=http-template-swdlj
time="2026-04-06T01:34:34.095Z" level=info msg="Processing workflow" Phase=Running ResourceVersion=674064549 namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:34.097Z" level=info msg="Task-result reconciliation" namespace=test numObjs=0 workflow=http-template-swdlj
time="2026-04-06T01:34:34.097Z" level=info msg=updateAgentPodStatus namespace=test workflow=http-template-swdlj
time="2026-04-06T01:34:34.097Z" level=info msg=assessAgentPodStatus namespace=test podName=http-template-swdlj-1340600742-agent
time="2026-04-06T01:34:34.099Z" level=info msg="Step group node http-template-swdlj-2783450795 successful" namespace=test workflow=http-template-swdlj
```

### Logs from in your workflow's wait container

```text
N/A, Agent pod does not have wait container.
```

Contributor guide

Open the contributing guide

Research direction

Start with examples/http-hello-world.yaml and reproduce the workflow using spec.templateDefaults. Follow the workflow controller logs from HTTP node and TaskSet reconciliation through Agent pod creation. Done means the Agent pod respects the templateDefaults label and the HTTP/Plugin workflow behaves as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
backend, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.