-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Optional command line flags #13991
Comments
Could this method meet your needs?
|
All combinations work fine.
|
This works, but one thing which might not work is shutting down the pod gracefully if kubernetes requests it. |
As I suspected, this is not working if you need to be able to gracefully shutdown a command. (For whatever reason kubernetes decides to terminate your pod: e.g. memory, etc). Simplified example: test.py
Dockerfile
worfklow:
If I run the above, then run
If I change the spec, to use
Which indicate it doesn't allow the command to gracefully shutdown. |
Summary
When passing arguments to the image commands, it's currently not possible to pass optional flags, depending on parameters.
Use Cases
A lot of command line tools use these flags. The simplest example is
ls
, if you want certain flags (like-l
or-a
) to only be used when a certain template parameter is set, this is currently not possible besides using the complicated featurepodSpecPatch
.Example which doesn't work, as it will pass two empty arguments to the ls command:
Message from the maintainers:
Love this feature request? Give it a 👍. We prioritise the proposals with the most 👍.
The text was updated successfully, but these errors were encountered: