kubernetes.core
kubernetes.core copied to clipboard
Make name optional indicating all objects
SUMMARY
Currently kubernetes.core.k8s requires either "name" or "label_selector" to be specified. I want to be able to run an operation on all objects.
ISSUE TYPE
- Feature Idea
COMPONENT NAME
kubernetes.core.k8s
ADDITIONAL INFORMATION
Effectively, I am proposing an equivalent to kubectl --all option. For example, I would like to be able to delete all pods like this:
- name: Delete all pods
kubernetes.core.k8s:
kind: Pod
namespace: mynamespace
state: absent
Thanks for your input @anon-software.
I get the desire for batch (all) operations, but this, as proposed, is too dangerous. If someone forgets to set the name they'd inadvertently wiping out everything. This "all" mode would need to be switched on explicitly to help avoid unintentional destruction of any resources.
Yes, I see your point. An explicit flag will be equally functional and "safer", I do not mind having it that way.