mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Test and benchmark adler and fnv
This commit is contained in:
@@ -77,3 +77,13 @@ func GetReplicaSetHash(rs *extensions.ReplicaSet) string {
|
||||
Spec: rs.Spec.Template.Spec,
|
||||
}))
|
||||
}
|
||||
|
||||
// GetReplicaSetHashFnv returns the pod template hash of a ReplicaSet's pod template spec.
|
||||
func GetReplicaSetHashFnv(rs *extensions.ReplicaSet) string {
|
||||
meta := rs.Spec.Template.ObjectMeta
|
||||
meta.Labels = labelsutil.CloneAndRemoveLabel(meta.Labels, extensions.DefaultDeploymentUniqueLabelKey)
|
||||
return fmt.Sprintf("%d", GetPodTemplateSpecHashFnv(v1.PodTemplateSpec{
|
||||
ObjectMeta: meta,
|
||||
Spec: rs.Spec.Template.Spec,
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user