argo-workflows
argo-workflows copied to clipboard
UI: Show values set in `templateDefaults`
Summary
It would be nice if values that are set in the templateDefaults
are also shown in the UI. Take the following example:
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:
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 👍.
would love to work on this issue 🚀
I think the UI is looking at workflow.spec
be should look at workflow.status.storeWorkflowSpec
. We'd need to hunt down where that is.
@CIPHERTron are you working this issue?
@alexec @sarabala1979 I have started looking into this and here are my observations:
-
If it's just the UI issue, we can include templateDefaults coming in
workflow.spec
along with the envs present in template. -
The other way is to leverage
workflow.status.storedWorkflowTemplateSpec
but it is coming undefined always and I did not find a place where it is being set.
I am thinking of going ahead with first approach. Can you share your thoughts please?