From c31d14f3c2b1937e4aadb2e549c94c6c0df7af1d Mon Sep 17 00:00:00 2001 From: Sridhar Gaddam Date: Fri, 30 Aug 2019 21:32:40 +0530 Subject: [PATCH] Add RBAC policy for listing pods in sm-route-agent ds pod Submariner-route-agent daemonset pod needs to query the list of other sm-route-agent pods in the cluster for their hostIP addresses. The ipaddress will be used as remote VxLAN Vtep IPs. Currently, sm-route-agent pod does not have the necessary privileges to list the pods in the submariner namespace of local cluster. This patch addresses this issue by adding the necessary role. Error seen: Failed to list *v1.Pod: pods is forbidden: User "system:serviceaccount:submariner:submariner-routeagent" cannot list resource "pods" in API group "" in the namespace "submariner" --- submariner/templates/rbac.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/submariner/templates/rbac.yaml b/submariner/templates/rbac.yaml index 89c7850..e953321 100644 --- a/submariner/templates/rbac.yaml +++ b/submariner/templates/rbac.yaml @@ -32,6 +32,9 @@ rules: - apiGroups: ["submariner.io"] resources: ["clusters", "endpoints"] verbs: ["create", "get", "list", "watch", "patch", "update"] +- apiGroups: [""] + resources: ["pods"] + verbs: ["get", "watch", "list"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding