From f21c80769f5a4924636bf107bbadc001425fcedf Mon Sep 17 00:00:00 2001 From: Zadkiel AHARONIAN Date: Sat, 9 Nov 2024 16:55:38 +0100 Subject: [PATCH] Update kube.go --- pkg/testutil/kube.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pkg/testutil/kube.go b/pkg/testutil/kube.go index a72d1d7b..eda3366b 100644 --- a/pkg/testutil/kube.go +++ b/pkg/testutil/kube.go @@ -118,6 +118,28 @@ func CreateIngressWithHostAndEmptyTLSHost(name string, host string) *v1.Ingress return ingress } +func CreateIngressWithStatusIPHost(name string, host string) *v1.Ingress { + ingress := CreateIngress(name) + ingress.Status.LoadBalancer.Ingress = []v1.IngressLoadBalancerIngress{ + { + Hostname: host, + }, + } + + return ingress +} + +func CreateIngressWithStatusIPHost(name string, host string) *v1.Ingress { + ingress := CreateIngress(name) + ingress.Status.LoadBalancer.Ingress = []v1.IngressLoadBalancerIngress{ + { + IP: host, + }, + } + + return ingress +} + func CreateForecastleApp(name string, url string, group string, icon string) *v1alpha1.ForecastleApp { return &v1alpha1.ForecastleApp{ ObjectMeta: metav1.ObjectMeta{