mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-05 01:55:42 +00:00
Automatic merge from submit-queue Use CollisionCount for collision avoidance in StatefulSet controller **What this PR does / why we need it**: This PR uses the newly added `CollisionCount` in `StatefulSetStatus` for name collision avoidance when the `StatefulSet` controller creates `ControllerRevision`s. The `CreateControllerRevision` method of the `ControllerHistory` interface was augmented to use a user-specified `collisionCount` instead of the internal probe that always starts with 0. The `StatefulSet` controller uses the `CreateControllerRevision` to create `ControllerRevision`s and when it calls it, it passes in the `CollisionCount` of the `StatefulSet` it manipulates. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #49909. **Special notes for your reviewer**: /assign @kow3ns **Release note**: ```release-note Use CollisionCount for collision avoidance when creating ControllerRevisions in StatefulSet controller ```