Skip to content

Commit 537b7f1

Browse files
committed
fix: adjust the structure and rename some fields
1 parent 9dc0f83 commit 537b7f1

3 files changed

Lines changed: 16 additions & 51 deletions

File tree

config/crd/rollout/rollout.kusionstack.io_rolloutstrategies.yaml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4564,32 +4564,6 @@ spec:
45644564
- targets
45654565
type: object
45664566
type: array
4567-
toleration:
4568-
description: Toleration is the toleration policy of the canary strategy
4569-
properties:
4570-
initialDelaySeconds:
4571-
description: Number of seconds after the toleration check has started before the task are initiated.
4572-
format: int32
4573-
type: integer
4574-
taskFailureThreshold:
4575-
anyOf:
4576-
- type: integer
4577-
- type: string
4578-
description: |-
4579-
FailureThreshold indicates how many failed pods can be tolerated before marking the rollout task as success
4580-
If not set, the default value is 0, which means no failed pods can be tolerated
4581-
This is a task level threshold.
4582-
x-kubernetes-int-or-string: true
4583-
workloadTotalFailureThreshold:
4584-
anyOf:
4585-
- type: integer
4586-
- type: string
4587-
description: |-
4588-
WorkloadFailureThreshold indicates how many failed pods can be tolerated in all upgraded pods of one workload.
4589-
The default value is 0, which means no failed pods can be tolerated.
4590-
This is a workload level threshold.
4591-
x-kubernetes-int-or-string: true
4592-
type: object
45934567
type: object
45944568
canary:
45954569
description: Canary defines the canary strategy for upgrade and operation

rollout/v1alpha1/rolloutstrategy_types.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,7 @@ type BatchStrategy struct {
8282
// BatchStrategyV2 defines the v2 batch strategy
8383
type BatchStrategyV2 struct {
8484
// Batches define the order of phases to execute release in canary release
85-
Batches []RolloutBatchStep `json:"batches,omitempty"`
86-
87-
// Toleration is the toleration policy of the canary strategy
88-
// +optional
89-
Toleration *TolerationStrategy `json:"toleration,omitempty"`
85+
Batches []RolloutBatchStrategyStep `json:"batches,omitempty"`
9086
}
9187

9288
// TolerationStrategy defines the toleration strategy
@@ -134,9 +130,9 @@ type RolloutStep struct {
134130
Properties map[string]string `json:"properties,omitempty"`
135131
}
136132

137-
type RolloutBatchStep struct {
133+
type RolloutBatchStrategyStep struct {
138134
// rollout targets defines desired target replicas
139-
Targets []RolloutTargets `json:"targets"`
135+
Targets []RolloutStrategyTargets `json:"targets"`
140136

141137
// traffic strategy
142138
// +optional
@@ -174,7 +170,7 @@ type CanaryStrategy struct {
174170

175171
type CanaryStrategyV2 struct {
176172
// rollout targets defines desired target replicas
177-
Targets []RolloutTargets `json:"targets"`
173+
Targets []RolloutStrategyTargets `json:"targets"`
178174

179175
// traffic strategy
180176
// +optional
@@ -189,7 +185,7 @@ type CanaryStrategyV2 struct {
189185
TemplateMetadataPatch *MetadataPatch `json:"templateMetadataPatch,omitempty"`
190186
}
191187

192-
type RolloutTargets struct {
188+
type RolloutStrategyTargets struct {
193189
// Replicas is the replicas of the rollout task, which represents the number of pods to be upgraded
194190
Replicas intstr.IntOrString `json:"replicas"`
195191

rollout/v1alpha1/zz_generated.deepcopy.go

Lines changed: 11 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)