Skip to content

Commit

Permalink
Create dashboard configuration to control kserve and modelmesh
Browse files Browse the repository at this point in the history
  • Loading branch information
lucferbux committed Oct 11, 2023
1 parent 756f19b commit 180899f
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export type DashboardConfig = K8sResourceCommon & {
disableCustomServingRuntimes: boolean;
modelMetricsNamespace: string;
disablePipelines: boolean;
disableKServe: boolean;
disableModelMesh: boolean;
};
groupsConfig?: {
adminGroups: string;
Expand Down
2 changes: 2 additions & 0 deletions backend/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export const blankDashboardCR: DashboardConfig = {
disableCustomServingRuntimes: false,
modelMetricsNamespace: '',
disablePipelines: false,
disableKServe: false,
disableModelMesh: true,
},
notebookController: {
enabled: true,
Expand Down
2 changes: 2 additions & 0 deletions docs/dashboard-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ The following are a list of features that are supported, along with there defaul
| disableModelServing | false | Disables Model Serving from the dashboard and from Data Science Projects. |
| disableProjectSharing | false | Disables Project Sharing from Data Science Projects. |
| disableCustomServingRuntimes | false | Disables Custom Serving Runtimes from the Admin Panel. |
| disableKServe | false | Disables the ability to select KServe as a Serving Platform. |
| disableModelMesh | true | Disables the ability to select ModelMesh as a Serving Platform. |
| modelMetricsNamespace | false | Enables the namespace in which the Model Serving Metrics' Prometheus Operator is installed. |

## Defaults
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/__mocks__/mockDashboardConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ type MockDashboardConfigType = {
disableProjects?: boolean;
disableModelServing?: boolean;
disableCustomServingRuntimes?: boolean;
disableKServe?: boolean;
disableModelMesh?: boolean;
};

export const mockDashboardConfig = ({
Expand All @@ -27,6 +29,8 @@ export const mockDashboardConfig = ({
disableProjects = false,
disableModelServing = false,
disableCustomServingRuntimes = false,
disableKServe = false,
disableModelMesh = true,
}: MockDashboardConfigType): DashboardConfig => ({
apiVersion: 'opendatahub.io/v1alpha',
kind: 'OdhDashboardConfig',
Expand Down Expand Up @@ -54,6 +58,8 @@ export const mockDashboardConfig = ({
modelMetricsNamespace: 'test-project',
disablePipelines: false,
disableProjectSharing: false,
disableKServe,
disableModelMesh,
},
notebookController: {
enabled: true,
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ export type DashboardCommonConfig = {
disableCustomServingRuntimes: boolean;
modelMetricsNamespace: string;
disablePipelines: boolean;
disableKServe: boolean;
disableModelMesh: boolean;
};

export type NotebookControllerUserState = {
Expand Down
4 changes: 4 additions & 0 deletions manifests/crd/odhdashboardconfigs.opendatahub.io.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ spec:
type: string
disablePipelines:
type: boolean
disableKServe:
type: boolean
disableModelMesh:
type: boolean
groupsConfig:
type: object
required:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ spec:
disableProjectSharing: true
disableCustomServingRuntimes: true
modelMetricsNamespace: ''
disableKServe: true
disableModelMesh: true
notebookController:
enabled: true
notebookSizes:
Expand Down

0 comments on commit 180899f

Please sign in to comment.