Explorar o código

print spec for debugging

Alexander Belanger %!s(int64=5) %!d(string=hai) anos
pai
achega
4cda379a7c
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      internal/kubernetes/domain/domain.go

+ 5 - 0
internal/kubernetes/domain/domain.go

@@ -39,6 +39,7 @@ func GetNGINXIngressServiceIP(clientset kubernetes.Interface) (string, bool, err
 				fmt.Println("GOT AN INGRESS NGINX")
 				nginxSvc = &svc
 				exists = true
+				break
 			}
 		}
 	}
@@ -49,6 +50,10 @@ func GetNGINXIngressServiceIP(clientset kubernetes.Interface) (string, bool, err
 
 	fmt.Println("IP ARRAY IS", nginxSvc.Status.LoadBalancer.Ingress)
 
+	specBytes, _ := nginxSvc.Marshal()
+
+	fmt.Println("SPEC IS", string(specBytes))
+
 	if ipArr := nginxSvc.Status.LoadBalancer.Ingress; len(ipArr) > 0 {
 		// first default to ip, then check hostname
 		if ipArr[0].IP != "" {