Skip to content

Commit 3a248ec

Browse files
committed
k8s: add continue to wait_for_init
1 parent 80c5df6 commit 3a248ec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/warnet/k8s.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ def wait_for_init(pod_name, timeout=300, namespace: Optional[str] = None):
294294
):
295295
pod = event["object"]
296296
if pod.metadata.name == pod_name:
297+
if not pod.status.init_container_statuses:
298+
continue
297299
for init_container_status in pod.status.init_container_statuses:
298300
if init_container_status.state.running:
299301
print(f"initContainer in pod {pod_name} ({namespace}) is ready")

0 commit comments

Comments
 (0)