67 lines
1.8 KiB
YAML
67 lines
1.8 KiB
YAML
# This can't be run without substituting the EFSID environment variable.
|
|
# from https://github.com/kubernetes-incubator/external-storage/blob/master/aws/efs/deploy/rbac.yaml
|
|
---
|
|
kind: ServiceAccount
|
|
apiVersion: v1
|
|
metadata:
|
|
name: efs-provisioner
|
|
---
|
|
kind: ClusterRole
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: efs-provisioner-runner
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["persistentvolumes"]
|
|
verbs: ["get", "list", "watch", "create", "delete", "describe"]
|
|
- apiGroups: [""]
|
|
resources: ["persistentvolumeclaims"]
|
|
verbs: ["get", "list", "watch", "update"]
|
|
- apiGroups: ["storage.k8s.io"]
|
|
resources: ["storageclasses"]
|
|
verbs: ["get", "list", "watch"]
|
|
- apiGroups: [""]
|
|
resources: ["events"]
|
|
verbs: ["create", "update", "patch"]
|
|
- apiGroups: [""]
|
|
resources: ["endpoints"]
|
|
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
|
---
|
|
kind: ClusterRoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: run-efs-provisioner
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: efs-provisioner
|
|
# replace with namespace where provisioner is deployed
|
|
namespace: atat
|
|
roleRef:
|
|
kind: ClusterRole
|
|
name: efs-provisioner-runner
|
|
apiGroup: rbac.authorization.k8s.io
|
|
---
|
|
kind: Role
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: leader-locking-efs-provisioner
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["endpoints"]
|
|
|
|
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
|
---
|
|
kind: RoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: leader-locking-efs-provisioner
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: efs-provisioner
|
|
# replace with namespace where provisioner is deployed
|
|
namespace: atat
|
|
roleRef:
|
|
kind: Role
|
|
name: leader-locking-efs-provisioner
|
|
apiGroup: rbac.authorization.k8s.io
|