Skip to content

Commit

Permalink
Add enum validation
Browse files Browse the repository at this point in the history
  • Loading branch information
nstogner committed Oct 22, 2024
1 parent b1bb946 commit 61d63ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/jobset/v1alpha2/jobset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ type FailurePolicy struct {
Rules []FailurePolicyRule `json:"rules,omitempty"`
}

// +kubebuilder:validation:Enum=Recreate;BlockingRecreate
type JobSetRestartStrategy string

const (
Expand Down
3 changes: 3 additions & 0 deletions config/components/crd/bases/jobset.x-k8s.io_jobsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ spec:
description: |-
RestartStrategy defines the strategy to use when restarting the JobSet.
Defaults to Recreate.
enum:
- Recreate
- BlockingRecreate
type: string
rules:
description: |-
Expand Down

0 comments on commit 61d63ee

Please sign in to comment.