Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions config/crd/rollout/rollout.kusionstack.io_rolloutruns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,25 @@ spec:
- type: string
description: Replicas is the replicas of the rollout task, which represents the number of pods to be upgraded
x-kubernetes-int-or-string: true
toleration:
description: |-
Toleration defines the toleration config for this workload.
When set, if the number of unhealthy pods is within the FailureThreshold
and the InitialDelaySeconds has elapsed, this batch can be auto-skipped.
properties:
failureThreshold:
description: |-
FailureThreshold is the maximum number of unhealthy pods that can be tolerated for this workload.
This is a cumulative threshold: it represents the total allowable unhealthy pods up to the current batch.
When set, if the number of unhealthy pods (expected - updatedAvailable) is <= this threshold
and the InitialDelaySeconds has elapsed, the batch can be auto-skipped.
format: int32
type: integer
initialDelaySeconds:
description: InitialDelaySeconds is the number of seconds to wait before the toleration check can trigger auto-skip.
format: int32
type: integer
type: object
required:
- name
- replicas
Expand Down Expand Up @@ -2336,6 +2355,25 @@ spec:
- type: string
description: Replicas is the replicas of the rollout task, which represents the number of pods to be upgraded
x-kubernetes-int-or-string: true
toleration:
description: |-
Toleration defines the toleration config for this workload.
When set, if the number of unhealthy pods is within the FailureThreshold
and the InitialDelaySeconds has elapsed, this batch can be auto-skipped.
properties:
failureThreshold:
description: |-
FailureThreshold is the maximum number of unhealthy pods that can be tolerated for this workload.
This is a cumulative threshold: it represents the total allowable unhealthy pods up to the current batch.
When set, if the number of unhealthy pods (expected - updatedAvailable) is <= this threshold
and the InitialDelaySeconds has elapsed, the batch can be auto-skipped.
format: int32
type: integer
initialDelaySeconds:
description: InitialDelaySeconds is the number of seconds to wait before the toleration check can trigger auto-skip.
format: int32
type: integer
type: object
required:
- name
- replicas
Expand Down Expand Up @@ -4739,6 +4777,28 @@ spec:
type: array
type: object
type: array
tolerations:
description: Tolerations records the toleration state from skipped batches per workload.
items:
description: RolloutRunTolerationTarget records the toleration value accumulated from skipped batches for a specific workload.
properties:
cluster:
description: Cluster indicates the name of cluster
type: string
name:
description: Name is the resource name
type: string
toleration:
description: |-
Toleration is the accumulated toleration value from skipped batches.
It represents how many replicas the workload is allowed to be short of.
format: int32
type: integer
required:
- name
- toleration
type: object
type: array
required:
- currentBatchIndex
type: object
Expand Down
38 changes: 38 additions & 0 deletions config/crd/rollout/rollout.kusionstack.io_rolloutstrategies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2401,6 +2401,25 @@ spec:
- type: string
description: Replicas is the replicas of the rollout task, which represents the number of pods to be upgraded
x-kubernetes-int-or-string: true
toleration:
description: |-
Toleration defines the toleration config for this workload.
When set, if the number of unhealthy pods is within the FailureThreshold
and the InitialDelaySeconds has elapsed, this batch can be auto-skipped.
properties:
failureThreshold:
description: |-
FailureThreshold is the maximum number of unhealthy pods that can be tolerated for this workload.
This is a cumulative threshold: it represents the total allowable unhealthy pods up to the current batch.
When set, if the number of unhealthy pods (expected - updatedAvailable) is <= this threshold
and the InitialDelaySeconds has elapsed, the batch can be auto-skipped.
format: int32
type: integer
initialDelaySeconds:
description: InitialDelaySeconds is the number of seconds to wait before the toleration check can trigger auto-skip.
format: int32
type: integer
type: object
required:
- replicas
type: object
Expand Down Expand Up @@ -6902,6 +6921,25 @@ spec:
- type: string
description: Replicas is the replicas of the rollout task, which represents the number of pods to be upgraded
x-kubernetes-int-or-string: true
toleration:
description: |-
Toleration defines the toleration config for this workload.
When set, if the number of unhealthy pods is within the FailureThreshold
and the InitialDelaySeconds has elapsed, this batch can be auto-skipped.
properties:
failureThreshold:
description: |-
FailureThreshold is the maximum number of unhealthy pods that can be tolerated for this workload.
This is a cumulative threshold: it represents the total allowable unhealthy pods up to the current batch.
When set, if the number of unhealthy pods (expected - updatedAvailable) is <= this threshold
and the InitialDelaySeconds has elapsed, the batch can be auto-skipped.
format: int32
type: integer
initialDelaySeconds:
description: InitialDelaySeconds is the number of seconds to wait before the toleration check can trigger auto-skip.
format: int32
type: integer
type: object
required:
- replicas
type: object
Expand Down
92 changes: 92 additions & 0 deletions config/crd/rollout/rollout.kusionstack.io_scaleruns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,28 @@ spec:
resource
format: int32
type: integer
toleration:
description: |-
Toleration defines the toleration config for this workload.
Only effective for scale-up scenarios (ScaleFrom < ScaleTo).
When set, if the number of unhealthy pods is within the FailureThreshold
and the InitialDelaySeconds has elapsed, this batch can be auto-skipped.
properties:
failureThreshold:
description: |-
FailureThreshold is the maximum number of unhealthy pods that can be tolerated for this workload.
This is a cumulative threshold: it represents the total allowable unhealthy pods up to the current batch.
When set, if the number of unhealthy pods (expected - updatedAvailable) is <= this threshold
and the InitialDelaySeconds has elapsed, the batch can be auto-skipped.
format: int32
type: integer
initialDelaySeconds:
description: InitialDelaySeconds is the number
of seconds to wait before the toleration check
can trigger auto-skip.
format: int32
type: integer
type: object
required:
- name
- replicas
Expand Down Expand Up @@ -138,6 +160,28 @@ spec:
resource
format: int32
type: integer
toleration:
description: |-
Toleration defines the toleration config for this workload.
Only effective for scale-up scenarios (ScaleFrom < ScaleTo).
When set, if the number of unhealthy pods is within the FailureThreshold
and the InitialDelaySeconds has elapsed, this batch can be auto-skipped.
properties:
failureThreshold:
description: |-
FailureThreshold is the maximum number of unhealthy pods that can be tolerated for this workload.
This is a cumulative threshold: it represents the total allowable unhealthy pods up to the current batch.
When set, if the number of unhealthy pods (expected - updatedAvailable) is <= this threshold
and the InitialDelaySeconds has elapsed, the batch can be auto-skipped.
format: int32
type: integer
initialDelaySeconds:
description: InitialDelaySeconds is the number
of seconds to wait before the toleration check
can trigger auto-skip.
format: int32
type: integer
type: object
required:
- name
- replicas
Expand Down Expand Up @@ -383,6 +427,30 @@ spec:
type: array
type: object
type: array
tolerations:
description: Tolerations records the toleration state from skipped
batches per workload.
items:
description: RolloutRunTolerationTarget records the toleration
value accumulated from skipped batches for a specific workload.
properties:
cluster:
description: Cluster indicates the name of cluster
type: string
name:
description: Name is the resource name
type: string
toleration:
description: |-
Toleration is the accumulated toleration value from skipped batches.
It represents how many replicas the workload is allowed to be short of.
format: int32
type: integer
required:
- name
- toleration
type: object
type: array
required:
- currentBatchIndex
type: object
Expand Down Expand Up @@ -562,6 +630,30 @@ spec:
type: array
type: object
type: array
tolerations:
description: Tolerations records the toleration state from skipped
batches per workload.
items:
description: RolloutRunTolerationTarget records the toleration
value accumulated from skipped batches for a specific workload.
properties:
cluster:
description: Cluster indicates the name of cluster
type: string
name:
description: Name is the resource name
type: string
toleration:
description: |-
Toleration is the accumulated toleration value from skipped batches.
It represents how many replicas the workload is allowed to be short of.
format: int32
type: integer
required:
- name
- toleration
type: object
type: array
required:
- currentBatchIndex
type: object
Expand Down
19 changes: 19 additions & 0 deletions rollout/v1alpha1/rollout_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,31 @@ const (
RolloutReasonProgressingError = "Error"
)

// RolloutStepTargetToleration defines the toleration config for a single workload in a batch step.
// When the number of unhealthy pods is within the FailureThreshold, and the InitialDelaySeconds
// has elapsed, the batch step can be automatically skipped.
type RolloutStepTargetToleration struct {
// FailureThreshold is the maximum number of unhealthy pods that can be tolerated for this workload.
// This is a cumulative threshold: it represents the total allowable unhealthy pods up to the current batch.
// When set, if the number of unhealthy pods (expected - updatedAvailable) is <= this threshold
// and the InitialDelaySeconds has elapsed, the batch can be auto-skipped.
// +optional
FailureThreshold *int32 `json:"failureThreshold,omitempty"`

// InitialDelaySeconds is the number of seconds to wait before the toleration check can trigger auto-skip.
// +optional
InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"`
}

// RolloutBatchStatus defines the status of batch release.
type RolloutBatchStatus struct {
// CurrentBatchIndex defines the current batch index of batch release progress.
CurrentBatchIndex int32 `json:"currentBatchIndex"`
// CurrentBatchState indicates the current batch state.
CurrentBatchState RolloutStepState `json:"currentBatchState,omitempty"`
// Tolerations records the toleration state from skipped batches per workload.
// +optional
Tolerations []RolloutRunTolerationTarget `json:"tolerations,omitempty"`
}

type RolloutReplicasSummary struct {
Expand Down
6 changes: 6 additions & 0 deletions rollout/v1alpha1/rolloutrun_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ type RolloutRunStepTarget struct {
// a sliding window for progressive rollout smoothly.
// +optional
ReplicaSlidingWindow *intstr.IntOrString `json:"replicaSlidingWindow,omitempty"`

// Toleration defines the toleration config for this workload.
// When set, if the number of unhealthy pods is within the FailureThreshold
// and the InitialDelaySeconds has elapsed, this batch can be auto-skipped.
// +optional
Toleration *RolloutStepTargetToleration `json:"toleration,omitempty"`
}

type RolloutRunStatus struct {
Expand Down
6 changes: 6 additions & 0 deletions rollout/v1alpha1/rolloutstrategy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,10 @@ type RolloutStrategyTargets struct {
// Match defines condition used for matching resource cross clusterset
// +optional
Match *ResourceMatch `json:"matchTargets,omitempty"`

// Toleration defines the toleration config for this workload.
// When set, if the number of unhealthy pods is within the FailureThreshold
// and the InitialDelaySeconds has elapsed, this batch can be auto-skipped.
// +optional
Toleration *RolloutStepTargetToleration `json:"toleration,omitempty"`
}
7 changes: 7 additions & 0 deletions rollout/v1alpha1/scalerun_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ type ScaleRunStepTarget struct {

// Replicas is the replicas of the scale task, which represents the replicas of the target resource
Replicas int32 `json:"replicas"`

// Toleration defines the toleration config for this workload.
// Only effective for scale-up scenarios (ScaleFrom < ScaleTo).
// When set, if the number of unhealthy pods is within the FailureThreshold
// and the InitialDelaySeconds has elapsed, this batch can be auto-skipped.
// +optional
Toleration *RolloutStepTargetToleration `json:"toleration,omitempty"`
}

type MultipleReplia struct {
Expand Down
Loading
Loading