You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user-manuals/cloneset.md
+97-1Lines changed: 97 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -529,6 +529,103 @@ spec:
529
529
paused: true
530
530
```
531
531
532
+
### Progress Deadline Seconds
533
+
534
+
**FEATURE STATE:** Kruise v1.9.0
535
+
536
+
The `.spec.progressDeadlineSeconds` field is an optional field that defines the maximum time (in seconds) the CloneSet controller waits before determining that a rollout has failed to make progress. When this deadline is exceeded without progress, the CloneSet controller records the following condition in the resource status:
537
+
```yaml
538
+
type: Progressing
539
+
status: False
540
+
reason: ProgressDeadlineExceeded
541
+
```
542
+
543
+
By default, CloneSet does not set this value, so the CloneSet controller will not record the condition to `.status.conditions` while the rollout is ongoing.
544
+
545
+
Once this value is set, the CloneSet controller will continuously check the rollout status within the specified time. Higher-level orchestration systems can leverage this status to trigger corresponding actions, e.g.rollback the CloneSet (even when this status is marked as timeout, it does not affect the underlying CloneSet controller's continued rolling updates of Pods).
546
+
> **Note:**
547
+
>
548
+
> If specified, this field value must be greater than `.spec.minReadySeconds`.
549
+
550
+
Therefore, by configuring `.spec.progressDeadlineSeconds`, a CloneSet will traverse multiple states during its lifecycle:
551
+
- Progressing: the rollout is ongoing.
552
+
- Complete: the partition update is successful or the rollout is successful.
553
+
- Failed: the rollout is timeout.
554
+
555
+
#### Progressing CloneSet
556
+
A CloneSet is marked as Progressing when performing any of the following operations:
557
+
558
+
- Rolling out a new revision.
559
+
- Scaling up the newest revision during upgrade.
560
+
- Scaling down older revisions during upgrade.
561
+
- New Pods are ready or available (satisfying MinReadySeconds condition).
562
+
563
+
When the rollout enters the "Progressing" state, the CloneSet controller adds the following condition to the CloneSet's `.status.conditions`:
564
+
```yaml
565
+
type: Progressing
566
+
status: "True"
567
+
reason: CloneSetUpdated
568
+
```
569
+
570
+
#### Complete CloneSet
571
+
The Complete state is divided into two substates:
572
+
573
+
**Partition Paused:**
574
+
575
+
A CloneSet enters the partition paused state when:
576
+
- All replicas associated with the CloneSet partition have been updated to the specified latest revision.
577
+
- All replicas associated with the CloneSet partition are available.
578
+
579
+
The CloneSet controller adds the following condition to the CloneSet's `.status.conditions`:
580
+
```yaml
581
+
type: Progressing
582
+
status: "True"
583
+
reason: ProgressPartitionAvailable
584
+
```
585
+
586
+
**Available:**
587
+
588
+
A CloneSet is marked as available when:
589
+
590
+
- All replicas have been updated to the latest specified revision.
591
+
- All replicas are available.
592
+
- No old revision replicas are running.
593
+
594
+
The CloneSet controller adds the following condition to the CloneSet's `.status.conditions`:
595
+
```yaml
596
+
type: Progressing
597
+
status: "True"
598
+
reason: CloneSetAvailable
599
+
```
600
+
601
+
The Progressing condition maintains a status value of "True" until a new revision is initiated. This condition persists even when replica availability changes (which affects the Available condition instead).
602
+
603
+
#### Failed CloneSet
604
+
A CloneSet enters the Failed state when it cannot successfully deploy the latest revision. Common causes include:
605
+
606
+
- Insufficient quota
607
+
- Readiness probe failures
608
+
- Image pull errors
609
+
- Insufficient permissions
610
+
- Limit ranges
611
+
- Application runtime misconfiguration
612
+
613
+
This condition can be detected by configuring the `.spec.progressDeadlineSeconds` parameter. Once the deadline is exceeded, the CloneSet controller adds the following condition to the CloneSet's `.status.conditions`:
614
+
```yaml
615
+
type: Progressing
616
+
status: "False"
617
+
reason: ProgressDeadlineExceeded
618
+
```
619
+
620
+
> **Note:**
621
+
>
622
+
> When a CloneSet rollout is paused, the controller stops progress checking against the specified deadline. Users can safely pause and resume a CloneSet rollout in the middle of the rollout without triggering the deadline exceeded condition.
623
+
624
+
#### Operations on Failed CloneSet
625
+
All operations applicable to a Complete CloneSet can also be applied to a Failed CloneSet, including:
626
+
- Rolling back to a previous revision.
627
+
- Pausing the rollout to make multiple adjustments to the Pod template.
628
+
532
629
### In-Place Update Support for Modifying Resources
533
630
534
631
**FEATURE STATE:** Kruise v1.8.0
@@ -762,4 +859,3 @@ Currently, both status and metadata changes of Pods will trigger the reconcile o
762
859
763
860
However, for larger clusters or scenarios with frequent Pod update events, these unnecessary reconciles will block the real CloneSet reconciles, resulting in delayed rolling updates and other changes.
764
861
To solve this problem, you can enable the **feature-gate CloneSetEventHandlerOptimization** to reduce some unnecessary reconcile enqueues.
0 commit comments