Skip to content

Commit

Permalink
feat: add envs to ensure kfp-ui can show logs (#605)
Browse files Browse the repository at this point in the history
* feat: add envs to ensure kfp-ui can show logs

* fix: set ARGO_KEYFORMAT env

* fix: remove ARGO_ARCHIVE_PREFIX env var
  • Loading branch information
NohaIhab authored Nov 29, 2024
1 parent 3f385f9 commit 344a5d6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
8 changes: 8 additions & 0 deletions charms/kfp-ui/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ options:
type: boolean
default: true
description: Allow custom visualizations
argo-archive-logs:
type: boolean
default: true
description: Enable Argo log archive
disable-gke-metadata:
type: boolean
default: true
description: Disable GKE metadata endpoint
hide-sidenav:
type: boolean
default: true
Expand Down
2 changes: 2 additions & 0 deletions charms/kfp-ui/src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ def __init__(self, *args):
],
inputs_getter=lambda: MlPipelineUiInputs(
ALLOW_CUSTOM_VISUALIZATIONS=self.model.config["allow-custom-visualizations"],
ARGO_ARCHIVE_LOGS=self.model.config["argo-archive-logs"],
DISABLE_GKE_METADATA=self.model.config["disable-gke-metadata"],
FRONTEND_SERVER_NAMESPACE=self.model.name,
HIDE_SIDENAV=self.model.config["hide-sidenav"],
MINIO_ACCESS_KEY=self.object_storage_relation.component.get_data()[
Expand Down
17 changes: 14 additions & 3 deletions charms/kfp-ui/src/components/pebble_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class MlPipelineUiInputs:
"""Defines the required inputs for MlPipelineUiPebbleService."""

ALLOW_CUSTOM_VISUALIZATIONS: bool
ARGO_ARCHIVE_LOGS: bool
DISABLE_GKE_METADATA: bool
FRONTEND_SERVER_NAMESPACE: str
HIDE_SIDENAV: bool
MINIO_ACCESS_KEY: str
Expand Down Expand Up @@ -50,16 +52,25 @@ def get_layer(self) -> Layer:
).lower(),
"ARGO_ARCHIVE_ARTIFACTORY": "minio",
"ARGO_ARCHIVE_BUCKETNAME": "mlpipeline",
"ARGO_ARCHIVE_LOGS": "false",
"ARGO_ARCHIVE_PREFIX": "logs",
"ARGO_ARCHIVE_LOGS": inputs.ARGO_ARCHIVE_LOGS,
# Must have the same value as the `keyFormat` specified in the
# `argo-workflow-controller-configmap` ConfigMap owned by
# the `argo-controller` charm.
"ARGO_KEYFORMAT": (
"artifacts/{{workflow.name}}/"
"{{workflow.creationTimestamp.Y}}/"
"{{workflow.creationTimestamp.m}}/"
"{{workflow.creationTimestamp.d}}/"
"{{pod.name}}"
),
# TODO: This should come from relation to kfp-profile-controller.
# It is the name/port of the user-specific artifact accessor
"ARTIFACTS_SERVICE_PROXY_NAME": "ml-pipeline-ui-artifact",
"ARTIFACTS_SERVICE_PROXY_PORT": "80",
"ARTIFACTS_SERVICE_PROXY_ENABLED": "true",
"AWS_ACCESS_KEY_ID": "",
"AWS_SECRET_ACCESS_KEY": "",
"DISABLE_GKE_METADATA": "false",
"DISABLE_GKE_METADATA": inputs.DISABLE_GKE_METADATA,
"ENABLE_AUTHZ": "true",
"DEPLOYMENT": "KUBEFLOW",
"FRONTEND_SERVER_NAMESPACE": inputs.FRONTEND_SERVER_NAMESPACE,
Expand Down

0 comments on commit 344a5d6

Please sign in to comment.