mirror of https://github.com/linkerd/linkerd2.git
44 lines
1009 B
YAML
44 lines
1009 B
YAML
{{with .Values -}}
|
|
---
|
|
###
|
|
### Prometheus RBAC
|
|
###
|
|
---
|
|
kind: ClusterRole
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
metadata:
|
|
name: linkerd-{{.Namespace}}-prometheus
|
|
labels:
|
|
{{.ControllerComponentLabel}}: prometheus
|
|
{{.ControllerNamespaceLabel}}: {{.Namespace}}
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["pods"]
|
|
verbs: ["get", "list", "watch"]
|
|
---
|
|
kind: ClusterRoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
metadata:
|
|
name: linkerd-{{.Namespace}}-prometheus
|
|
labels:
|
|
{{.ControllerComponentLabel}}: prometheus
|
|
{{.ControllerNamespaceLabel}}: {{.Namespace}}
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: linkerd-{{.Namespace}}-prometheus
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: linkerd-prometheus
|
|
namespace: {{.Namespace}}
|
|
---
|
|
kind: ServiceAccount
|
|
apiVersion: v1
|
|
metadata:
|
|
name: linkerd-prometheus
|
|
namespace: {{.Namespace}}
|
|
labels:
|
|
{{.ControllerComponentLabel}}: prometheus
|
|
{{.ControllerNamespaceLabel}}: {{.Namespace}}
|
|
{{- end}}
|