mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-03 03:38:15 +00:00
Recycle Pod Template Check
The kube-controller-manager has two command line arguments (--pv-recycler-pod-template-filepath-hostpath and --pv-recycler-pod-template-filepath-nfs) that specify a recycle pod template. The recycle pod template may not contain the volume that shall be recycled. A check is added to make sure that the recycle pod template contains at least a volume.
This commit is contained in:
@@ -183,6 +183,9 @@ func AttemptToLoadRecycler(path string, config *volume.VolumeConfig) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = volume.ValidateRecyclerPodTemplate(recyclerPod); err != nil {
|
||||
return fmt.Errorf("Pod specification (%v): %v", path, err)
|
||||
}
|
||||
config.RecyclerPodTemplate = recyclerPod
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user