Fix command and arg in NPD e2e

This commit is contained in:
Karan Goel 2020-11-09 10:58:09 -08:00
parent 55f95bc893
commit ee93b3f837

View File

@ -235,11 +235,37 @@ var _ = framework.KubeDescribe("NodeProblemDetector [NodeFeature:NodeProblemDete
},
},
},
InitContainers: []v1.Container{
{
Name: "init-log-file",
Image: "debian",
Command: []string{"/bin/sh"},
Args: []string{
"-c",
fmt.Sprintf("touch %s", logFile),
},
VolumeMounts: []v1.VolumeMount{
{
Name: logVolume,
MountPath: path.Dir(logFile),
},
{
Name: localtimeVolume,
MountPath: etcLocaltime,
},
},
},
},
Containers: []v1.Container{
{
Name: name,
Image: image,
Command: []string{"sh", "-c", "touch " + logFile + " && /node-problem-detector --logtostderr --system-log-monitors=" + configFile + fmt.Sprintf(" --apiserver-override=%s?inClusterConfig=true", framework.TestContext.Host)},
Command: []string{"/node-problem-detector"},
Args: []string{
"--logtostderr",
fmt.Sprintf("--system-log-monitors=%s", configFile),
fmt.Sprintf(" --apiserver-override=%s?inClusterConfig=true", framework.TestContext.Host),
},
Env: []v1.EnvVar{
{
Name: "NODE_NAME",