dyrectorio icon indicating copy to clipboard operation
dyrectorio copied to clipboard

Validation error on initContainers command

Open wreality opened this issue 1 year ago • 4 comments

When entering a command for an initContainer, the validation requires no whitespace which doesn't seem right (always possible I'm missing something... I'm good at that).

image

https://github.com/dyrector-io/dyrectorio/blob/cc2c56dd4fd254dac8beb4d7297f3428322d7bf0/web/crux-ui/src/validations/container.ts#L304-L314

wreality avatar Oct 19 '23 16:10 wreality

Hey @wreality , could you please assign this issue to me?

adarsh-jha-dev avatar Oct 20 '23 12:10 adarsh-jha-dev

Hi @wreality! You need to split your command into multiple lines, so your first command should be composer and the second should be install.

robot9706 avatar Oct 20 '23 12:10 robot9706

@robot9706 Thanks for the reply. That was the piece I was missing.

The white space validation does mean that I can't do the equivalent of: ['/bin/sh', '-c', '/wait && ./doathing'] which would be nice occasionally

I just ended up adding a script to the container and calling the script. Worked a treat. I'd still like to suggest that the no-whitespace rule might be more restrictive than needed.

Thanks again for the answer!

wreality avatar Oct 20 '23 15:10 wreality

That's indeed something you can't do unfortunately. We are in the process of reworking the config UI so this will be something we'll rework as well. Thanks for your input :)

robot9706 avatar Oct 20 '23 15:10 robot9706