Support non-tls ingress for kind #748
@ -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