mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2025-08-28 12:51:01 +00:00
Adds readinessindicatorfile check on CNI DEL
This commit is contained in:
parent
7219de04e6
commit
cb47afa633
@ -528,6 +528,16 @@ func cmdDel(args *skel.CmdArgs, exec invoke.Exec, kubeClient k8s.KubeClient) err
|
|||||||
return cmdErr(nil, "error getting k8s args: %v", err)
|
return cmdErr(nil, "error getting k8s args: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if in.ReadinessIndicatorFile != "" {
|
||||||
|
err := wait.PollImmediate(pollDuration, pollTimeout, func() (bool, error) {
|
||||||
|
_, err := os.Stat(in.ReadinessIndicatorFile)
|
||||||
|
return err == nil, nil
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return cmdErr(k8sArgs, "PollImmediate error waiting for ReadinessIndicatorFile (on del): %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Read the cache to get delegates json for the pod
|
// Read the cache to get delegates json for the pod
|
||||||
netconfBytes, path, err := consumeScratchNetConf(args.ContainerID, in.CNIDir)
|
netconfBytes, path, err := consumeScratchNetConf(args.ContainerID, in.CNIDir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user