Skip to content

Commit

Permalink
Merge pull request #5816 from mszacillo/purgemode-api
Browse files Browse the repository at this point in the history
feat(stateful failover support) Introduce PurgeMode to GracefulEvictionTask in ResourceBinding
  • Loading branch information
karmada-bot authored Nov 15, 2024
2 parents 0d7d2f9 + 9b92cc4 commit 35b7e8f
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -20080,6 +20080,10 @@
"type": "string",
"default": ""
},
"purgeMode": {
"description": "PurgeMode represents how to deal with the legacy applications on the cluster from which the application is migrated. Valid options are \"Immediately\", \"Graciously\" and \"Never\".",
"type": "string"
},
"reason": {
"description": "Reason contains a programmatic identifier indicating the reason for the eviction. Producers may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.",
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,16 @@ spec:
description: Producer indicates the controller who triggered
the eviction.
type: string
purgeMode:
description: |-
PurgeMode represents how to deal with the legacy applications on the
cluster from which the application is migrated.
Valid options are "Immediately", "Graciously" and "Never".
enum:
- Immediately
- Graciously
- Never
type: string
reason:
description: |-
Reason contains a programmatic identifier indicating the reason for the eviction.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,16 @@ spec:
description: Producer indicates the controller who triggered
the eviction.
type: string
purgeMode:
description: |-
PurgeMode represents how to deal with the legacy applications on the
cluster from which the application is migrated.
Valid options are "Immediately", "Graciously" and "Never".
enum:
- Immediately
- Graciously
- Never
type: string
reason:
description: |-
Reason contains a programmatic identifier indicating the reason for the eviction.
Expand Down
7 changes: 7 additions & 0 deletions pkg/apis/work/v1alpha2/binding_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,13 @@ type GracefulEvictionTask struct {
// +required
FromCluster string `json:"fromCluster"`

// PurgeMode represents how to deal with the legacy applications on the
// cluster from which the application is migrated.
// Valid options are "Immediately", "Graciously" and "Never".
// +kubebuilder:validation:Enum=Immediately;Graciously;Never
// +optional
PurgeMode policyv1alpha1.PurgeMode `json:"purgeMode,omitempty"`

// Replicas indicates the number of replicas should be evicted.
// Should be ignored for resource type that doesn't have replica.
// +optional
Expand Down
7 changes: 7 additions & 0 deletions pkg/generated/openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 35b7e8f

Please sign in to comment.