kubeflow / dashboard

Kubeflow Central Dashboard is the web interface for Kubeflow
Apache License 2.0
3 stars 2 forks source link

central-dashboard: Configure build_version dynamically through ENV var #16

Open orfeas-k opened 1 year ago

orfeas-k commented 1 year ago

/kind feature

Context At the moment, KF's build version in the dashboard is defined only during build time. More specifically and as explained thoroughly in this issue https://github.com/kubeflow/dashboard/issues/25, it is not even defined and thus it is constantly dev_local.

For some more thorough technical context, in theory, it can also be defined during runtime through a custom resource that doesn't exist anymore in KF (here with the callback trace being 1, 2 and 3).

Feature Configure the build_version dynamically during runtime by using a deployment's ENV variable.

Why you need this feature: This will allow for anyone to be able to configure the build_version value in their distribution without having to rebuild the image.

Describe the solution you'd like: The solution can be inspired at a great extent what has been done for centraldashboard-angular component in https://github.com/kubeflow/kubeflow/pull/6918. The changes that really interest us are the ones in backend k8s_service.ts file. We could also consider splitting build_version to buildVersion, buildId and buildLabel but that's optional. Then, we may have to implement the new ENV variables here, although if we use kubeflowVersion, changing only where k8s gets this variable from may be enough.

andreyvelich commented 1 week ago

/transfer dashboard

google-oss-prow[bot] commented 1 week ago

@orfeas-k: The label(s) kind/feature cannot be applied, because the repository doesn't have them.

In response to [this](https://github.com/kubeflow/dashboard/issues/16): >/kind feature > >**Context** >At the moment, KF's `build version` in the dashboard is defined only during build time. More specifically and as explained thoroughly in this issue https://github.com/kubeflow/dashboard/issues/25, it is not even defined and thus it is constantly `dev_local`. > >For some more thorough technical context, in theory, it can also be defined during runtime through a `custom resource` that doesn't exist anymore in KF ([here](https://github.com/kubeflow/kubeflow/blob/c946c624cd8974ef53cac04582e4714b466d546e/components/centraldashboard/app/k8s_service.ts#L155-L179) with the callback trace being [1](https://github.com/kubeflow/kubeflow/blob/c946c624cd8974ef53cac04582e4714b466d546e/components/centraldashboard/app/k8s_service.ts#L109-L123), [2](https://github.com/kubeflow/kubeflow/blob/c946c624cd8974ef53cac04582e4714b466d546e/components/centraldashboard/app/api_workgroup.ts#L124-L129) and [3](https://github.com/kubeflow/kubeflow/blob/c946c624cd8974ef53cac04582e4714b466d546e/components/centraldashboard/public/components/main-page.js#L476-L479)). > >**Feature** >Configure the build_version dynamically during runtime by using a deployment's ENV variable. > >**Why you need this feature:** >This will allow for anyone to be able to configure the `build_version` value in their distribution without having to rebuild the image. > > >**Describe the solution you'd like:** >The solution can be inspired at a great extent what has been done for `centraldashboard-angular` component in https://github.com/kubeflow/kubeflow/pull/6918. The changes that really interest us are the ones in backend [k8s_service.ts](https://github.com/kubeflow/kubeflow/pull/6918/files#diff-ea828fce6c82bd5a9cd5d2a16b810dbf9d698263898ddd62fef4f3d4e86a2245) file. We could also consider splitting `build_version` to `buildVersion`, `buildId` and `buildLabel` but that's optional. Then, we may have to implement the new ENV variables [here](https://github.com/kubeflow/kubeflow/blob/65298ad04daa6cc1c1dfbb9dc99f2c1ab3bfd99d/components/centraldashboard/public/components/main-page.js#L460-L481), although if we use `kubeflowVersion`, changing only where k8s gets this variable from may be enough. Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.