Skip to content

Commit

Permalink
Wait until pod is ready
Browse files Browse the repository at this point in the history
Locally the pod is always ready when the deployment is rolled out, but
on github we fail consistently with:

      drenv.commands.Error: Command failed:
         command: ('kubectl', 'exec', '--context', 'test-319c31e02513d53a5b0c2ebb71351f94-cluster',
                   'deploy/example-deployment', '--', 'hostname')
         exitcode: 1
         error:
            error: unable to upgrade connection: container not found ("example")

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
  • Loading branch information
nirs committed Jul 20, 2023
1 parent c2f9053 commit 374a475
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/addons/example/start
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,12 @@ kubectl.rollout(
"--timeout=180s",
context=cluster,
)

print("waiting until pod is ready")
kubectl.wait(
"pod",
"--selector=app=example",
"--for=condition=Ready",
"--timeout=180s",
context=cluster,
)

0 comments on commit 374a475

Please sign in to comment.