Add CreatedByLabelKey to make sure that preload side car will be target of deletion
parent
e3cd93aa1a
commit
fd58d0fc90
|
@ -153,7 +153,7 @@ func createVolume(ociBin string, profile string, nodeName string) error {
|
|||
|
||||
// prepareVolumeSideCar will copy the initial content of the mount point by starting a temporary container to check the expected content
|
||||
func prepareVolumeSideCar(ociBin string, imageName string, nodeName string) error {
|
||||
cmdArgs := []string{"run", "--rm", "--name", fmt.Sprintf("%s-preload-sidecar", nodeName), "--entrypoint", "/usr/bin/test"}
|
||||
cmdArgs := []string{"run", "--rm", "--name", fmt.Sprintf("%s-preload-sidecar", nodeName), "--entrypoint", "--label", fmt.Sprintf("%s=%s", CreatedByLabelKey, "true"), "/usr/bin/test"}
|
||||
cmdArgs = append(cmdArgs, "-v", fmt.Sprintf("%s:/var", nodeName), imageName, "-d", "/var/lib")
|
||||
cmd := exec.Command(ociBin, cmdArgs...)
|
||||
if _, err := runCmd(cmd); err != nil {
|
||||
|
|
Loading…
Reference in New Issue