mirror of https://github.com/k3s-io/k3s
Merge pull request #61995 from zouyee/patch-3
Automatic merge from submit-queue (batch tested with PRs 57600, 61995). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. remove rktnetes related code **What this PR does / why we need it**: remove rktnetes related code which has been deprecated. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```NONE ```pull/8/head
commit
97892854cf
|
@ -19,7 +19,6 @@ package container
|
|||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"hash/adler32"
|
||||
"hash/fnv"
|
||||
"strings"
|
||||
"time"
|
||||
|
@ -100,17 +99,6 @@ func HashContainer(container *v1.Container) uint64 {
|
|||
return uint64(hash.Sum32())
|
||||
}
|
||||
|
||||
// HashContainerLegacy returns the hash of the container. It is used to compare
|
||||
// the running container with its desired spec.
|
||||
// This is used by rktnetes and dockershim (for handling <=1.5 containers).
|
||||
// TODO: Remove this function when kubernetes version is >=1.8 AND rktnetes
|
||||
// update its hash function.
|
||||
func HashContainerLegacy(container *v1.Container) uint64 {
|
||||
hash := adler32.New()
|
||||
hashutil.DeepHashObject(hash, *container)
|
||||
return uint64(hash.Sum32())
|
||||
}
|
||||
|
||||
// EnvVarsToMap constructs a map of environment name to value from a slice
|
||||
// of env vars.
|
||||
func EnvVarsToMap(envs []EnvVar) map[string]string {
|
||||
|
|
Loading…
Reference in New Issue