diff --git a/submariner-operator/templates/rbac.yaml b/submariner-operator/templates/rbac.yaml index bdf0933..2af3578 100644 --- a/submariner-operator/templates/rbac.yaml +++ b/submariner-operator/templates/rbac.yaml @@ -439,6 +439,21 @@ rules: verbs: - get - list + - apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + verbs: + - get + - create --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding @@ -459,6 +474,29 @@ roleRef: name: {{ template "submariner.fullname" . }} --- apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: submariner-metrics-reader + namespace: {{ .Release.Namespace }} +rules: + - apiGroups: [""] + resources: ["pods", "services", "endpoints"] + verbs: ["get", "list", "watch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: read-submariner-metrics +subjects: + - kind: ServiceAccount + name: prometheus-k8s + namespace: openshift-monitoring +roleRef: + kind: Role + name: submariner-metrics-reader + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: {{ template "submariner.fullname" . }}:gateway