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

Add Cmd validation for v1alpha2 Template commands #695

Merged
merged 1 commit into from
Apr 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions api/v1alpha2/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ type Action struct {
// Image is an OCI image.
Image string `json:"image"`

// Cmd defines the command to use when launching the image.
// Cmd defines the command to use when launching the image. It overrides the default command
// of the action. It must be a unix path to an executable program.
// +kubebuilder:validation:Pattern=`^(/[^/ ]*)+/?$`
// +optional
Cmd *string `json:"cmd,omitempty"`

// Args are a set of arguments to be passed to the container on launch.
// Args are a set of arguments to be passed to the command executed by the container on
// launch.
// +optional
Args []string `json:"args,omitempty"`

Expand Down