Skip to content

Commit

Permalink
Introduce PurgeMode to GracefulEvictionTask in ResourceBinding
Browse files Browse the repository at this point in the history
Signed-off-by: mszacillo <[email protected]>
  • Loading branch information
mszacillo committed Nov 14, 2024
1 parent 2f80476 commit 9b92cc4
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 @@ -20054,6 +20054,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 9b92cc4

Please sign in to comment.