Skip to content

Commit

Permalink
add validation for failover api
Browse files Browse the repository at this point in the history
Signed-off-by: whitewindmills <[email protected]>
  • Loading branch information
whitewindmills committed Aug 6, 2024
1 parent 4124ba8 commit 384f260
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ spec:
cluster from which the application is migrated.
Valid options are "Immediately", "Graciously" and "Never".
Defaults to "Graciously".
enum:
- Immediately
- Graciously
- Never
type: string
required:
- decisionConditions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ spec:
cluster from which the application is migrated.
Valid options are "Immediately", "Graciously" and "Never".
Defaults to "Graciously".
enum:
- Immediately
- Graciously
- Never
type: string
required:
- decisionConditions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,10 @@ spec:
cluster from which the application is migrated.
Valid options are "Immediately", "Graciously" and "Never".
Defaults to "Graciously".
enum:
- Immediately
- Graciously
- Never
type: string
required:
- decisionConditions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,10 @@ spec:
cluster from which the application is migrated.
Valid options are "Immediately", "Graciously" and "Never".
Defaults to "Graciously".
enum:
- Immediately
- Graciously
- Never
type: string
required:
- decisionConditions
Expand Down
1 change: 1 addition & 0 deletions pkg/apis/policy/v1alpha1/propagation_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ type ApplicationFailoverBehavior struct {
// cluster from which the application is migrated.
// Valid options are "Immediately", "Graciously" and "Never".
// Defaults to "Graciously".
// +kubebuilder:validation:Enum=Immediately;Graciously;Never
// +kubebuilder:default=Graciously
// +optional
PurgeMode PurgeMode `json:"purgeMode,omitempty"`
Expand Down

0 comments on commit 384f260

Please sign in to comment.