Skip to content

Commit

Permalink
Merge pull request #3508 from Poor12/revert-fields
Browse files Browse the repository at this point in the history
Revert preConditions and blockPredecessorSeconds in failover
  • Loading branch information
karmada-bot authored May 9, 2023
2 parents e40912f + 5bdd837 commit 17eae7d
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 331 deletions.
24 changes: 0 additions & 24 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -15038,11 +15038,6 @@
"decisionConditions"
],
"properties": {
"blockPredecessorSeconds": {
"description": "BlockPredecessorSeconds represents the period of time the cluster from which the application was migrated from can be schedulable again. During the period of BlockPredecessorSeconds, clusters are forcibly filtered out by the scheduler. If not specified or the value is zero, the evicted cluster is schedulable to the application when rescheduling. Defaults to 600s.",
"type": "integer",
"format": "int32"
},
"decisionConditions": {
"description": "DecisionConditions indicates the decision conditions of performing the failover process. Only when all conditions are met can the failover process be performed. Currently, DecisionConditions includes several conditions: - TolerationSeconds (optional)",
"default": {},
Expand All @@ -15053,10 +15048,6 @@
"type": "integer",
"format": "int32"
},
"preConditions": {
"description": "PreConditions indicates the preconditions of the failover process. If specified, only when all conditions are met can the failover process be started. Currently, PreConditions includes several conditions: - DelaySeconds (optional) - HealthyState (optional)",
"$ref": "#/definitions/com.github.karmada-io.karmada.pkg.apis.policy.v1alpha1.PreConditions"
},
"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\". Defaults to \"Graciously\".",
"type": "string"
Expand Down Expand Up @@ -15788,21 +15779,6 @@
}
}
},
"com.github.karmada-io.karmada.pkg.apis.policy.v1alpha1.PreConditions": {
"description": "PreConditions represents the preconditions of the failover process.",
"type": "object",
"properties": {
"delaySeconds": {
"description": "DelaySeconds refers to a period of time after the control plane collects the status of the application for the first time. If specified, the failover process will be started after DelaySeconds is reached. It can be used simultaneously with HealthyState and does not affect each other.",
"type": "integer",
"format": "int32"
},
"healthyState": {
"description": "HealthyState refers to the healthy status reported by the Karmada resource interpreter. Valid option is \"Healthy\". If specified, the failover process will be started when the application reaches the healthy state. It can be used simultaneously with DelaySeconds and does not affect each other.",
"type": "string"
}
}
},
"com.github.karmada-io.karmada.pkg.apis.policy.v1alpha1.PropagationPolicy": {
"description": "PropagationPolicy represents the policy that propagates a group of resources to one or more clusters.",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,6 @@ spec:
If set, the PropagateDeps should be true so that the dependencies
could be migrated along with the application.
properties:
blockPredecessorSeconds:
default: 600
description: BlockPredecessorSeconds represents the period
of time the cluster from which the application was migrated
from can be schedulable again. During the period of BlockPredecessorSeconds,
clusters are forcibly filtered out by the scheduler. If
not specified or the value is zero, the evicted cluster
is schedulable to the application when rescheduling. Defaults
to 600s.
format: int32
type: integer
decisionConditions:
description: 'DecisionConditions indicates the decision conditions
of performing the failover process. Only when all conditions
Expand Down Expand Up @@ -109,31 +98,6 @@ spec:
integer.
format: int32
type: integer
preConditions:
description: 'PreConditions indicates the preconditions of
the failover process. If specified, only when all conditions
are met can the failover process be started. Currently,
PreConditions includes several conditions: - DelaySeconds
(optional) - HealthyState (optional)'
properties:
delaySeconds:
description: DelaySeconds refers to a period of time after
the control plane collects the status of the application
for the first time. If specified, the failover process
will be started after DelaySeconds is reached. It can
be used simultaneously with HealthyState and does not
affect each other.
format: int32
type: integer
healthyState:
description: HealthyState refers to the healthy status
reported by the Karmada resource interpreter. Valid
option is "Healthy". If specified, the failover process
will be started when the application reaches the healthy
state. It can be used simultaneously with DelaySeconds
and does not affect each other.
type: string
type: object
purgeMode:
default: Graciously
description: PurgeMode represents how to deal with the legacy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,6 @@ spec:
If set, the PropagateDeps should be true so that the dependencies
could be migrated along with the application.
properties:
blockPredecessorSeconds:
default: 600
description: BlockPredecessorSeconds represents the period
of time the cluster from which the application was migrated
from can be schedulable again. During the period of BlockPredecessorSeconds,
clusters are forcibly filtered out by the scheduler. If
not specified or the value is zero, the evicted cluster
is schedulable to the application when rescheduling. Defaults
to 600s.
format: int32
type: integer
decisionConditions:
description: 'DecisionConditions indicates the decision conditions
of performing the failover process. Only when all conditions
Expand Down Expand Up @@ -105,31 +94,6 @@ spec:
integer.
format: int32
type: integer
preConditions:
description: 'PreConditions indicates the preconditions of
the failover process. If specified, only when all conditions
are met can the failover process be started. Currently,
PreConditions includes several conditions: - DelaySeconds
(optional) - HealthyState (optional)'
properties:
delaySeconds:
description: DelaySeconds refers to a period of time after
the control plane collects the status of the application
for the first time. If specified, the failover process
will be started after DelaySeconds is reached. It can
be used simultaneously with HealthyState and does not
affect each other.
format: int32
type: integer
healthyState:
description: HealthyState refers to the healthy status
reported by the Karmada resource interpreter. Valid
option is "Healthy". If specified, the failover process
will be started when the application reaches the healthy
state. It can be used simultaneously with DelaySeconds
and does not affect each other.
type: string
type: object
purgeMode:
default: Graciously
description: PurgeMode represents how to deal with the legacy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,17 +275,6 @@ spec:
If set, the PropagateDeps should be true so that the dependencies
could be migrated along with the application.
properties:
blockPredecessorSeconds:
default: 600
description: BlockPredecessorSeconds represents the period
of time the cluster from which the application was migrated
from can be schedulable again. During the period of BlockPredecessorSeconds,
clusters are forcibly filtered out by the scheduler. If
not specified or the value is zero, the evicted cluster
is schedulable to the application when rescheduling. Defaults
to 600s.
format: int32
type: integer
decisionConditions:
description: 'DecisionConditions indicates the decision conditions
of performing the failover process. Only when all conditions
Expand Down Expand Up @@ -313,31 +302,6 @@ spec:
integer.
format: int32
type: integer
preConditions:
description: 'PreConditions indicates the preconditions of
the failover process. If specified, only when all conditions
are met can the failover process be started. Currently,
PreConditions includes several conditions: - DelaySeconds
(optional) - HealthyState (optional)'
properties:
delaySeconds:
description: DelaySeconds refers to a period of time after
the control plane collects the status of the application
for the first time. If specified, the failover process
will be started after DelaySeconds is reached. It can
be used simultaneously with HealthyState and does not
affect each other.
format: int32
type: integer
healthyState:
description: HealthyState refers to the healthy status
reported by the Karmada resource interpreter. Valid
option is "Healthy". If specified, the failover process
will be started when the application reaches the healthy
state. It can be used simultaneously with DelaySeconds
and does not affect each other.
type: string
type: object
purgeMode:
default: Graciously
description: PurgeMode represents how to deal with the legacy
Expand Down
36 changes: 0 additions & 36 deletions charts/karmada/_crds/bases/work.karmada.io_resourcebindings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -275,17 +275,6 @@ spec:
If set, the PropagateDeps should be true so that the dependencies
could be migrated along with the application.
properties:
blockPredecessorSeconds:
default: 600
description: BlockPredecessorSeconds represents the period
of time the cluster from which the application was migrated
from can be schedulable again. During the period of BlockPredecessorSeconds,
clusters are forcibly filtered out by the scheduler. If
not specified or the value is zero, the evicted cluster
is schedulable to the application when rescheduling. Defaults
to 600s.
format: int32
type: integer
decisionConditions:
description: 'DecisionConditions indicates the decision conditions
of performing the failover process. Only when all conditions
Expand Down Expand Up @@ -313,31 +302,6 @@ spec:
integer.
format: int32
type: integer
preConditions:
description: 'PreConditions indicates the preconditions of
the failover process. If specified, only when all conditions
are met can the failover process be started. Currently,
PreConditions includes several conditions: - DelaySeconds
(optional) - HealthyState (optional)'
properties:
delaySeconds:
description: DelaySeconds refers to a period of time after
the control plane collects the status of the application
for the first time. If specified, the failover process
will be started after DelaySeconds is reached. It can
be used simultaneously with HealthyState and does not
affect each other.
format: int32
type: integer
healthyState:
description: HealthyState refers to the healthy status
reported by the Karmada resource interpreter. Valid
option is "Healthy". If specified, the failover process
will be started when the application reaches the healthy
state. It can be used simultaneously with DelaySeconds
and does not affect each other.
type: string
type: object
purgeMode:
default: Graciously
description: PurgeMode represents how to deal with the legacy
Expand Down
50 changes: 0 additions & 50 deletions pkg/apis/policy/v1alpha1/propagation_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,21 +165,6 @@ const (
Never PurgeMode = "Never"
)

// ResourceHealth represents that the health status of the reference resource.
type ResourceHealth string

const (
// ResourceHealthy represents that the health status of the current resource
// that applied on the managed cluster is healthy.
ResourceHealthy ResourceHealth = "Healthy"
// ResourceUnhealthy represents that the health status of the current resource
// that applied on the managed cluster is unhealthy.
ResourceUnhealthy ResourceHealth = "Unhealthy"
// ResourceUnknown represents that the health status of the current resource
// that applied on the managed cluster is unknown.
ResourceUnknown ResourceHealth = "Unknown"
)

// FailoverBehavior indicates failover behaviors in case of an application or
// cluster failure.
type FailoverBehavior struct {
Expand All @@ -198,14 +183,6 @@ type FailoverBehavior struct {

// ApplicationFailoverBehavior indicates application failover behaviors.
type ApplicationFailoverBehavior struct {
// PreConditions indicates the preconditions of the failover process.
// If specified, only when all conditions are met can the failover process be started.
// Currently, PreConditions includes several conditions:
// - DelaySeconds (optional)
// - HealthyState (optional)
// +optional
PreConditions *PreConditions `json:"preConditions,omitempty"`

// DecisionConditions indicates the decision conditions of performing the failover process.
// Only when all conditions are met can the failover process be performed.
// Currently, DecisionConditions includes several conditions:
Expand All @@ -229,33 +206,6 @@ type ApplicationFailoverBehavior struct {
// Value must be positive integer.
// +optional
GracePeriodSeconds *int32 `json:"gracePeriodSeconds,omitempty"`

// BlockPredecessorSeconds represents the period of time the cluster from which the
// application was migrated from can be schedulable again.
// During the period of BlockPredecessorSeconds, clusters are forcibly filtered out by the scheduler.
// If not specified or the value is zero, the evicted cluster is schedulable to the application when rescheduling.
// Defaults to 600s.
// +kubebuilder:default=600
// +optional
BlockPredecessorSeconds *int32 `json:"blockPredecessorSeconds,omitempty"`
}

// PreConditions represents the preconditions of the failover process.
type PreConditions struct {
// DelaySeconds refers to a period of time after the control plane collects
// the status of the application for the first time.
// If specified, the failover process will be started after DelaySeconds is reached.
// It can be used simultaneously with HealthyState and does not affect each other.
// +optional
DelaySeconds *int32 `json:"delaySeconds,omitempty"`

// HealthyState refers to the healthy status reported by the Karmada resource
// interpreter.
// Valid option is "Healthy".
// If specified, the failover process will be started when the application reaches the healthy state.
// It can be used simultaneously with DelaySeconds and does not affect each other.
// +optional
HealthyState ResourceHealth `json:"healthyState,omitempty"`
}

// DecisionConditions represents the decision conditions of performing the failover process.
Expand Down
Loading

0 comments on commit 17eae7d

Please sign in to comment.