From 2f2e0c6163f83d6ec433ccae9c037510953d464e Mon Sep 17 00:00:00 2001 From: k8s-infra-cherrypick-robot <90416843+k8s-infra-cherrypick-robot@users.noreply.github.com> Date: Tue, 17 Mar 2026 04:25:41 -0700 Subject: [PATCH] Add calico-tier-getter RBAC (#13112) 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 cc0f7d9d3..c668e42db 100644 --- a/roles/network_plugin/calico/templates/calico-cr.yml.j2 +++ b/roles/network_plugin/calico/templates/calico-cr.yml.j2 @@ -215,3 +215,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 %}