2017-09-04 08:29:51 +00:00
|
|
|
---
|
|
|
|
kind: ClusterRole
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
|
|
metadata:
|
|
|
|
name: calico-node
|
2018-03-30 11:29:13 +00:00
|
|
|
namespace: kube-system
|
2017-09-04 08:29:51 +00:00
|
|
|
rules:
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources:
|
|
|
|
- pods
|
|
|
|
- nodes
|
2019-01-28 19:03:49 +00:00
|
|
|
- namespaces
|
2017-09-04 08:29:51 +00:00
|
|
|
verbs:
|
|
|
|
- get
|
2019-01-28 19:03:49 +00:00
|
|
|
- apiGroups: [""]
|
|
|
|
resources:
|
|
|
|
- endpoints
|
|
|
|
- services
|
|
|
|
verbs:
|
|
|
|
- watch
|
|
|
|
- list
|
2019-04-25 12:00:48 +00:00
|
|
|
{% if calico_datastore == "kdd" %}
|
|
|
|
# Used to discover Typhas.
|
|
|
|
- get
|
|
|
|
{% endif %}
|
2019-01-28 19:03:49 +00:00
|
|
|
- apiGroups: [""]
|
|
|
|
resources:
|
|
|
|
- nodes/status
|
|
|
|
verbs:
|
|
|
|
- patch
|
2019-04-25 12:00:48 +00:00
|
|
|
{% if calico_datastore == "etcd" %}
|
2018-08-22 16:16:13 +00:00
|
|
|
- apiGroups:
|
|
|
|
- policy
|
|
|
|
resourceNames:
|
|
|
|
- privileged
|
|
|
|
resources:
|
|
|
|
- podsecuritypolicies
|
|
|
|
verbs:
|
|
|
|
- use
|
2019-04-25 12:00:48 +00:00
|
|
|
{% elif calico_datastore == "kdd" %}
|
|
|
|
# Calico stores some configuration information in node annotations.
|
|
|
|
- update
|
|
|
|
# Watch for changes to Kubernetes NetworkPolicies.
|
|
|
|
- apiGroups: ["networking.k8s.io"]
|
|
|
|
resources:
|
|
|
|
- networkpolicies
|
|
|
|
verbs:
|
|
|
|
- watch
|
|
|
|
- list
|
|
|
|
# Used by Calico for policy information.
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources:
|
|
|
|
- pods
|
|
|
|
- namespaces
|
|
|
|
- serviceaccounts
|
|
|
|
verbs:
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
# The CNI plugin patches pods/status.
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources:
|
|
|
|
- pods/status
|
|
|
|
verbs:
|
|
|
|
- patch
|
|
|
|
# Calico monitors various CRDs for config.
|
|
|
|
- apiGroups: ["crd.projectcalico.org"]
|
|
|
|
resources:
|
|
|
|
- globalfelixconfigs
|
|
|
|
- felixconfigurations
|
|
|
|
- bgppeers
|
|
|
|
- globalbgpconfigs
|
|
|
|
- bgpconfigurations
|
|
|
|
- ippools
|
|
|
|
- globalnetworkpolicies
|
|
|
|
- globalnetworksets
|
|
|
|
- networkpolicies
|
|
|
|
- clusterinformations
|
|
|
|
- hostendpoints
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
# Calico must create and update some CRDs on startup.
|
|
|
|
- apiGroups: ["crd.projectcalico.org"]
|
|
|
|
resources:
|
|
|
|
- ippools
|
|
|
|
- felixconfigurations
|
|
|
|
- clusterinformations
|
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
- update
|
|
|
|
# Calico stores some configuration information on the node.
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources:
|
|
|
|
- nodes
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
# These permissions are only requried for upgrade from v2.6, and can
|
|
|
|
# be removed after upgrade or on fresh installations.
|
|
|
|
- apiGroups: ["crd.projectcalico.org"]
|
|
|
|
resources:
|
|
|
|
- bgpconfigurations
|
|
|
|
- bgppeers
|
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
- update
|
|
|
|
{% endif %}
|