mirror of https://github.com/linkerd/linkerd2.git
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
{{ if .Values.prometheus.enabled -}}
|
|
---
|
|
###
|
|
### Prometheus RBAC
|
|
###
|
|
kind: ClusterRole
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: linkerd-{{.Values.namespace}}-prometheus
|
|
labels:
|
|
{{.Values.extensionAnnotation}}: linkerd-viz
|
|
component: prometheus
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["nodes", "nodes/proxy", "pods"]
|
|
verbs: ["get", "list", "watch"]
|
|
---
|
|
kind: ClusterRoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: linkerd-{{.Values.namespace}}-prometheus
|
|
labels:
|
|
{{.Values.extensionAnnotation}}: linkerd-viz
|
|
component: prometheus
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: linkerd-{{.Values.namespace}}-prometheus
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: linkerd-prometheus
|
|
namespace: {{.Values.namespace}}
|
|
---
|
|
kind: ServiceAccount
|
|
apiVersion: v1
|
|
metadata:
|
|
name: linkerd-prometheus
|
|
namespace: {{.Values.namespace}}
|
|
labels:
|
|
{{.Values.extensionAnnotation}}: linkerd-viz
|
|
component: prometheus
|
|
namespace: {{.Values.namespace}}
|
|
{{- include "partials.image-pull-secrets" .Values.imagePullSecrets }}
|
|
{{ end -}}
|