apiVersion: v1
kind: ServiceAccount
metadata:
  name: kserve-models-web-app
  namespace: kserve
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: kserve-models-web-app-cluster-role
rules:
- apiGroups:
  - authorization.k8s.io
  resources:
  - subjectaccessreviews
  verbs:
  - create
- apiGroups:
  - ""
  resources:
  - namespaces
  - pods
  - pods/log
  - events
  verbs:
  - get
  - list
- apiGroups:
  - serving.kserve.io
  resources:
  - inferenceservices
  - inferenceservices/status
  verbs:
  - get
  - list
  - watch
  - create
  - delete
  - deletecollection
  - patch
  - update
- apiGroups:
  - serving.knative.dev
  resources:
  - services
  - services/status
  - routes
  - routes/status
  - configurations
  - configurations/status
  - revisions
  - revisions/status
  verbs:
  - get
  - list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: kserve-models-web-app-binding
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: kserve-models-web-app-cluster-role
subjects:
- kind: ServiceAccount
  name: kserve-models-web-app
  namespace: kserve
