2018-02-17 11:37:47 +08:00
|
|
|
---
|
2018-07-27 04:17:27 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
2018-02-17 11:37:47 +08:00
|
|
|
kind: ClusterRole
|
2019-08-06 16:37:55 +08:00
|
|
|
metadata:
|
|
|
|
name: cilium-operator
|
|
|
|
rules:
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
# to automatically delete [core|kube]dns pods so that are starting to being
|
|
|
|
# managed by Cilium
|
|
|
|
- pods
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- delete
|
2020-04-11 14:47:48 +08:00
|
|
|
- apiGroups:
|
|
|
|
- discovery.k8s.io
|
|
|
|
resources:
|
|
|
|
- endpointslices
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
2019-08-06 16:37:55 +08:00
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
# to automatically read from k8s and import the node's pod CIDR to cilium's
|
|
|
|
# etcd so all nodes know how to reach another pod running in in a different
|
|
|
|
# node.
|
|
|
|
- nodes
|
|
|
|
# to perform the translation of a CNP that contains `ToGroup` to its endpoints
|
|
|
|
- services
|
|
|
|
- endpoints
|
2020-04-11 14:47:48 +08:00
|
|
|
# to check apiserver connectivity
|
|
|
|
- namespaces
|
2020-04-24 21:00:10 +08:00
|
|
|
{% if cilium_version | regex_replace('v') is version('1.7', '<') %}
|
|
|
|
- componentstatuses
|
|
|
|
{% endif %}
|
2019-08-06 16:37:55 +08:00
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- apiGroups:
|
|
|
|
- cilium.io
|
|
|
|
resources:
|
|
|
|
- ciliumnetworkpolicies
|
|
|
|
- ciliumnetworkpolicies/status
|
2020-04-11 14:47:48 +08:00
|
|
|
- ciliumclusterwidenetworkpolicies
|
|
|
|
- ciliumclusterwidenetworkpolicies/status
|
2019-08-06 16:37:55 +08:00
|
|
|
- ciliumendpoints
|
|
|
|
- ciliumendpoints/status
|
2020-04-24 21:00:10 +08:00
|
|
|
{% if cilium_version | regex_replace('v') is version('1.6', '>=') %}
|
2020-03-11 23:15:36 +08:00
|
|
|
- ciliumnodes
|
|
|
|
- ciliumnodes/status
|
|
|
|
- ciliumidentities
|
|
|
|
- ciliumidentities/status
|
2020-04-24 21:00:10 +08:00
|
|
|
{% endif %}
|
2019-08-06 16:37:55 +08:00
|
|
|
verbs:
|
|
|
|
- '*'
|
|
|
|
---
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
2018-02-17 11:37:47 +08:00
|
|
|
metadata:
|
|
|
|
name: cilium
|
|
|
|
rules:
|
2020-04-11 14:47:48 +08:00
|
|
|
- apiGroups:
|
|
|
|
- networking.k8s.io
|
|
|
|
resources:
|
2020-04-24 21:00:10 +08:00
|
|
|
{% if cilium_version | regex_replace('v') is version('1.7', '<') %}
|
|
|
|
- ingresses
|
|
|
|
{% endif %}
|
2020-04-11 14:47:48 +08:00
|
|
|
- networkpolicies
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- apiGroups:
|
|
|
|
- discovery.k8s.io
|
|
|
|
resources:
|
|
|
|
- endpointslices
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- namespaces
|
|
|
|
- services
|
|
|
|
- nodes
|
|
|
|
- endpoints
|
2020-04-24 21:00:10 +08:00
|
|
|
{% if cilium_version | regex_replace('v') is version('1.7', '<') %}
|
|
|
|
- componentstatuses
|
|
|
|
{% endif %}
|
2020-04-11 14:47:48 +08:00
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
2020-04-24 21:00:10 +08:00
|
|
|
{% if cilium_version | regex_replace('v') is version('1.7', '<') %}
|
|
|
|
- apiGroups:
|
|
|
|
- extensions
|
|
|
|
resources:
|
|
|
|
- ingresses
|
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
{% endif %}
|
2020-04-11 14:47:48 +08:00
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- pods
|
|
|
|
- nodes
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- update
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- nodes
|
|
|
|
- nodes/status
|
|
|
|
verbs:
|
|
|
|
- patch
|
|
|
|
- apiGroups:
|
|
|
|
- apiextensions.k8s.io
|
|
|
|
resources:
|
|
|
|
- customresourcedefinitions
|
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- update
|
|
|
|
- apiGroups:
|
|
|
|
- cilium.io
|
|
|
|
resources:
|
|
|
|
- ciliumnetworkpolicies
|
|
|
|
- ciliumnetworkpolicies/status
|
2020-04-24 21:00:10 +08:00
|
|
|
{% if cilium_version | regex_replace('v') is version('1.7', '>=') %}
|
2020-04-11 14:47:48 +08:00
|
|
|
- ciliumclusterwidenetworkpolicies
|
|
|
|
- ciliumclusterwidenetworkpolicies/status
|
2020-04-24 21:00:10 +08:00
|
|
|
{% endif %}
|
2020-04-11 14:47:48 +08:00
|
|
|
- ciliumendpoints
|
|
|
|
- ciliumendpoints/status
|
2020-04-24 21:00:10 +08:00
|
|
|
{% if cilium_version | regex_replace('v') is version('1.6', '>=') %}
|
2020-04-11 14:47:48 +08:00
|
|
|
- ciliumnodes
|
|
|
|
- ciliumnodes/status
|
|
|
|
- ciliumidentities
|
|
|
|
- ciliumidentities/status
|
2020-04-24 21:00:10 +08:00
|
|
|
{% endif %}
|
2020-04-11 14:47:48 +08:00
|
|
|
verbs:
|
|
|
|
- '*'
|