Skip to content

Commit 2019dec

Browse files
committed
check value of cluster.Spec.Expose.Ingress
1 parent ebdeb3a commit 2019dec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/controller/kubeconfig/kubeconfig.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func getURLFromService(ctx context.Context, client client.Client, cluster *v1alp
106106
nodePort := k3kService.Spec.Ports[0].NodePort
107107
url = fmt.Sprintf("https://%s:%d", hostServerIP, nodePort)
108108
}
109-
if cluster.Spec.Expose.Ingress.Enabled {
109+
if cluster.Spec.Expose.Ingress != nil && cluster.Spec.Expose.Ingress.Enabled {
110110
var k3kIngress networkingv1.Ingress
111111
ingressKey := types.NamespacedName{
112112
Name: server.IngressName(cluster.Name),

0 commit comments

Comments
 (0)