-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvpa_operator_rbac.yaml
43 lines (39 loc) · 1.15 KB
/
vpa_operator_rbac.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
apiVersion: v1
kind: ServiceAccount
metadata:
name: autovpa-operator
namespace: default # Change this to the namespace where the operator is deployed
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: autovpa-operator-role
rules:
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["get", "list", "watch", "patch"]
- apiGroups: ["autoscaling.k8s.io"]
resources: ["verticalpodautoscalers"]
verbs: ["get", "list", "patch", "create", "delete"]
- apiGroups: ["autoscaling.k8s.io"]
resources: ["autovpaconfigs"]
verbs: ["get", "list", "watch", "patch"]
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get", "list", "watch"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: autovpa-operator-binding
subjects:
- kind: ServiceAccount
name: autovpa-operator
namespace: default # Change this to the namespace where the operator is deployed
roleRef:
kind: ClusterRole
name: autovpa-operator-role
apiGroup: rbac.authorization.k8s.io