Skip to content

Commit

Permalink
Add env vars in kfp-driver to parametrize MLMD host and port
Browse files Browse the repository at this point in the history
  • Loading branch information
rimolive committed Oct 16, 2023
1 parent add6aed commit 6572fd8
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion backend/src/v2/compiler/tektoncompiler/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ const (
MLPipelineServiceHost = "ml-pipeline.kubeflow.svc.cluster.local"
MLPipelineServicePort = "8887"
LauncherImage = "gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4"
MinioServiceHost = "minio-service.kubeflow.svc.cluster.local"
MinioServicePort = "9000"
)

var (
Expand All @@ -47,6 +49,8 @@ var (
mlPipelineServiceHost = MLPipelineServiceHost
mlPipelineServicePort = MLPipelineServicePort
launcherImage = LauncherImage
minioServiceHost = MinioServiceHost
minioServicePort = MinioServicePort
)

func initEnvVars() {
Expand All @@ -70,11 +74,18 @@ func initEnvVars() {
if metadataGRPCServicePort == "" {
metadataGRPCServicePort = MetadataGPRCServicePort
}

launcherImage = os.Getenv("V2_LAUNCHER_IMAGE")
if launcherImage == "" {
launcherImage = LauncherImage
}
minioServiceHost = os.Getenv("MINIO_SERVICE_SERVICE_HOST")
if minioServiceHost == "" {
minioServiceHost = MinioServiceHost
}
minioServicePort = os.Getenv("MINIO_SERVICE_SERVICE_PORT")
if minioServicePort == "" {
minioServicePort = MinioServicePort
}
envVarInit = true
}

Expand Down Expand Up @@ -438,6 +449,12 @@ func (c *pipelinerunCompiler) containerExecutorTemplate(
}, {
Name: "ML_PIPELINE_SERVICE_PORT_GRPC",
Value: GetMLPipelinePort(),
}, {
Name: "MINIO_SERVICE_SERVICE_HOST",
Value: GetMinioHost(),

Check failure on line 454 in backend/src/v2/compiler/tektoncompiler/container.go

View workflow job for this annotation

GitHub Actions / run-go-unittests

undefined: GetMinioHost
}, {
Name: "MINIO_SERVICE_SERVICE_PORT",
Value: GetMinioPort(),

Check failure on line 457 in backend/src/v2/compiler/tektoncompiler/container.go

View workflow job for this annotation

GitHub Actions / run-go-unittests

undefined: GetMinioPort
}},
},
},
Expand Down

0 comments on commit 6572fd8

Please sign in to comment.