2017-09-04 16:29:40 +08:00
|
|
|
---
|
|
|
|
kind: ClusterRole
|
2020-04-15 04:14:04 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
2017-09-04 16:29:40 +08:00
|
|
|
metadata:
|
2017-11-28 20:01:30 +08:00
|
|
|
name: calico-kube-controllers
|
2018-03-30 19:29:13 +08:00
|
|
|
namespace: kube-system
|
2017-09-04 16:29:40 +08:00
|
|
|
rules:
|
2019-07-10 03:42:28 +08:00
|
|
|
{% if calico_datastore == "etcd" %}
|
2017-09-04 16:29:40 +08:00
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
- extensions
|
|
|
|
resources:
|
|
|
|
- pods
|
|
|
|
- namespaces
|
|
|
|
- networkpolicies
|
2018-08-23 22:17:18 +08:00
|
|
|
- nodes
|
2018-10-05 02:32:37 +08:00
|
|
|
- serviceaccounts
|
2017-09-04 16:29:40 +08:00
|
|
|
verbs:
|
|
|
|
- watch
|
|
|
|
- list
|
2020-05-11 19:25:51 +08:00
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- nodes
|
|
|
|
verbs:
|
|
|
|
- get
|
2018-08-23 22:17:18 +08:00
|
|
|
- apiGroups:
|
|
|
|
- networking.k8s.io
|
|
|
|
resources:
|
|
|
|
- networkpolicies
|
|
|
|
verbs:
|
|
|
|
- watch
|
2018-10-05 02:32:37 +08:00
|
|
|
- list
|
2019-07-10 03:42:28 +08: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-29 02:11:01 +08:00
|
|
|
- watch
|
|
|
|
- list
|
2019-07-10 03:42:28 +08: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 15:51:40 +08:00
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- create
|
|
|
|
- update
|
|
|
|
- delete
|
2021-04-30 22:25:59 +08:00
|
|
|
- watch
|
2020-09-03 15:51:40 +08:00
|
|
|
# kube-controllers manages hostendpoints.
|
|
|
|
- apiGroups: ["crd.projectcalico.org"]
|
|
|
|
resources:
|
2020-07-01 23:44:16 +08:00
|
|
|
- hostendpoints
|
2019-07-10 03:42:28 +08: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 23:44:16 +08: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 %}
|