You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
run the example from the documentation without a object "pod/pod-not-yet-created"
- name: Wait till the Object is createdcommunity.kubernetes.k8s_info:
kind: Podwait: yesname: pod-not-yet-creatednamespace: defaultwait_sleep: 10wait_timeout: 360
EXPECTED RESULTS
I'm expecting that the module waits for up to 360 seconds until the resource "pod/pod-not-yet-created" is in the desired state (Running for Pods).
ACTUAL RESULTS
The module returns immediately without any waiting if the resource is not yet created. This makes the module unusable when the resources are indirectly created by other resources. e.g. a pod which is created by a deployment (or a pod created by a operator)
(no error text output, but this is the "register: result" json object:
The text was updated successfully, but these errors were encountered:
hojerst
changed the title
k8s_info with wait option returns immediatly when resource doesn't exist
k8s_info with wait option returns immediatley when resource doesn't exist
Jan 12, 2021
hojerst
changed the title
k8s_info with wait option returns immediatley when resource doesn't exist
k8s_info with wait option returns immediately when resource doesn't exist
Jan 12, 2021
@tima@Akasurde Thinking about this and I'm not actually sure what the behavior should be. In the case of a specific object as described here--we're given a name, for example--we can wait until the object is created or wait_timeout, whichever comes first. If we are given a less specific query, like listing all the pods in a namespace, for example:
k8s_info:
kind: Pod
namespace: foo
wait: true
wait_timeout: 180
the only way that's ever satisfied is to always wait the full timeout period.
SUMMARY
k8s_info
with thewait
option does return immediately when no object is found.From the example in the
ISSUE TYPE
COMPONENT NAME
community.kubernetes.k8s_info
(in collection v1.1.1)ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
run the example from the documentation without a object "pod/pod-not-yet-created"
EXPECTED RESULTS
I'm expecting that the module waits for up to 360 seconds until the resource "pod/pod-not-yet-created" is in the desired state (Running for Pods).
ACTUAL RESULTS
The module returns immediately without any waiting if the resource is not yet created. This makes the module unusable when the resources are indirectly created by other resources. e.g. a pod which is created by a deployment (or a pod created by a operator)
(no error text output, but this is the "register: result" json object:
The text was updated successfully, but these errors were encountered: