kubernetes.client.api.core_v1_api.delete_node_with_http_info deletes all nodes when name
is an empty string.
#2209
Labels
kind/bug
Categorizes issue or PR as related to a bug.
What happened (please include outputs or screenshots):
The python client library allows deletion of all nodes in a cluster when passing in an empty string. THIS IS BAD!!
As part of code we use, we call:
When we do this, we discovered an issue where we accidentally passed in a
node_name=""
, which leads to this message:Which turns out to delete all nodes from the API server on the cluster. OOPSIE!
Corresponding queries to the API show that our nodes indeed disappear.
What you expected to happen:
The
delete_node
/delete_node_with_http_info
method should fail if the name is blank(name="")
.How to reproduce it (as minimally and precisely as possible):
Open a python shell and import the kubernetes python code. Initialize it and call
delete_node("")
which should raise an ApiValueErrorAnything else we need to know?:
Environment:
kubectl version
): 1.27python --version
) 3.11.4pip list | grep kubernetes
) 27.2.0The text was updated successfully, but these errors were encountered: