mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-29 21:29:24 +00:00
Merge pull request #19331 from resouer/hash-util
Auto commit by PR queue bot
This commit is contained in:
@@ -25,7 +25,7 @@ import (
|
||||
"k8s.io/kubernetes/pkg/apis/extensions"
|
||||
client "k8s.io/kubernetes/pkg/client/unversioned"
|
||||
"k8s.io/kubernetes/pkg/labels"
|
||||
"k8s.io/kubernetes/pkg/util"
|
||||
hashutil "k8s.io/kubernetes/pkg/util/hash"
|
||||
)
|
||||
|
||||
// GetOldRCs returns the old RCs targeted by the given Deployment; get PodList and RCList from client interface.
|
||||
@@ -141,7 +141,7 @@ func CloneAndAddLabel(labels map[string]string, labelKey string, labelValue uint
|
||||
|
||||
func GetPodTemplateSpecHash(template api.PodTemplateSpec) uint32 {
|
||||
podTemplateSpecHasher := adler32.New()
|
||||
util.DeepHashObject(podTemplateSpecHasher, template)
|
||||
hashutil.DeepHashObject(podTemplateSpecHasher, template)
|
||||
return podTemplateSpecHasher.Sum32()
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package util
|
||||
package hash
|
||||
|
||||
import (
|
||||
"hash"
|
||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package util
|
||||
package hash
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
Reference in New Issue
Block a user