Skip to content

Commit

Permalink
Added missing permissions for operator. (#6683)
Browse files Browse the repository at this point in the history
Related commit: cilium/cilium@976337b
  • Loading branch information
mis4s authored Sep 18, 2020
1 parent 79226d0 commit 9ce34be
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions roles/network_plugin/cilium/templates/cilium-cr.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,25 @@ rules:
- get
- list
- watch
{% if cilium_version | regex_replace('v') is version('1.8', '>=') %}
# For cilium-operator running in HA mode.
#
# Cilium operator running in HA mode requires the use of ResourceLock for Leader Election
# between mulitple running instances.
# The preferred way of doing this is to use LeasesResourceLock as edits to Leases are less
# common and fewer objects in the cluster watch "all Leases".
# The support for leases was introduced in coordination.k8s.io/v1 during Kubernetes 1.14 release.
# In Cilium we currently don't support HA mode for K8s version < 1.14. This condition make sure
# that we only authorize access to leases resources in supported K8s versions.
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- create
- get
- update
{% endif %}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down

0 comments on commit 9ce34be

Please sign in to comment.