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
|
2020-05-11 11:25:51 +00:00
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- nodes
|
|
|
|
verbs:
|
|
|
|
- get
|
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:
|
2021-10-28 18:11:01 +00:00
|
|
|
- watch
|
|
|
|
- list
|
2019-07-09 19:42:28 +00:00
|
|
|
- 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
|
2020-09-03 07:51:40 +00:00
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- create
|
|
|
|
- update
|
|
|
|
- delete
|
2021-04-30 14:25:59 +00:00
|
|
|
- watch
|
2020-09-03 07:51:40 +00:00
|
|
|
# kube-controllers manages hostendpoints.
|
|
|
|
- apiGroups: ["crd.projectcalico.org"]
|
|
|
|
resources:
|
2020-07-01 15:44:16 +00:00
|
|
|
- hostendpoints
|
2019-07-09 19:42:28 +00:00
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- create
|
|
|
|
- update
|
|
|
|
- delete
|
|
|
|
# Needs access to update clusterinformations.
|
|
|
|
- apiGroups: ["crd.projectcalico.org"]
|
|
|
|
resources:
|
|
|
|
- clusterinformations
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- create
|
|
|
|
- update
|
2020-07-01 15:44:16 +00:00
|
|
|
# KubeControllersConfiguration is where it gets its config
|
|
|
|
- apiGroups: ["crd.projectcalico.org"]
|
|
|
|
resources:
|
|
|
|
- kubecontrollersconfigurations
|
|
|
|
verbs:
|
|
|
|
# read its own config
|
|
|
|
- get
|
|
|
|
# create a default if none exists
|
|
|
|
- create
|
|
|
|
# update status
|
|
|
|
- update
|
|
|
|
# watch for changes
|
|
|
|
- watch
|
|
|
|
{% endif %}
|