kubernetes-sigs / mcs-api

This repository hosts the Multi-Cluster Service APIs. Providers can import packages in this repo to ensure their multi-cluster service controller implementations will be compatible with MCS data planes.
Apache License 2.0
209 stars 42 forks source link

Avoid crashing while waiting for the hello pod IP #34

Closed skitt closed 1 year ago

skitt commented 1 year ago

After listing the hello pods, check whether the list is empty before dereferencing the first one. Conceivably the "eventually" expectation could be changed to check the list itself, but we're really interested in waiting for the pod to have an IP address, so this preserves that behaviour.

Signed-off-by: Stephen Kitt skitt@redhat.com

lauralorenz commented 1 year ago

/lgtm /approve

k8s-ci-robot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jmhbnz, lauralorenz, skitt, tpantelis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/mcs-api/blob/master/OWNERS)~~ [lauralorenz] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment