@@ -116,10 +116,10 @@ type DeploymentStatus struct {
116116 // Total number of new ready pods with the desired template spec.
117117 UpdatedReplicas int32
118118
119- // Monotonically increasing counter that tracks hash collisions for
120- // the Deployment. Used as a collision avoidance mechanism by the
121- // Deployment controller .
122- Uniquifier *int64
119+ // Count of hash collisions for the Deployment. The Deployment controller uses this
120+ // field as a collision avoidance mechanism when it needs to create the name for the
121+ // newest ReplicaSet .
122+ CollisionCount *int64
123123}
124124
125125```
@@ -139,8 +139,8 @@ For each creation or update for a Deployment, it will:
139139 that they do not select the newly created pods (or old pods get selected by the
140140 new RS).
141141 - The label key will be "pod-template-hash".
142- - The label value will be the hash of {podTemplateSpec+uniquifier } where podTemplateSpec
143- is the one that the new RS uses and uniquifier is a counter in the DeploymentStatus
142+ - The label value will be the hash of {podTemplateSpec+collisionCount } where podTemplateSpec
143+ is the one that the new RS uses and collisionCount is a counter in the DeploymentStatus
144144 that increments every time a [ hash collision] ( #hashing-collisions ) happens (hash
145145 collisions should be rare with fnv).
146146 - If the RSs and pods dont already have this label and selector:
@@ -235,8 +235,8 @@ hashing an API object is subject to API changes which means that the name
235235for a ReplicaSet may differ between minor Kubernetes versions.
236236
237237For both of the aforementioned cases, we will use a field in the DeploymentStatus,
238- called Uniquifier , to create a unique hash value when a hash collision happens.
239- The Deployment controller will compute the hash value of {template+uniquifier },
238+ called collisionCount , to create a unique hash value when a hash collision happens.
239+ The Deployment controller will compute the hash value of {template+collisionCount },
240240and will use the resulting hash in the ReplicaSet names and selectors. One side
241241effect of this hash collision avoidance mechanism is that we don't need to
242242migrate ReplicaSets that were created with adler.
0 commit comments