diff --git a/components/notebook-controller/controllers/notebook_controller.go b/components/notebook-controller/controllers/notebook_controller.go index d227961793f..273cd0c51ef 100644 --- a/components/notebook-controller/controllers/notebook_controller.go +++ b/components/notebook-controller/controllers/notebook_controller.go @@ -471,7 +471,7 @@ func virtualServiceName(kfName string, namespace string) string { func generateVirtualService(instance *v1beta1.Notebook) (*unstructured.Unstructured, error) { name := instance.Name namespace := instance.Namespace - clusterDomain := "cluster.local" + // clusterDomain := "cluster.local" prefix := fmt.Sprintf("/notebook/%s/%s/", namespace, name) // unpack annotations from Notebook resource @@ -486,10 +486,11 @@ func generateVirtualService(instance *v1beta1.Notebook) (*unstructured.Unstructu rewrite = annotations[AnnotationRewriteURI] } - if clusterDomainFromEnv, ok := os.LookupEnv("CLUSTER_DOMAIN"); ok { - clusterDomain = clusterDomainFromEnv - } - service := fmt.Sprintf("%s.%s.svc.%s", name, namespace, clusterDomain) + // if clusterDomainFromEnv, ok := os.LookupEnv("CLUSTER_DOMAIN"); ok { + // clusterDomain = clusterDomainFromEnv + // } + // service := fmt.Sprintf("%s.%s.svc.%s", name, namespace, clusterDomain) + service := fmt.Sprintf("%s", name) vsvc := &unstructured.Unstructured{} vsvc.SetAPIVersion("networking.istio.io/v1alpha3") diff --git a/components/tensorboard-controller/controllers/tensorboard_controller.go b/components/tensorboard-controller/controllers/tensorboard_controller.go index 1697a44acd6..9db4f181ef7 100644 --- a/components/tensorboard-controller/controllers/tensorboard_controller.go +++ b/components/tensorboard-controller/controllers/tensorboard_controller.go @@ -322,7 +322,8 @@ func generateService(tb *tensorboardv1alpha1.Tensorboard) *corev1.Service { func generateVirtualService(tb *tensorboardv1alpha1.Tensorboard) (*unstructured.Unstructured, error) { prefix := fmt.Sprintf("/tensorboard/%s/%s/", tb.Namespace, tb.Name) rewrite := "/" - service := fmt.Sprintf("%s.%s.svc.cluster.local", tb.Name, tb.Namespace) + // service := fmt.Sprintf("%s.%s.svc.cluster.local", tb.Name, tb.Namespace) + service := fmt.Sprintf("%s", tb.Name) istioGateway, err := getEnvVariable("ISTIO_GATEWAY") if err != nil { return nil, err @@ -410,8 +411,8 @@ func extractPVCSubPath(path string) string { } } -//Searches a corev1.PodList for running pods and returns -//a running corev1.Pod (if exists) +// Searches a corev1.PodList for running pods and returns +// a running corev1.Pod (if exists) func findRunningPod(pods *corev1.PodList) corev1.Pod { for _, pod := range pods.Items { if pod.Status.Phase == "Running" { @@ -471,9 +472,9 @@ func generateNodeAffinity(affinity *corev1.Affinity, pvcname string, r *Tensorbo return nil } -//Checks the value of 'RWO_PVC_SCHEDULING' env var (if present in the environment) and returns -//'true' or 'false' accordingly. If 'RWO_PVC_SCHEDULING' is NOT present, then the value of the -//returned boolean is set to 'false', so that the scheduling functionality is off by default. +// Checks the value of 'RWO_PVC_SCHEDULING' env var (if present in the environment) and returns +// 'true' or 'false' accordingly. If 'RWO_PVC_SCHEDULING' is NOT present, then the value of the +// returned boolean is set to 'false', so that the scheduling functionality is off by default. func rwoPVCScheduling() (error, bool) { if value, exists := os.LookupEnv("RWO_PVC_SCHEDULING"); !exists || value == "false" || value == "False" || value == "FALSE" { return nil, false