diff --git a/flytepropeller/pkg/controller/controller.go b/flytepropeller/pkg/controller/controller.go index dc5ec7105b..0cc3936109 100644 --- a/flytepropeller/pkg/controller/controller.go +++ b/flytepropeller/pkg/controller/controller.go @@ -554,7 +554,7 @@ func StartController(ctx context.Context, cfg *config.Config, defaultNamespace s return errors.Wrapf(err, "error building Kubernetes Clientset") } - resolver.Register(k8sResolver.NewBuilder(ctx, kubeClient, k8sResolver.K8sSchema)) + resolver.Register(k8sResolver.NewBuilder(ctx, kubeClient, k8sResolver.Schema)) flyteworkflowClient, err := clientset.NewForConfig(kubecfg) if err != nil { diff --git a/flytestdlib/resolver/k8s_resolver.go b/flytestdlib/resolver/k8s_resolver.go index ca49b0b705..e6c5f6f480 100644 --- a/flytestdlib/resolver/k8s_resolver.go +++ b/flytestdlib/resolver/k8s_resolver.go @@ -18,7 +18,7 @@ import ( ) const ( - K8sSchema = "k8s" + Schema = "k8s" ) type targetInfo struct { @@ -28,7 +28,7 @@ type targetInfo struct { } func (t targetInfo) String() string { - return fmt.Sprintf("%s:///%s.%s:%s", K8sSchema, t.serviceNamespace, t.serviceName, t.port) + return fmt.Sprintf("%s:///%s.%s:%s", Schema, t.serviceNamespace, t.serviceName, t.port) } // NewBuilder creates a kubeBuilder which is used by grpc resolver. diff --git a/flytestdlib/resolver/k8s_resolver_test.go b/flytestdlib/resolver/k8s_resolver_test.go index 20e3e365e1..18aa22c80a 100644 --- a/flytestdlib/resolver/k8s_resolver_test.go +++ b/flytestdlib/resolver/k8s_resolver_test.go @@ -66,7 +66,7 @@ func TestBuilder(t *testing.T) { } // Make sure watcher is started before we create the endpoint - time.Sleep(5 * time.Second) + time.Sleep(2 * time.Second) _, err = k8sClient.CoreV1().Endpoints("flyte").Create(context.Background(), &v1.Endpoints{ ObjectMeta: metav1.ObjectMeta{