fix(schema): require at least one element in command and args arrays - #215
Open
Phoenix1504e wants to merge 1 commit into
Open
Phoenix1504e wants to merge 1 commit into
Phoenix1504e wants to merge 1 commit into
Conversation
Add minItems: 1 to container.command, container.args, and execProbe.command. An empty array previously passed schema validation but is guaranteed to fail at runtime; the Kubernetes API server rejects empty exec probe commands with error Invalid value: []string(nil). Fixes score-spec#197 Signed-off-by: Aditya Pathak <68177924+Phoenix1504e@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Closes the gap where "valid schema, broken deploy" documents pass validation. An explicitly empty
command/argsarray cannot execute in any container runtime, so schema validation should reject it at authoring time rather than letting it surface at deploy time.Only documents that already fail at runtime are affected;
v1b1is a beta schema, so this is not treated as a breaking change and no version bump is required.Fixes #197
Types of changes
Checklist: