argoproj / argoproj/argo-workflows

UI: Show values set in `templateDefaults`

Open
#7,378 5 comments 2 reactions 0 assignees View on GitHub
area/ui hacktoberfest
Dominant language
Go
Stars
17k
Forks
3.7k
Avg merge
1d 20h
Merged PRs (30d)
138

Description

# Summary

It would be nice if values that are set in the `templateDefaults` are also shown in the UI. Take the following example:

```yaml
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: hello-world-
spec:
entrypoint: whalesay
templateDefaults:
container:
env:
- name: TEST_VARIABLE
value: "hi"
templates:
- name: whalesay
container:
image: docker/whalesay:latest
command: [bash]
args: ["-c", "echo $TEST_VARIABLE"]
```

The container is given the `TEST_VARIABLE` by default, but the UI is showing there are no ENV variables for this container:

![image](https://user-images.githubusercontent.com/6594531/145552333-22bc64d3-d36f-4949-9e3f-d11d6d7a2e6d.png)

It would be nice if the variable set in the defaults also shows up there.

# Use Cases

We use the `templateDefaults` regularly in our workflows to set env variables. It would be more clear if these env variables also show up in the UI.

---

**Message from the maintainers**:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

Contributor guide

Open the contributing guide

Research direction

Start by locating the UI view that displays a container's environment variables, then read how it gets those values from a workflow. Compare the displayed variables with the example's `templateDefaults.container.env`; done means the `TEST_VARIABLE` default appears in the UI for the `whalesay` container.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.