diff --git a/backend/src/agent/persistence/client/pipeline_client.go b/backend/src/agent/persistence/client/pipeline_client.go index 9c60e8d7f10..38768008953 100644 --- a/backend/src/agent/persistence/client/pipeline_client.go +++ b/backend/src/agent/persistence/client/pipeline_client.go @@ -27,7 +27,7 @@ import ( ) const ( - addressTemp = "%s.%s.svc.cluster.local:%s" + addressTemp = "%s:%s" ) type PipelineClientInterface interface { @@ -48,15 +48,14 @@ type PipelineClient struct { } func NewPipelineClient( - namespace string, initializeTimeout time.Duration, timeout time.Duration, basePath string, mlPipelineServiceName string, mlPipelineServiceHttpPort string, mlPipelineServiceGRPCPort string) (*PipelineClient, error) { - httpAddress := fmt.Sprintf(addressTemp, mlPipelineServiceName, namespace, mlPipelineServiceHttpPort) - grpcAddress := fmt.Sprintf(addressTemp, mlPipelineServiceName, namespace, mlPipelineServiceGRPCPort) + httpAddress := fmt.Sprintf(addressTemp, mlPipelineServiceName, mlPipelineServiceHttpPort) + grpcAddress := fmt.Sprintf(addressTemp, mlPipelineServiceName, mlPipelineServiceGRPCPort) err := util.WaitForAPIAvailable(initializeTimeout, basePath, httpAddress) if err != nil { return nil, errors.Wrapf(err, diff --git a/backend/src/agent/persistence/main.go b/backend/src/agent/persistence/main.go index 88ffa4e49be..b8765593596 100644 --- a/backend/src/agent/persistence/main.go +++ b/backend/src/agent/persistence/main.go @@ -16,7 +16,6 @@ package main import ( "flag" - "os" "time" workflowclientSet "github.com/argoproj/argo/pkg/client/clientset/versioned" @@ -34,7 +33,6 @@ import ( var ( masterURL string kubeconfig string - namespace string initializeTimeout time.Duration timeout time.Duration mlPipelineAPIServerName string @@ -47,7 +45,6 @@ var ( const ( kubeconfigFlagName = "kubeconfig" masterFlagName = "master" - namespaceFlagName = "namespace" initializationTimeoutFlagName = "initializeTimeout" timeoutFlagName = "timeout" mlPipelineAPIServerBasePathFlagName = "mlPipelineAPIServerBasePath" @@ -81,7 +78,6 @@ func main() { workflowInformerFactory := workflowinformers.NewSharedInformerFactory(workflowClient, time.Second*30) pipelineClient, err := client.NewPipelineClient( - namespace, initializeTimeout, timeout, mlPipelineAPIServerBasePath, @@ -109,7 +105,6 @@ func main() { func init() { flag.StringVar(&kubeconfig, kubeconfigFlagName, "", "Path to a kubeconfig. Only required if out-of-cluster.") flag.StringVar(&masterURL, masterFlagName, "", "The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.") - flag.StringVar(&namespace, namespaceFlagName, os.Getenv("POD_NAMESPACE"), "The namespace the ML pipeline API server is deployed to") flag.DurationVar(&initializeTimeout, initializationTimeoutFlagName, 2*time.Minute, "Duration to wait for initialization of the ML pipeline API server.") flag.DurationVar(&timeout, timeoutFlagName, 1*time.Minute, "Duration to wait for calls to complete.") flag.StringVar(&mlPipelineAPIServerName, mlPipelineAPIServerNameFlagName, "ml-pipeline", "Name of the ML pipeline API server.")