...
1{{ if .Values.prometheus.enabled -}}
2---
3###
4### Prometheus RBAC
5###
6kind: ClusterRole
7apiVersion: rbac.authorization.k8s.io/v1
8metadata:
9 name: linkerd-{{.Release.Namespace}}-prometheus
10 labels:
11 linkerd.io/extension: viz
12 component: prometheus
13 {{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
14rules:
15- apiGroups: [""]
16 resources: ["nodes", "nodes/proxy", "pods"]
17 verbs: ["get", "list", "watch"]
18---
19kind: ClusterRoleBinding
20apiVersion: rbac.authorization.k8s.io/v1
21metadata:
22 name: linkerd-{{.Release.Namespace}}-prometheus
23 labels:
24 linkerd.io/extension: viz
25 component: prometheus
26 {{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
27roleRef:
28 apiGroup: rbac.authorization.k8s.io
29 kind: ClusterRole
30 name: linkerd-{{.Release.Namespace}}-prometheus
31subjects:
32- kind: ServiceAccount
33 name: prometheus
34 namespace: {{.Release.Namespace}}
35---
36kind: ServiceAccount
37apiVersion: v1
38metadata:
39 name: prometheus
40 namespace: {{ .Release.Namespace }}
41 labels:
42 linkerd.io/extension: viz
43 component: prometheus
44 namespace: {{.Release.Namespace}}
45 {{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
46{{- include "partials.image-pull-secrets" .Values.imagePullSecrets }}
47{{ end -}}
View as plain text