diff --git a/docs/source/user_guide/runtime-conf.md b/docs/source/user_guide/runtime-conf.md index f9028c9fe..7e892e5c8 100644 --- a/docs/source/user_guide/runtime-conf.md +++ b/docs/source/user_guide/runtime-conf.md @@ -323,6 +323,13 @@ This should be the URL address of your S3-compatible Object Storage. If running Example: `https://minio-service.kubeflow:9000` +##### Public Cloud Object Storage endpoint (public_cos_endpoint) + +If the `Cloud Object Storage endpoint` setting identifies a URL that can only be resolved within the Kubernetes cluster, Elyra cannot generate valid links to the object storage page. +If your installation requires a different public URL specify it as `Public Cloud Object Storage endpoint`. + +Example: `https://public-kubernetes-service-url/storage` + ##### Cloud Object Storage bucket name (cos_bucket) Name of the bucket you want Elyra to store pipeline artifacts in. This setting is required. If the bucket doesn't exist, it will be created. The specified bucket name must meet the naming conventions imposed by the Object Storage service. diff --git a/elyra/metadata/schemas/kfp.json b/elyra/metadata/schemas/kfp.json index 9a5759f39..c7a031a8b 100644 --- a/elyra/metadata/schemas/kfp.json +++ b/elyra/metadata/schemas/kfp.json @@ -120,6 +120,16 @@ "ui:placeholder": "https://your-cos-service:port" } }, + "public_cos_endpoint": { + "title": "Public Cloud Object Storage Endpoint", + "description": "The public Cloud Object Storage endpoint", + "type": "string", + "format": "uri", + "uihints": { + "category": "Cloud Object Storage", + "ui:placeholder": "https://your-public-cos-endpoint:port" + } + }, "cos_bucket": { "title": "Cloud Object Storage Bucket Name", "description": "The Cloud Object Storage bucket name", diff --git a/elyra/pipeline/kfp/processor_kfp.py b/elyra/pipeline/kfp/processor_kfp.py index 06744d013..09d945c01 100644 --- a/elyra/pipeline/kfp/processor_kfp.py +++ b/elyra/pipeline/kfp/processor_kfp.py @@ -101,6 +101,7 @@ def process(self, pipeline): # unpack Cloud Object Storage configs cos_endpoint = runtime_configuration.metadata["cos_endpoint"] + cos_public_endpoint = runtime_configuration.metadata.get("public_cos_endpoint", cos_endpoint) cos_bucket = runtime_configuration.metadata["cos_bucket"] # Determine which provider to use to authenticate with Kubeflow @@ -362,7 +363,7 @@ def process(self, pipeline): ) if pipeline.contains_generic_operations(): - object_storage_url = f"{cos_endpoint}" + object_storage_url = f"{cos_public_endpoint}" os_path = join_paths(pipeline.pipeline_parameters.get(COS_OBJECT_PREFIX), pipeline_instance_id) object_storage_path = f"/{cos_bucket}/{os_path}" else: diff --git a/packages/pipeline-editor/src/RuntimesWidget.tsx b/packages/pipeline-editor/src/RuntimesWidget.tsx index 2dba26b9e..3835fa03f 100644 --- a/packages/pipeline-editor/src/RuntimesWidget.tsx +++ b/packages/pipeline-editor/src/RuntimesWidget.tsx @@ -64,7 +64,7 @@ class RuntimesDisplay extends MetadataDisplay< > { renderExpandableContent(metadata: IDictionary): JSX.Element { let apiEndpoint = addTrailingSlash(metadata.metadata.api_endpoint); - const cosEndpoint = addTrailingSlash(metadata.metadata.cos_endpoint); + let cosEndpoint = addTrailingSlash(metadata.metadata.cos_endpoint); let githubRepoElement = null; let metadata_props = null; @@ -98,6 +98,11 @@ class RuntimesDisplay extends MetadataDisplay< // user specified a public API endpoint. use it instead of the API endpoint apiEndpoint = addTrailingSlash(metadata.metadata.public_api_endpoint); } + + if (metadata.metadata.public_cos_endpoint) { + // user specified a public COS endpoint. use it instead of the API endpoint + cosEndpoint = addTrailingSlash(metadata.metadata.public_cos_endpoint); + } } return ( diff --git a/tests/support/commands.ts b/tests/support/commands.ts index 12a1392c5..635f2374a 100644 --- a/tests/support/commands.ts +++ b/tests/support/commands.ts @@ -80,7 +80,9 @@ Cypress.Commands.add('createRuntimeConfig', ({ type } = {}): void => { ); } - cy.findByLabelText(/object storage endpoint/i).type('http://0.0.0.0:9000'); + cy.findByLabelText(/^cloud object storage endpoint/i).type( + 'http://0.0.0.0:9000' + ); cy.findByLabelText(/object storage username/i).type('minioadmin'); cy.findByLabelText(/object storage password/i).type('minioadmin'); cy.findByLabelText(/object storage bucket/i).type('test-bucket');