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

Validation error on initContainers command #865

Open
wreality opened this issue Oct 19, 2023 · 4 comments
Open

Validation error on initContainers command #865

wreality opened this issue Oct 19, 2023 · 4 comments

Comments

@wreality
Copy link

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

const initContainerRule = yup
.array(
yup.object().shape({
name: matchNoWhitespace(yup.string().required().label('container:common.name')),
image: yup.string().required().label('container:common.image'),
command: uniqueKeysOnlySchema.default([]).nullable().label('container:common.images'),
args: uniqueKeysOnlySchema.default([]).nullable().label('container:common.arguments'),
environment: uniqueKeyValuesSchema.default([]).nullable().label('container:common.environment'),
useParentConfig: yup.boolean().default(false).required().label('container:common.useParent'),
volumes: initContainerVolumeLinkRule.default([]).nullable().label('container:common.volumes'),
}),

@adarsh-jha-dev
Copy link

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

@robot9706
Copy link
Contributor

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

@wreality
Copy link
Author

@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!

@robot9706
Copy link
Contributor

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants