mirror of https://github.com/k3s-io/k3s
remove rktnetes related code
parent
b91146af51
commit
9329e5dabe
|
@ -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