mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-03-27 05:43:02 +00:00
Fix k8s_drain failing when pod has local storage (#295)
Fix k8s_drain failing when pod has local storage SUMMARY The module fails to define the pod_names variable before using it for pods with local storage. Fixes #292 ISSUE TYPE Bugfix Pull Request COMPONENT NAME k8s_drain ADDITIONAL INFORMATION Reviewed-by: Abhijeet Kasurde <None> Reviewed-by: None <None> Reviewed-by: None <None>
This commit is contained in:
@@ -197,6 +197,7 @@ def filter_pods(pods, force, ignore_daemonset):
|
||||
|
||||
# local storage
|
||||
if localStorage:
|
||||
pod_names = ",".join([pod[0] + "/" + pod[1] for pod in localStorage])
|
||||
errors.append("cannot delete Pods with local storage: {0}.".format(pod_names))
|
||||
|
||||
# DaemonSet managed Pods
|
||||
|
||||
Reference in New Issue
Block a user