Add more output on ingress waiter
Some checks failed
Lint Checks / Run linter (pull_request) Successful in 38s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m33s
Webapp Test / Run webapp test suite (pull_request) Successful in 4m22s
Smoke Test / Run basic test suite (pull_request) Successful in 4m42s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Failing after 15m11s
Some checks failed
Lint Checks / Run linter (pull_request) Successful in 38s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m33s
Webapp Test / Run webapp test suite (pull_request) Successful in 4m22s
Smoke Test / Run basic test suite (pull_request) Successful in 4m42s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Failing after 15m11s
This commit is contained in:
parent
139e1f25b6
commit
c694074225
@ -46,15 +46,21 @@ def destroy_cluster(name: str):
|
||||
|
||||
|
||||
def wait_for_ingress_in_kind():
|
||||
w = watch.Watch()
|
||||
core_v1 = client.CoreV1Api()
|
||||
for event in w.stream(func=core_v1.list_namespaced_pod,
|
||||
namespace="ingress-nginx",
|
||||
label_selector="app.kubernetes.io/component=controller",
|
||||
timeout_seconds=240):
|
||||
if event['object'].status.container_statuses:
|
||||
if event['object'].status.container_statuses[0].ready is True:
|
||||
return
|
||||
for i in range(20):
|
||||
warned_waiting = False
|
||||
w = watch.Watch()
|
||||
for event in w.stream(func=core_v1.list_namespaced_pod,
|
||||
namespace="ingress-nginx",
|
||||
label_selector="app.kubernetes.io/component=controller",
|
||||
timeout_seconds=30):
|
||||
if event['object'].status.container_statuses:
|
||||
if event['object'].status.container_statuses[0].ready is True:
|
||||
if warned_waiting:
|
||||
print("Ingress controller is ready")
|
||||
return
|
||||
print("Waiting for ingress controller to become ready...")
|
||||
warned_waiting = True
|
||||
error_exit("ERROR: Timed out waiting for ingress to become ready")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user