๐ Integration of Existing RBAC Rules
apiVersion: rbac-manager.k8smgmt.io/v1
kind: RBACPolicy
metadata:
name: tc001-existing-clusterrole
spec:
version: 1.0.0
namespaceCreatePolicy: "IfNotPresent"
clusterRoles:
- apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: cr-secret-reader
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "watch", "list"]
- apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: cr-secret-writer
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
clusterRoleBindings:
- apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: read-secrets-robot
subjects:
- kind: ServiceAccount
namespace: app
name: robot-reader
roleRef:
kind: ClusterRole
name: cr-secret-reader
apiGroup: rbac.authorization.k8s.io
- apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: write-secrets-robot
subjects:
- kind: ServiceAccount
namespace: app
name: tc001-robot-writer
roleRef:
kind: ClusterRole
name: cr-secret-writer
apiGroup: rbac.authorization.k8s.ioLast updated