Added the role & binding for globalnet

Signed-off-by: Mike Kolesnik <mkolesni@redhat.com>
This commit is contained in:
Mike Kolesnik
2020-01-23 14:36:26 +02:00
parent 35417fa669
commit fb754f5f2f
+30
View File
@@ -61,4 +61,34 @@ subjects:
- kind: ServiceAccount
name: {{ template "submariner.routeAgentServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
{{- if ne .Values.submariner.globalCidr "" }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "submariner.fullname" . }}:globalnet
rules:
- apiGroups: [""]
resources: ["services", "namespaces", "pods"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get"]
- apiGroups: ["submariner.io"]
resources: ["endpoints"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "submariner.fullname" . }}:globalnet
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "submariner.fullname" . }}:globalnet
subjects:
- kind: ServiceAccount
name: {{ template "submariner.globalnetServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end -}}
{{- end -}}