2017-09-04 08:29:40 +00:00
|
|
|
---
|
|
|
|
kind: ClusterRole
|
2020-04-14 20:14:04 +00:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
2017-09-04 08:29:40 +00:00
|
|
|
metadata:
|
2017-11-28 12:01:30 +00:00
|
|
|
name: calico-kube-controllers
|
2018-03-30 11:29:13 +00:00
|
|
|
namespace: kube-system
|
2017-09-04 08:29:40 +00:00
|
|
|
rules:
|
2019-07-09 19:42:28 +00:00
|
|
|
{% if calico_datastore == "etcd" %}
|
2017-09-04 08:29:40 +00:00
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
- extensions
|
|
|
|
resources:
|
|
|
|
- pods
|
|
|
|
- namespaces
|
|
|
|
- networkpolicies
|
2018-08-23 14:17:18 +00:00
|
|
|
- nodes
|
2018-10-04 18:32:37 +00:00
|
|
|
- serviceaccounts
|
2017-09-04 08:29:40 +00:00
|
|
|
verbs:
|
|
|
|
- watch
|
|
|
|
- list
|
2018-08-23 14:17:18 +00:00
|
|
|
- apiGroups:
|
|
|
|
- networking.k8s.io
|
|
|
|
resources:
|
|
|
|
- networkpolicies
|
|
|
|
verbs:
|
|
|
|
- watch
|
2018-10-04 18:32:37 +00:00
|
|
|
- list
|
2019-07-09 19:42:28 +00:00
|
|
|
{% elif calico_datastore == "kdd" %}
|
|
|
|
# Nodes are watched to monitor for deletions.
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources:
|
|
|
|
- nodes
|
|
|
|
verbs:
|
|
|
|
- watch
|
|
|
|
- list
|
|
|
|
- get
|
|
|
|
# Pods are queried to check for existence.
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources:
|
|
|
|
- pods
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
# IPAM resources are manipulated when nodes are deleted.
|
|
|
|
- apiGroups: ["crd.projectcalico.org"]
|
|
|
|
resources:
|
|
|
|
- ippools
|
|
|
|
verbs:
|
|
|
|
- list
|
|
|
|
- apiGroups: ["crd.projectcalico.org"]
|
|
|
|
resources:
|
|
|
|
- blockaffinities
|
|
|
|
- ipamblocks
|
|
|
|
- ipamhandles
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- create
|
|
|
|
- update
|
|
|
|
- delete
|
|
|
|
# Needs access to update clusterinformations.
|
|
|
|
- apiGroups: ["crd.projectcalico.org"]
|
|
|
|
resources:
|
|
|
|
- clusterinformations
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- create
|
|
|
|
- update
|
|
|
|
{% endif %}
|