Skip to content

Commit

Permalink
fix: add args mode type
Browse files Browse the repository at this point in the history
  • Loading branch information
vsukhin committed Apr 19, 2023
1 parent dc6e2d8 commit 87d84aa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
13 changes: 12 additions & 1 deletion apis/tests/v3/test_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ type ExecutionRequest struct {
// additional executor binary arguments
Args []string `json:"args,omitempty"`
// usage mode for arguments
ArgsMode string `json:"argsMode,omitempty"`
ArgsMode ArgsModeType `json:"argsMode,omitempty"`
// executor binary command
Command []string `json:"command,omitempty"`
// container executor image
Expand Down Expand Up @@ -205,6 +205,17 @@ type ExecutionRequest struct {
RunningContext *RunningContext `json:"runningContext,omitempty"`
}

// ArgsModeType defines args mode type
// +kubebuilder:validation:Enum=append;override
type ArgsModeType string

const (
// ArgsModeTypeAppend for append args mode
ArgsModeTypeAppend ArgsModeType = "append"
// ArgsModeTypeOverride for override args mode
ArgsModeTypeOverride ArgsModeType = "override"
)

// Reference to env resource
type EnvReference struct {
v1.LocalObjectReference `json:"reference"`
Expand Down
3 changes: 3 additions & 0 deletions config/crd/bases/tests.testkube.io_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,9 @@ spec:
type: array
argsMode:
description: usage mode for arguments
enum:
- append
- override
type: string
artifactRequest:
description: artifact request body for container executors with
Expand Down

0 comments on commit 87d84aa

Please sign in to comment.