check value of cluster.Spec.Expose.Ingress

This commit is contained in:
jpgouin
2025-01-28 14:34:50 +00:00
parent ebdeb3aa58
commit 2019decc78

View File

@@ -106,7 +106,7 @@ func getURLFromService(ctx context.Context, client client.Client, cluster *v1alp
nodePort := k3kService.Spec.Ports[0].NodePort
url = fmt.Sprintf("https://%s:%d", hostServerIP, nodePort)
}
if cluster.Spec.Expose.Ingress.Enabled {
if cluster.Spec.Expose.Ingress != nil && cluster.Spec.Expose.Ingress.Enabled {
var k3kIngress networkingv1.Ingress
ingressKey := types.NamespacedName{
Name: server.IngressName(cluster.Name),