Refactor uuid into its own pkg
This commit is contained in:
@@ -56,13 +56,13 @@ import (
|
||||
"k8s.io/kubernetes/pkg/kubelet/util/format"
|
||||
"k8s.io/kubernetes/pkg/securitycontext"
|
||||
kubetypes "k8s.io/kubernetes/pkg/types"
|
||||
"k8s.io/kubernetes/pkg/util"
|
||||
"k8s.io/kubernetes/pkg/util/errors"
|
||||
utilexec "k8s.io/kubernetes/pkg/util/exec"
|
||||
"k8s.io/kubernetes/pkg/util/flowcontrol"
|
||||
"k8s.io/kubernetes/pkg/util/selinux"
|
||||
utilstrings "k8s.io/kubernetes/pkg/util/strings"
|
||||
"k8s.io/kubernetes/pkg/util/term"
|
||||
"k8s.io/kubernetes/pkg/util/uuid"
|
||||
utilwait "k8s.io/kubernetes/pkg/util/wait"
|
||||
)
|
||||
|
||||
@@ -726,7 +726,7 @@ func (r *Runtime) makeContainerLogMount(opts *kubecontainer.RunContainerOptions,
|
||||
// the container is launched, so here we generate a random uuid to enable
|
||||
// us to map a container's termination message path to an unique log file
|
||||
// on the disk.
|
||||
randomUID := util.NewUUID()
|
||||
randomUID := uuid.NewUUID()
|
||||
containerLogPath := path.Join(opts.PodContainerDir, string(randomUID))
|
||||
fs, err := r.os.Create(containerLogPath)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user