Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(backend):Parameterizing v2 Launcher Image #149

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions backend/src/v2/compiler/tektoncompiler/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const (
MetadataGPRCServicePort = "8080"
MLPipelineServiceHost = "ml-pipeline.kubeflow.svc.cluster.local"
MLPipelineServicePort = "8887"
LauncherImage = "quay.io/opendatahub/kfp-launcher:v2"
)

var (
Expand All @@ -45,6 +46,7 @@ var (
metadataGRPCServicePort = MetadataGPRCServicePort
mlPipelineServiceHost = MLPipelineServiceHost
mlPipelineServicePort = MLPipelineServicePort
launcherImage = LauncherImage
)

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

launcherImage = os.Getenv("V2_LAUNCHER_IMAGE")
if launcherImage == "" {
launcherImage = LauncherImage
}
envVarInit = true
}

Expand Down Expand Up @@ -99,6 +106,13 @@ func GetMLPipelinePort() string {
return mlPipelineServicePort
}

func GetLauncherImage() string {
if !envVarInit {
initEnvVars()
}
return launcherImage
}

// add KubernetesSpec for the container of the component
func (c *pipelinerunCompiler) AddKubernetesSpec(name string, kubernetesSpec *structpb.Struct) error {
err := c.saveKubernetesSpec(name, kubernetesSpec)
Expand Down
2 changes: 1 addition & 1 deletion backend/src/v2/compiler/tektoncompiler/tekton.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func Compile(jobArg *pipelinespec.PipelineJob, kubernetesSpecArg *pipelinespec.S
c := &pipelinerunCompiler{
pr: pr,
// TODO(chensun): release process and update the images.
launcherImage: "quay.io/opendatahub/kfp-launcher:v2",
launcherImage: GetLauncherImage(),
job: job,
spec: spec,
dagStack: make([]string, 0, 10),
Expand Down
Loading