Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vjrantal/06cdabeb474636c01e87bc384aff937b to your computer and use it in GitHub Desktop.
Save vjrantal/06cdabeb474636c01e87bc384aff937b to your computer and use it in GitHub Desktop.
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