upd: more common manifests

This commit is contained in:
Andrei Kvapil
2020-12-23 19:04:27 +01:00
parent 23bb95cef3
commit d138216421
2 changed files with 8 additions and 13 deletions

View File

@@ -9,13 +9,12 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: snapshot-controller
namespace: default # TODO: replace with the namespace you want for your controller, e.g. kube-system
namespace: kube-system
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
# rename if there are conflicts
name: snapshot-controller-runner
rules:
- apiGroups: [""]
@@ -51,10 +50,9 @@ metadata:
subjects:
- kind: ServiceAccount
name: snapshot-controller
namespace: default # TODO: replace with the namespace you want for your controller, e.g. kube-system
namespace: kube-system
roleRef:
kind: ClusterRole
# change the name also here if the ClusterRole gets renamed
name: snapshot-controller-runner
apiGroup: rbac.authorization.k8s.io
@@ -62,8 +60,8 @@ roleRef:
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: default # TODO: replace with the namespace you want for your controller, e.g. kube-system
name: snapshot-controller-leaderelection
namespace: kube-system
rules:
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
@@ -74,13 +72,11 @@ kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: snapshot-controller-leaderelection
namespace: default # TODO: replace with the namespace you want for your controller, e.g. kube-system
namespace: kube-system
subjects:
- kind: ServiceAccount
name: snapshot-controller
namespace: default # TODO: replace with the namespace you want for your controller, e.g. kube-system
roleRef:
kind: Role
name: snapshot-controller-leaderelection
apiGroup: rbac.authorization.k8s.io