-
Notifications
You must be signed in to change notification settings - Fork 104
Add k8s_wait
module
#18
Comments
This feature request stems from geerlingguy/ansible-collection-k8s#5, where I was originally ruminating over it. |
@geerlingguy does the |
To be honest, I might have not been thinking about that parameter when I originally wrote up the issue in my collection repo... I think it was when I was writing up this example in Ansible for Kubernetes: https://github.com/geerlingguy/ansible-for-kubernetes/blob/master/cluster-local-vms/test-deployment.yml#L15-L27 I'll see if I can get that to work with the |
It works great, not sure why I didn't use the Closing this request as it's redundant (and would just add complexity where none is needed). |
I think a module like this might still be useful. I ran into a case, where waiting for a resource that is not explicitly created via In this case only some resources are created by So in that case I am currently running the following state (which works) to wait for the Pod to be up, before deploying a MinIO cluster: - name: Wait for the operator for minio to become available
command: 'kubectl wait --namespace minio --for=condition=Ready pods --selector app=minio-operator --timeout=600s'
register: minio_pod
until: minio_pod.stdout.find("condition met") != -1
retries: 5
delay: 5 |
I'm... going to reopen this feature request. I ran into a condition today where it would be very useful for me to be able to observe a set of pods that I did not start/manage using |
@geerlingguy what do you think about adding the |
@fabianvf - Well, that would solve the issue for me, and avoid adding yet another module. |
User can specify wait in k8s_info module. Fixes: ansible-collections#18 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
User can specify wait in k8s_info module. Fixes: ansible-collections#18 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
User can specify wait in k8s_info module. Fixes: ansible-collections#18 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
User can specify wait in k8s_info module. Fixes: ansible-collections#18 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
User can specify wait in k8s_info module. Fixes: ansible-collections#18 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
User can specify wait in k8s_info module. Fixes: ansible-collections#18 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
User can specify wait in k8s_info module. Fixes: ansible-collections#18 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
SUMMARY
Just wanted to throw this out here, since it's something that would be convenient in a number of circumstances.
A common pattern for K8s deployments is:
Currently, for number 2, you can futz around with the returned data from
k8s
ork8s_info
and use until/retries to get something working, or you can do a more simple method (if you havekubectl
available) usingkubectl wait
:At a basic level, I'd want something like:
Something along those lines... not sure. But it would be nice to be able to specify this in a more structured way, and not have to rely on
kubectl
being present for a task like:ISSUE TYPE
COMPONENT NAME
N/A
ADDITIONAL INFORMATION
N/A
The text was updated successfully, but these errors were encountered: