From 770a88a94f9fcfe40525a1e988e3f15296091f67 Mon Sep 17 00:00:00 2001 From: k8s-infra-cherrypick-robot <90416843+k8s-infra-cherrypick-robot@users.noreply.github.com> Date: Wed, 18 Mar 2026 05:02:30 -0700 Subject: [PATCH] Add calico-tier-getter RBAC (#13116) Signed-off-by: Ali Afsharzadeh Co-authored-by: Ali Afsharzadeh --- .../calico/templates/calico-cr.yml.j2 | 14 ++++++++++++++ .../calico/templates/calico-crb.yml.j2 | 15 +++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/roles/network_plugin/calico/templates/calico-cr.yml.j2 b/roles/network_plugin/calico/templates/calico-cr.yml.j2 index 96f59df29..28bfda303 100644 --- a/roles/network_plugin/calico/templates/calico-cr.yml.j2 +++ b/roles/network_plugin/calico/templates/calico-cr.yml.j2 @@ -211,3 +211,17 @@ rules: - calico-cni-plugin verbs: - create +{% if calico_version is version('3.29.0', '>=') %} +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: calico-tier-getter +rules: + - apiGroups: + - "projectcalico.org" + resources: + - "tiers" + verbs: + - "get" +{% endif %} diff --git a/roles/network_plugin/calico/templates/calico-crb.yml.j2 b/roles/network_plugin/calico/templates/calico-crb.yml.j2 index add99ba52..be099c1b2 100644 --- a/roles/network_plugin/calico/templates/calico-crb.yml.j2 +++ b/roles/network_plugin/calico/templates/calico-crb.yml.j2 @@ -26,3 +26,18 @@ subjects: - kind: ServiceAccount name: calico-cni-plugin namespace: kube-system +{% if calico_version is version('3.29.0', '>=') %} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: calico-tier-getter +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: calico-tier-getter +subjects: +- apiGroup: rbac.authorization.k8s.io + kind: User + name: system:kube-controller-manager +{% endif %}