Fix permission denied error

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
Maksym Pavlenko 2023-05-17 12:39:51 -07:00
parent ff4f2907c5
commit 5fcbc9d2fc

View File

@ -152,6 +152,7 @@ type HollowKubeletOptions struct {
func GetHollowKubeletConfig(opt *HollowKubeletOptions) (*options.KubeletFlags, *kubeletconfig.KubeletConfiguration) {
testRootDir := utils.MakeTempDirOrDie("hollow-kubelet.", "")
podFilePath := utils.MakeTempDirOrDie("static-pods", testRootDir)
podLogsPath := utils.MakeTempDirOrDie("pod-logs", testRootDir)
klog.Infof("Using %s as root dir for hollow-kubelet", testRootDir)
// Flags struct
@ -210,6 +211,7 @@ func GetHollowKubeletConfig(opt *HollowKubeletOptions) (*options.KubeletFlags, *
c.RegisterWithTaints = opt.RegisterWithTaints
c.RegisterNode = true
c.LocalStorageCapacityIsolation = true
c.PodLogsDir = podLogsPath
return f, c
}