Skip to content
Merged
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
10 changes: 9 additions & 1 deletion docs/source/user_guide/runtime-conf.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,15 @@ This section defines the settings for the Kubeflow Pipelines deployment that you

The KubeFlow Pipelines API endpoint you want to utilize. This setting is required.

Example: `https://kubernetes-service.ibm.com/pipeline`
Example: `https://kubernetes-service.domain.com/pipeline`


##### Public Kubeflow Pipelines API endpoint (public_api_endpoint)

If the `KubeFlow Pipelines API endpoint` setting identifies a URL that can only be resolved within the Kubeflow cluster, Elyra cannot generate valid links to the Kubeflow Central Dashboard pipeline runs page. This is the case, for example, if Kubeflow is configured to use `KUBERNETES_SERVICE_ACCOUNT_TOKEN` authentication. If a public URL is configured for the Kubeflow Central Dashboard, specify it as `Public Kubeflow Pipelines API endpoint`.

Example: `https://public-kubernetes-service-url/pipeline`


##### Kubeflow Pipelines user namespace (user_namespace)
The namespace used to run your pipeline in Kubeflow Pipelines. This setting is required if namespaces are defined in Kubeflow Pipelines. SEE NOTE.
Expand Down
10 changes: 10 additions & 0 deletions elyra/metadata/schemas/kfp.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@
"placeholder": "https://your-kubeflow-service:port/pipeline"
}
},
"public_api_endpoint": {
"title": "Public Kubeflow Pipelines API Endpoint",
"description": "The public Kubeflow Pipelines API endpoint",
"type": "string",
"format": "uri",
"uihints": {
"category": "Kubeflow Pipelines",
"placeholder": "https://your-kubeflow-service:port/pipeline"
}
},
"user_namespace": {
"title": "Kubeflow Pipelines User Namespace",
"description": "The Kubeflow Pipelines user namespace used to create experiments",
Expand Down
7 changes: 5 additions & 2 deletions elyra/pipeline/kfp/processor_kfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def process(self, pipeline):

# unpack Kubeflow Pipelines configs
api_endpoint = runtime_configuration.metadata["api_endpoint"].rstrip("/")
public_api_endpoint = runtime_configuration.metadata.get("public_api_endpoint", api_endpoint)
api_username = runtime_configuration.metadata.get("api_username")
api_password = runtime_configuration.metadata.get("api_password")
user_namespace = runtime_configuration.metadata.get("user_namespace")
Expand Down Expand Up @@ -349,12 +350,14 @@ def process(self, pipeline):
)

self.log_pipeline_info(
pipeline_name, f"pipeline submitted: {api_endpoint}/#/runs/details/{run.id}", duration=time.time() - t0
pipeline_name,
f"pipeline submitted: {public_api_endpoint}/#/runs/details/{run.id}",
duration=time.time() - t0,
)

return KfpPipelineProcessorResponse(
run_id=run.id,
run_url=f"{api_endpoint}/#/runs/details/{run.id}",
run_url=f"{public_api_endpoint}/#/runs/details/{run.id}",
object_storage_url=f"{cos_endpoint}",
object_storage_path=f"/{cos_bucket}/{cos_directory}",
)
Expand Down
8 changes: 7 additions & 1 deletion packages/pipeline-editor/src/RuntimesWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class RuntimesDisplay extends MetadataDisplay<
IMetadataDisplayState
> {
renderExpandableContent(metadata: IDictionary<any>): JSX.Element {
const apiEndpoint = addTrailingSlash(metadata.metadata.api_endpoint);
let apiEndpoint = addTrailingSlash(metadata.metadata.api_endpoint);
const cosEndpoint = addTrailingSlash(metadata.metadata.cos_endpoint);

let githubRepoElement = null;
Expand Down Expand Up @@ -93,6 +93,12 @@ class RuntimesDisplay extends MetadataDisplay<
</span>
);
}
if (metadata.schema_name === 'kfp') {
if (metadata.metadata.public_api_endpoint) {
// user specified a public API endpoint. use it instead of the API endpoint
apiEndpoint = addTrailingSlash(metadata.metadata.public_api_endpoint);
}
}

return (
<div>
Expand Down