Skip to content

Commit

Permalink
feat: add manifests for odh extras resources for editor and viewer ro…
Browse files Browse the repository at this point in the history
…le, part of fix for RHOAIENG-5112 (opendatahub-io#102)

* feat: add manifests for odh extras resources for editor and viewer role, part of fix for RHOAIENG-5112

* fix: commented app.kubernetes.io/part-of label in mr roles as it will be set by odh operator instead
  • Loading branch information
dhirajsb authored May 28, 2024
1 parent 19ad1c4 commit 697ee4a
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/overlays/odh/extras/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

# Adds odh namespace to all resources.
namespace: opendatahub

# Extra model registry resources for ODH operator
resources:
- modelregistry_editor_role.yaml
- modelregistry_viewer_role.yaml
32 changes: 32 additions & 0 deletions config/overlays/odh/extras/modelregistry_editor_role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# permissions for end users to edit modelregistries.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: clusterrole
app.kubernetes.io/instance: modelregistry-editor-role
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: model-registry-operator
# set by odh operator
# app.kubernetes.io/part-of: model-registry-operator
app.kubernetes.io/managed-by: kustomize
name: modelregistry-editor-role
rules:
- apiGroups:
- modelregistry.opendatahub.io
resources:
- modelregistries
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- modelregistry.opendatahub.io
resources:
- modelregistries/status
verbs:
- get
28 changes: 28 additions & 0 deletions config/overlays/odh/extras/modelregistry_viewer_role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# permissions for end users to view modelregistries.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: clusterrole
app.kubernetes.io/instance: modelregistry-viewer-role
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: model-registry-operator
# set by odh operator
# app.kubernetes.io/part-of: model-registry-operator
app.kubernetes.io/managed-by: kustomize
name: modelregistry-viewer-role
rules:
- apiGroups:
- modelregistry.opendatahub.io
resources:
- modelregistries
verbs:
- get
- list
- watch
- apiGroups:
- modelregistry.opendatahub.io
resources:
- modelregistries/status
verbs:
- get

0 comments on commit 697ee4a

Please sign in to comment.