Fix calico etcd mode networkpolicy RBAC (#12587)

Co-authored-by: Chad Swenson <chadswen@gmail.com>
This commit is contained in:
k8s-infra-cherrypick-robot
2025-09-29 10:36:17 -07:00
committed by GitHub
parent e52f788942
commit 2336d54088

View File

@@ -6,19 +6,26 @@ metadata:
namespace: kube-system
rules:
{% if calico_datastore == "etcd" %}
- apiGroups:
- ""
- extensions
# Pods are monitored for changing labels.
# The node controller monitors Kubernetes nodes.
# Namespace and serviceaccount labels are used for policy.
- apiGroups: [""]
resources:
- pods
- namespaces
- networkpolicies
- nodes
- namespaces
- serviceaccounts
verbs:
- watch
- list
- get
# Watch for changes to Kubernetes NetworkPolicies.
- apiGroups: ["networking.k8s.io"]
resources:
- networkpolicies
verbs:
- watch
- list
{% elif calico_datastore == "kdd" %}
# Nodes are watched to monitor for deletions.
- apiGroups: [""]