@@ -28,26 +28,28 @@ import (
2828
2929// TODO: use https://github.com/spf13/cobra as a framework to create more complex CLI tools with subcommands.
3030var (
31- copy = flag .String ("copy" , "" , "copy this binary to specified destination path" )
32- pipelineName = flag .String ("pipeline_name" , "" , "pipeline context name" )
33- runID = flag .String ("run_id" , "" , "pipeline run uid" )
34- parentDagID = flag .Int64 ("parent_dag_id" , 0 , "parent DAG execution ID" )
35- executorType = flag .String ("executor_type" , "container" , "The type of the ExecutorSpec" )
36- executionID = flag .Int64 ("execution_id" , 0 , "Execution ID of this task." )
37- executorInputJSON = flag .String ("executor_input" , "" , "The JSON-encoded ExecutorInput." )
38- componentSpecJSON = flag .String ("component_spec" , "" , "The JSON-encoded ComponentSpec." )
39- importerSpecJSON = flag .String ("importer_spec" , "" , "The JSON-encoded ImporterSpec." )
40- taskSpecJSON = flag .String ("task_spec" , "" , "The JSON-encoded TaskSpec." )
41- podName = flag .String ("pod_name" , "" , "Kubernetes Pod name." )
42- podUID = flag .String ("pod_uid" , "" , "Kubernetes Pod UID." )
43- mlmdServerAddress = flag .String ("mlmd_server_address" , "" , "The MLMD gRPC server address." )
44- mlmdServerPort = flag .String ("mlmd_server_port" , "8080" , "The MLMD gRPC server port." )
45- logLevel = flag .String ("log_level" , "1" , "The verbosity level to log." )
46- publishLogs = flag .String ("publish_logs" , "true" , "Whether to publish component logs to the object store" )
47- cacheDisabledFlag = flag .Bool ("cache_disabled" , false , "Disable cache globally." )
48- caCertPath = flag .String ("ca_cert_path" , "" , "The path to the CA certificate to trust on connections to the ML pipeline API server and metadata server." )
49- mlPipelineTLSEnabled = flag .Bool ("ml_pipeline_tls_enabled" , false , "Set to true if mlpipeline API server serves over TLS." )
50- metadataTLSEnabled = flag .Bool ("metadata_tls_enabled" , false , "Set to true if MLMD serves over TLS." )
31+ copy = flag .String ("copy" , "" , "copy this binary to specified destination path" )
32+ pipelineName = flag .String ("pipeline_name" , "" , "pipeline context name" )
33+ runID = flag .String ("run_id" , "" , "pipeline run uid" )
34+ parentDagID = flag .Int64 ("parent_dag_id" , 0 , "parent DAG execution ID" )
35+ executorType = flag .String ("executor_type" , "container" , "The type of the ExecutorSpec" )
36+ executionID = flag .Int64 ("execution_id" , 0 , "Execution ID of this task." )
37+ executorInputJSON = flag .String ("executor_input" , "" , "The JSON-encoded ExecutorInput." )
38+ componentSpecJSON = flag .String ("component_spec" , "" , "The JSON-encoded ComponentSpec." )
39+ importerSpecJSON = flag .String ("importer_spec" , "" , "The JSON-encoded ImporterSpec." )
40+ taskSpecJSON = flag .String ("task_spec" , "" , "The JSON-encoded TaskSpec." )
41+ podName = flag .String ("pod_name" , "" , "Kubernetes Pod name." )
42+ podUID = flag .String ("pod_uid" , "" , "Kubernetes Pod UID." )
43+ mlPipelineServerAddress = flag .String ("ml_pipeline_server_address" , "ml-pipeline.kubeflow" , "The name of the ML pipeline API server address." )
44+ mlPipelineServerPort = flag .String ("ml_pipeline_server_port" , "8887" , "The port of the ML pipeline API server." )
45+ mlmdServerAddress = flag .String ("mlmd_server_address" , "" , "The MLMD gRPC server address." )
46+ mlmdServerPort = flag .String ("mlmd_server_port" , "8080" , "The MLMD gRPC server port." )
47+ logLevel = flag .String ("log_level" , "1" , "The verbosity level to log." )
48+ publishLogs = flag .String ("publish_logs" , "true" , "Whether to publish component logs to the object store" )
49+ cacheDisabledFlag = flag .Bool ("cache_disabled" , false , "Disable cache globally." )
50+ caCertPath = flag .String ("ca_cert_path" , "" , "The path to the CA certificate to trust on connections to the ML pipeline API server and metadata server." )
51+ mlPipelineTLSEnabled = flag .Bool ("ml_pipeline_tls_enabled" , false , "Set to true if mlpipeline API server serves over TLS." )
52+ metadataTLSEnabled = flag .Bool ("metadata_tls_enabled" , false , "Set to true if MLMD serves over TLS." )
5153)
5254
5355func main () {
@@ -79,18 +81,20 @@ func run() error {
7981 }
8082
8183 launcherV2Opts := & component.LauncherV2Options {
82- Namespace : namespace ,
83- PodName : * podName ,
84- PodUID : * podUID ,
85- MLMDServerAddress : * mlmdServerAddress ,
86- MLMDServerPort : * mlmdServerPort ,
87- PipelineName : * pipelineName ,
88- RunID : * runID ,
89- PublishLogs : * publishLogs ,
90- CacheDisabled : * cacheDisabledFlag ,
91- MLPipelineTLSEnabled : * mlPipelineTLSEnabled ,
92- MLMDTLSEnabled : * metadataTLSEnabled ,
93- CaCertPath : * caCertPath ,
84+ Namespace : namespace ,
85+ PodName : * podName ,
86+ PodUID : * podUID ,
87+ MLPipelineServerAddress : * mlPipelineServerAddress ,
88+ MLPipelineServerPort : * mlPipelineServerPort ,
89+ MLMDServerAddress : * mlmdServerAddress ,
90+ MLMDServerPort : * mlmdServerPort ,
91+ PipelineName : * pipelineName ,
92+ RunID : * runID ,
93+ PublishLogs : * publishLogs ,
94+ CacheDisabled : * cacheDisabledFlag ,
95+ MLPipelineTLSEnabled : * mlPipelineTLSEnabled ,
96+ MLMDTLSEnabled : * metadataTLSEnabled ,
97+ CaCertPath : * caCertPath ,
9498 }
9599
96100 switch * executorType {
@@ -110,11 +114,13 @@ func run() error {
110114 return nil
111115 case "container" :
112116 clientOptions := & client_manager.Options {
113- MLMDServerAddress : launcherV2Opts .MLMDServerAddress ,
114- MLMDServerPort : launcherV2Opts .MLMDServerPort ,
115- CacheDisabled : launcherV2Opts .CacheDisabled ,
116- MLMDTLSEnabled : launcherV2Opts .MLMDTLSEnabled ,
117- CaCertPath : launcherV2Opts .CaCertPath ,
117+ MLPipelineServerAddress : launcherV2Opts .MLPipelineServerAddress ,
118+ MLPipelineServerPort : launcherV2Opts .MLPipelineServerPort ,
119+ MLMDServerAddress : launcherV2Opts .MLMDServerAddress ,
120+ MLMDServerPort : launcherV2Opts .MLMDServerPort ,
121+ CacheDisabled : launcherV2Opts .CacheDisabled ,
122+ MLMDTLSEnabled : launcherV2Opts .MLMDTLSEnabled ,
123+ CaCertPath : launcherV2Opts .CaCertPath ,
118124 }
119125 clientManager , err := client_manager .NewClientManager (clientOptions )
120126 if err != nil {
0 commit comments