Skip to content
Merged
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
51 changes: 25 additions & 26 deletions config/crd/rollout/rollout.kusionstack.io_rolloutruns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2264,32 +2264,31 @@ spec:
- targets
type: object
type: array
toleration:
description: Toleration is the toleration policy of the canary strategy
properties:
initialDelaySeconds:
description: Number of seconds after the toleration check has started before the task are initiated.
format: int32
type: integer
taskFailureThreshold:
anyOf:
- type: integer
- type: string
description: |-
FailureThreshold indicates how many failed pods can be tolerated before marking the rollout task as success
If not set, the default value is 0, which means no failed pods can be tolerated
This is a task level threshold.
x-kubernetes-int-or-string: true
workloadTotalFailureThreshold:
anyOf:
- type: integer
- type: string
description: |-
WorkloadFailureThreshold indicates how many failed pods can be tolerated in all upgraded pods of one workload.
The default value is 0, which means no failed pods can be tolerated.
This is a workload level threshold.
x-kubernetes-int-or-string: true
type: object
tolerations:
description: |-
Tolerations records the accumulated toleration from skipped batches per workload.
When a batch is skipped, the gap between expected and actual replicas for each workload
is accumulated into this field, allowing subsequent batches to tolerate the deficit.
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
type: object
canary:
description: Canary defines the canary strategy
Expand Down
15 changes: 13 additions & 2 deletions rollout/v1alpha1/rolloutrun_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ type RolloutRunBatchStrategy struct {
// Batches define the order of phases to execute release in batch release
Batches []RolloutRunStep `json:"batches,omitempty"`

// Toleration is the toleration policy of the canary strategy
// Tolerations records the accumulated toleration from skipped batches per workload.
// When a batch is skipped, the gap between expected and actual replicas for each workload
// is accumulated into this field, allowing subsequent batches to tolerate the deficit.
// +optional
Toleration *TolerationStrategy `json:"toleration,omitempty"`
Tolerations []RolloutRunTolerationTarget `json:"tolerations,omitempty"`
}

type RolloutRunStep struct {
Expand Down Expand Up @@ -151,6 +153,15 @@ type RolloutRunStatus struct {
TargetStatuses []RolloutWorkloadStatus `json:"targetStatuses,omitempty"`
}

// RolloutRunTolerationTarget records the toleration value accumulated from skipped batches for a specific workload.
type RolloutRunTolerationTarget struct {
CrossClusterObjectNameReference `json:",inline"`

// Toleration is the accumulated toleration value from skipped batches.
// It represents how many replicas the workload is allowed to be short of.
Toleration int32 `json:"toleration"`
}

type RolloutRunBatchStatus struct {
// RolloutBatchStatus contains status of current batch
RolloutBatchStatus `json:",inline"`
Expand Down
25 changes: 21 additions & 4 deletions rollout/v1alpha1/zz_generated.deepcopy.go

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

Loading