Skip to content
Closed
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
158 changes: 158 additions & 0 deletions config/crd/rollout/rollout.kusionstack.io_rolloutruns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4500,6 +4500,55 @@ spec:
required:
- targets
type: object
rollback:
description: Rollback Strategy
properties:
batches:
description: Batches define the order of phases to execute release in rollback release
items:
properties:
breakpoint:
description: If set to true, the rollout will be paused before the step starts.
type: boolean
properties:
additionalProperties:
type: string
description: Properties contains additional information for step
type: object
targets:
description: desired target replicas
items:
properties:
cluster:
description: Cluster indicates the name of cluster
type: string
name:
description: Name is the resource name
type: string
replicaSlidingWindow:
anyOf:
- type: integer
- type: string
description: |-
ReplicaSlidingWindow used to control the number of pods that are allowed to be upgraded in
a sliding window for progressive rollout smoothly.
x-kubernetes-int-or-string: true
replicas:
anyOf:
- type: integer
- 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
required:
- name
- replicas
type: object
type: array
required:
- targets
type: object
type: array
type: object
targetType:
description: TargetType defines the GroupVersionKind of target resource
properties:
Expand Down Expand Up @@ -4888,6 +4937,115 @@ spec:
phase:
description: Phase indecates the current phase of rollout
type: string
rollbackStatus:
description: RollbackStatus describes the state of the active rollback release
properties:
currentBatchIndex:
description: CurrentBatchIndex defines the current batch index of batch release progress.
format: int32
type: integer
currentBatchState:
description: CurrentBatchState indicates the current batch state.
type: string
records:
description: Records contains all batches status details.
items:
properties:
finishTime:
description: FinishTime is the time when the stage finished
format: date-time
type: string
index:
description: Index is the id of the batch
format: int32
type: integer
startTime:
description: StartTime is the time when the stage started
format: date-time
type: string
state:
description: State is Rollout step state
type: string
targets:
description: WorkloadDetails contains release details for each workload
items:
properties:
cluster:
description: Cluster defines which cluster the workload is in.
type: string
generation:
description: Generation is the found in workload metadata.
format: int64
type: integer
name:
description: Name is the workload name
type: string
observedGeneration:
description: ObservedGeneration is the most recent generation observed for this workload.
format: int64
type: integer
replicas:
description: Replicas is the desired number of pods targeted by workload
format: int32
type: integer
stableRevision:
description: StableRevision is the old stable revision used to generate pods.
type: string
updatedAvailableReplicas:
description: UpdatedAvailableReplicas is the number of service available pods targeted by workload that have the updated template spec.
format: int32
type: integer
updatedReadyReplicas:
description: UpdatedReadyReplicas is the number of ready pods targeted by workload that have the updated template spec.
format: int32
type: integer
updatedReplicas:
description: UpdatedReplicas is the number of pods targeted by workload that have the updated template spec.
format: int32
type: integer
updatedRevision:
description: UpdatedRevision is the updated template revision used to generate pods.
type: string
required:
- replicas
- updatedAvailableReplicas
- updatedReadyReplicas
- updatedReplicas
type: object
type: array
webhooks:
description: Webhooks contains webhook status
items:
properties:
code:
description: Code is a globally unique identifier
type: string
failureCount:
description: Failure count
format: int32
type: integer
hookType:
description: Webhook Type
type: string
message:
description: A human-readable message indicating details about the transition.
type: string
name:
description: Webhook Name
type: string
reason:
description: A human-readable short word
type: string
state:
description: Current webhook worker state
type: string
type: object
type: array
type: object
type: array
required:
- currentBatchIndex
type: object
targetStatuses:
description: TargetStatuses describes the referenced workloads status
items:
Expand Down
25 changes: 25 additions & 0 deletions rollout/v1alpha1/rolloutrun_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ type RolloutRunSpec struct {
// Batch Strategy
// +optional
Batch *RolloutRunBatchStrategy `json:"batch,omitempty"`

// Rollback Strategy
// +optional
Rollback *RolloutRunRollbackStrategy `json:"rollback,omitempty"`
}

type RolloutRunBatchStrategy struct {
Expand All @@ -81,6 +85,11 @@ type RolloutRunBatchStrategy struct {
Toleration *TolerationStrategy `json:"toleration,omitempty"`
}

type RolloutRunRollbackStrategy struct {
// Batches define the order of phases to execute release in rollback
Batches []RolloutRunRollbackStep `json:"batches,omitempty"`
}

type RolloutRunStep struct {
// desired target replicas
Targets []RolloutRunStepTarget `json:"targets"`
Expand Down Expand Up @@ -115,6 +124,19 @@ type RolloutRunCanaryStrategy struct {
TemplateMetadataPatch *MetadataPatch `json:"podTemplateMetadataPatch,omitempty"`
}

type RolloutRunRollbackStep struct {
// desired target replicas
Targets []RolloutRunStepTarget `json:"targets"`

// If set to true, the rollout will be paused before the step starts.
// +optional
Breakpoint bool `json:"breakpoint,omitempty"`

// Properties contains additional information for step.
// +optional
Properties map[string]string `json:"properties,omitempty"`
}

type RolloutRunStepTarget struct {
CrossClusterObjectNameReference `json:",inline"`

Expand Down Expand Up @@ -146,6 +168,9 @@ type RolloutRunStatus struct {
// BatchStatus describes the state of the active batch release
// +optional
BatchStatus *RolloutRunBatchStatus `json:"batchStatus,omitempty"`
// RollbackStatus describes the state of the active rollback release
// +optional
RollbackStatus *RolloutRunBatchStatus `json:"rollbackStatus,omitempty"`
// TargetStatuses describes the referenced workloads status
// +optional
TargetStatuses []RolloutWorkloadStatus `json:"targetStatuses,omitempty"`
Expand Down
63 changes: 63 additions & 0 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