20c7e31ea3
* Add calico 3.7.3 support * add calico_datastore variable to policy controller role * add missing clusterrole rules for calico policy controller * disable calico kube controller when kdd mode is used for versions < 3.6
68 lines
1.3 KiB
Django/Jinja
68 lines
1.3 KiB
Django/Jinja
---
|
|
kind: ClusterRole
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
metadata:
|
|
name: calico-kube-controllers
|
|
namespace: kube-system
|
|
rules:
|
|
{% if calico_datastore == "etcd" %}
|
|
- apiGroups:
|
|
- ""
|
|
- extensions
|
|
resources:
|
|
- pods
|
|
- namespaces
|
|
- networkpolicies
|
|
- nodes
|
|
- serviceaccounts
|
|
verbs:
|
|
- watch
|
|
- list
|
|
- apiGroups:
|
|
- networking.k8s.io
|
|
resources:
|
|
- networkpolicies
|
|
verbs:
|
|
- watch
|
|
- list
|
|
{% 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 %}
|