Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2E: Use GetHealthCheckIP in gateway status test #3291

Merged
merged 1 commit into from
Feb 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/e2e/dataplane/gateway_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
k8snet "k8s.io/utils/net"
)

var _ = Describe("Gateway status reporting", Label(TestLabel), func() {
Expand Down Expand Up @@ -110,7 +111,8 @@ func verifyGateway(gw *submarinerv1.Gateway, otherCluster string, healthCheckedE
}

if healthCheckedEnabled {
if len(gw.Status.Connections[i].Endpoint.HealthCheckIPs) == 0 {
if gw.Status.Connections[i].Endpoint.GetHealthCheckIP(k8snet.IPv4) == "" &&
gw.Status.Connections[i].Endpoint.GetHealthCheckIP(k8snet.IPv6) == "" {
return false, fmt.Sprintf("Connection for cluster %q has no health check IP. This could be because the Gateway or"+
" Globalnet pod could not determine the cluster's CNI IP address. If so, this would be reported in the pod log.",
otherCluster), nil
Expand Down
Loading