-
Create user named
ossm-viewer
using htpasswd -
Either make the user a
cluster-reader
oc adm policy add-cluster-role-to-user cluster-reader ossm-viewer
- Or apply the following yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: ossm-reader-crole
rules:
- apiGroups: ["maistra.io/v1"]
resources: ["*"]
verbs: ["get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: ossm-reader-crolebinding
subjects:
- kind: User
name: ossm-viewer
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: ClusterRole
name: ossm-reader-crole
apiGroup: rbac.authorization.k8s.io