Refactor Distributed Analytics project structure
[demo.git] / vnfs / DAaaS / deploy / operator / charts / prometheus-operator / templates / prometheus / rolebinding-specificNamespace.yaml
1 {{- if and .Values.prometheus.enabled .Values.global.rbac.create }}
2 apiVersion: rbac.authorization.k8s.io/v1
3 kind: RoleBindingList
4 items:
5 {{- range uniq (append .Values.prometheus.rbac.roleNamespaces .Release.Namespace) }}
6 - apiVersion: rbac.authorization.k8s.io/v1
7   kind: RoleBinding
8   metadata:
9     name: {{ template "prometheus-operator.fullname" $ }}-prometheus
10     labels:
11       app: {{ template "prometheus-operator.name" $ }}-prometheus
12 {{ include "prometheus-operator.labels" $ | indent 6 }}
13     namespace: {{ . | quote }}
14   roleRef:
15     apiGroup: rbac.authorization.k8s.io
16     kind: Role
17     name: {{ template "prometheus-operator.fullname" $ }}-prometheus
18   subjects:
19   - kind: ServiceAccount
20     name: {{ template "prometheus-operator.prometheus.serviceAccountName" $ }}
21     namespace: {{ $.Release.Namespace }}
22 {{- end }}
23 {{- end }}