Skip to content

Commit

Permalink
Handle pod ready case of with or without dualstack support
Browse files Browse the repository at this point in the history
  • Loading branch information
purnesh42H committed Jul 16, 2024
1 parent 9ed0049 commit 6d66eaf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions framework/test_app/runners/k8s/k8s_base_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -998,9 +998,12 @@ def _wait_pod_started(self, name, **kwargs) -> k8s.V1Pod:
logger.info("Waiting for pod %s to start", name)
self.k8s_namespace.wait_for_pod_started(name, **kwargs)
pod = self.k8s_namespace.get_pod(name)
logger.info(
"Pod %s ready, IP: %s", pod.metadata.name, pod.status.pod_ip_s
)

if hasattr(pod.status, "pod_ip_s"): # if running with dualstack support
pod_ip_s = pod.status.pod_ip_s
else:
pod_ip_s = pod.status.pod_ip
logger.info("Pod %s ready, IP: %s", pod.metadata.name, pod_ip_s)
return pod

def _pod_started_logic(self, pod: k8s.V1Pod) -> bool:
Expand Down

0 comments on commit 6d66eaf

Please sign in to comment.