Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Configuration of a privileged role and role binding that allows a test application in a CI to run
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: privileged-role
rules:
- apiGroups: [""]
resources: ["secrets", "pods", "pods/log", "services"]
verbs: ["get", "watch", "list", "create", "delete"]
- apiGroups: ["batch"]
resources: ["jobs"]
verbs: ["get", "watch", "list", "create", "delete"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["get", "watch", "list", "create", "delete"]
- apiGroups: ["extensions"]
resources: ["deployments"]
verbs: ["get", "watch", "list", "create", "delete"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: privileged-role-binding
subjects:
- kind: ServiceAccount
name: default
namespace: kubeflow
roleRef:
kind: ClusterRole
name: privileged-role
apiGroup: rbac.authorization.k8s.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment