From 7c87e4bf5f2bc95931c1db6ac8c667648866d9a0 Mon Sep 17 00:00:00 2001 From: Gage Krumbach Date: Mon, 2 Oct 2023 11:34:28 -0500 Subject: [PATCH] updated dashboard manifests --- odh-dashboard/README.md | 8 +-- odh-dashboard/base/cluster-role.yaml | 7 +++ .../base/fetch-accelerators.rbac.yaml | 26 +++++++++ odh-dashboard/base/kustomization.yaml | 13 ++--- odh-dashboard/base/role.yaml | 8 +++ ...cceleratorprofiles.opendatahub.io.crd.yaml | 54 +++++++++++++++++++ odh-dashboard/crd/kustomization.yaml | 1 + odh-dashboard/modelserving/ovms-gpu-ootb.yaml | 3 +- odh-dashboard/modelserving/ovms-ootb.yaml | 3 +- 9 files changed, 107 insertions(+), 16 deletions(-) create mode 100644 odh-dashboard/base/fetch-accelerators.rbac.yaml create mode 100644 odh-dashboard/crd/acceleratorprofiles.opendatahub.io.crd.yaml diff --git a/odh-dashboard/README.md b/odh-dashboard/README.md index b1311b00a..fef8ae3c4 100644 --- a/odh-dashboard/README.md +++ b/odh-dashboard/README.md @@ -11,17 +11,13 @@ For more information, visit the project [GitHub repo](https://github.com/opendat ### Folders 1. base: contains all the necessary yaml files to install the dashboard -2. overlays/authentication: Contains the necessary yaml files to install the - Open Data Hub Dashboard configured to require users to authenticate to the - OpenShift cluster before they can access the service -3. consolelink: only container consolelink manifests ##### Installation Use the `kustomize` tool to process the manifest for the `oc apply` command. ``` -# Parse the authentication overlays to deploy ODH Dashboard WITHOUT the required configs for groups -cd manifests/overlays/authentication +# Parse the base manifest to deploy ODH Dashboard WITHOUT the required configs for groups +cd manifests/base kustomize edit set namespace # Set the namespace in the manifest where you want to deploy the dashboard kustomize build . | oc apply -f - ``` diff --git a/odh-dashboard/base/cluster-role.yaml b/odh-dashboard/base/cluster-role.yaml index 51b579850..d21d47cd0 100644 --- a/odh-dashboard/base/cluster-role.yaml +++ b/odh-dashboard/base/cluster-role.yaml @@ -3,6 +3,13 @@ apiVersion: rbac.authorization.k8s.io/v1 metadata: name: odh-dashboard rules: + - verbs: + - get + - list + apiGroups: + - '' + resources: + - nodes - verbs: - get - list diff --git a/odh-dashboard/base/fetch-accelerators.rbac.yaml b/odh-dashboard/base/fetch-accelerators.rbac.yaml new file mode 100644 index 000000000..d11b7dc3a --- /dev/null +++ b/odh-dashboard/base/fetch-accelerators.rbac.yaml @@ -0,0 +1,26 @@ +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: fetch-accelerators-role +rules: + - apiGroups: + - dashboard.opendatahub.io + verbs: + - get + - list + - watch + resources: + - acceleratorprofiles +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: accelerators +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: fetch-accelerators-role +subjects: + - apiGroup: rbac.authorization.k8s.io + kind: Group + name: system:authenticated \ No newline at end of file diff --git a/odh-dashboard/base/kustomization.yaml b/odh-dashboard/base/kustomization.yaml index 7fbcd6594..cbcf16e59 100644 --- a/odh-dashboard/base/kustomization.yaml +++ b/odh-dashboard/base/kustomization.yaml @@ -21,10 +21,11 @@ resources: - image-puller.clusterrolebinding.yaml - model-serving-role.yaml - model-serving-role-binding.yaml + - fetch-accelerators.rbac.yaml images: -- name: odh-dashboard - newName: quay.io/opendatahub/odh-dashboard - newTag: main -- name: oauth-proxy - newName: registry.redhat.io/openshift4/ose-oauth-proxy - digest: sha256:ab112105ac37352a2a4916a39d6736f5db6ab4c29bad4467de8d613e80e9bb33 + - name: odh-dashboard + newName: quay.io/opendatahub/odh-dashboard + newTag: main + - name: oauth-proxy + newName: registry.redhat.io/openshift4/ose-oauth-proxy + digest: sha256:ab112105ac37352a2a4916a39d6736f5db6ab4c29bad4467de8d613e80e9bb33 diff --git a/odh-dashboard/base/role.yaml b/odh-dashboard/base/role.yaml index bac744a29..5a885ab04 100644 --- a/odh-dashboard/base/role.yaml +++ b/odh-dashboard/base/role.yaml @@ -3,6 +3,14 @@ apiVersion: rbac.authorization.k8s.io/v1 metadata: name: odh-dashboard rules: + - verbs: + - create + - get + - list + apiGroups: + - dashboard.opendatahub.io + resources: + - acceleratorprofiles - apiGroups: - route.openshift.io resources: diff --git a/odh-dashboard/crd/acceleratorprofiles.opendatahub.io.crd.yaml b/odh-dashboard/crd/acceleratorprofiles.opendatahub.io.crd.yaml new file mode 100644 index 000000000..0b429de43 --- /dev/null +++ b/odh-dashboard/crd/acceleratorprofiles.opendatahub.io.crd.yaml @@ -0,0 +1,54 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: acceleratorprofiles.dashboard.opendatahub.io +spec: + group: dashboard.opendatahub.io + scope: Namespaced + names: + plural: acceleratorprofiles + singular: acceleratorprofile + kind: AcceleratorProfile + versions: + - name: v1alpha + served: true + storage: true + schema: + openAPIV3Schema: + type: object + required: + - spec + properties: + spec: + type: object + required: + - displayName + - enabled + - identifier + properties: + displayName: + type: string + enabled: + type: boolean + identifier: + type: string + description: + type: string + tolerations: + type: array + items: + type: object + required: + - key + properties: + key: + type: string + operator: + type: string + value: + type: string + effect: + type: string + tolerationSeconds: + type: integer + \ No newline at end of file diff --git a/odh-dashboard/crd/kustomization.yaml b/odh-dashboard/crd/kustomization.yaml index 7709378df..3d8497d80 100644 --- a/odh-dashboard/crd/kustomization.yaml +++ b/odh-dashboard/crd/kustomization.yaml @@ -8,3 +8,4 @@ resources: - odhquickstarts.console.openshift.io.crd.yaml - odhdocuments.dashboard.opendatahub.io.crd.yaml - odhapplications.dashboard.opendatahub.io.crd.yaml +- acceleratorprofiles.opendatahub.io.crd.yaml \ No newline at end of file diff --git a/odh-dashboard/modelserving/ovms-gpu-ootb.yaml b/odh-dashboard/modelserving/ovms-gpu-ootb.yaml index e103cb86f..7c5c8781b 100644 --- a/odh-dashboard/modelserving/ovms-gpu-ootb.yaml +++ b/odh-dashboard/modelserving/ovms-gpu-ootb.yaml @@ -5,7 +5,6 @@ metadata: labels: opendatahub.io/dashboard: 'true' opendatahub.io/ootb: 'true' - opendatahub.io/configurable: 'true' annotations: tags: 'ovms,servingruntime' description: 'OpenVino with GPU Support Model Serving Definition' @@ -59,5 +58,5 @@ objects: version: '1' - autoSelect: true name: tensorflow - version: "2" + version: "2" parameters: [] \ No newline at end of file diff --git a/odh-dashboard/modelserving/ovms-ootb.yaml b/odh-dashboard/modelserving/ovms-ootb.yaml index 3fabac7a1..9c242e02b 100644 --- a/odh-dashboard/modelserving/ovms-ootb.yaml +++ b/odh-dashboard/modelserving/ovms-ootb.yaml @@ -5,7 +5,6 @@ metadata: labels: opendatahub.io/dashboard: 'true' opendatahub.io/ootb: 'true' - opendatahub.io/configurable: 'true' annotations: tags: 'ovms,servingruntime' description: 'OpenVino Model Serving Definition' @@ -57,5 +56,5 @@ objects: version: '1' - autoSelect: true name: tensorflow - version: "2" + version: "2" parameters: [] \ No newline at end of file