Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change mainContainer env handling #8967

Open
prateekkhera92 opened this issue Jun 15, 2022 · 5 comments
Open

Change mainContainer env handling #8967

prateekkhera92 opened this issue Jun 15, 2022 · 5 comments
Labels
area/controller Controller issues, panics area/executor type/feature Feature request

Comments

@prateekkhera92
Copy link

Summary

mainContainer.env in workflow controller configmap lets one add default environment variables to workflow main container. However, the current nature currently is to override these env variables, if there are env variable defined in workflow manifest file. I think, the correct behaviour should be extending it, so that default variables are preserved. However, if there is a key in env that exists in both, workflow manifest should override the default ones in mainContainer.env

What change needs making?

Use Cases

It will let us define default env variables correctly

When would you use this?


Message from the maintainers:

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

@prateekkhera92 prateekkhera92 added the type/feature Feature request label Jun 15, 2022
@terrytangyuan
Copy link
Member

terrytangyuan commented Jun 15, 2022

Overriding is the expected behavior instead of extending.

@gyanprakash48
Copy link

@terrytangyuan whats the possible way then if we want to have a env variable that should be available to all task , but still possible to add additional env variable at workflow manifest level as well

@gyanprakash48
Copy link

i also have a case where this proposed enhancement will be perfect solution

@mio4kon
Copy link

mio4kon commented Jan 22, 2024

@terrytangyuan I also found that ENV is currently fully covered, resulting in a bit high cost of use. I feel that it should be better to override the env of the corresponding key。

Is it possible to add a merge switch like this?

@terrytangyuan
Copy link
Member

Maybe consider using a webhook to add env vars before wf controller reconciles the workflow

@agilgur5 agilgur5 added the area/controller Controller issues, panics label Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller Controller issues, panics area/executor type/feature Feature request
Projects
None yet
Development

No branches or pull requests

5 participants