Skip to content

Commit ede92b0

Browse files
authored
Fix calico etcd mode networkpolicy RBAC (#12344)
1 parent 048967e commit ede92b0

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

roles/kubernetes-apps/policy_controller/calico/templates/calico-kube-cr.yml.j2

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,26 @@ metadata:
66
namespace: kube-system
77
rules:
88
{% if calico_datastore == "etcd" %}
9-
- apiGroups:
10-
- ""
11-
- extensions
9+
# Pods are monitored for changing labels.
10+
# The node controller monitors Kubernetes nodes.
11+
# Namespace and serviceaccount labels are used for policy.
12+
- apiGroups: [""]
1213
resources:
1314
- pods
14-
- namespaces
15-
- networkpolicies
1615
- nodes
16+
- namespaces
1717
- serviceaccounts
1818
verbs:
1919
- watch
2020
- list
2121
- get
22+
# Watch for changes to Kubernetes NetworkPolicies.
23+
- apiGroups: ["networking.k8s.io"]
24+
resources:
25+
- networkpolicies
26+
verbs:
27+
- watch
28+
- list
2229
{% elif calico_datastore == "kdd" %}
2330
# Nodes are watched to monitor for deletions.
2431
- apiGroups: [""]

0 commit comments

Comments
 (0)