rancher-partner-charts/charts/kubecost/cost-analyzer/2.4.0/templates/prometheus-server-clusterro...

19 lines
606 B
YAML

{{ if .Values.global.prometheus.enabled }}
{{- if and .Values.prometheus.server.enabled .Values.prometheus.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
{{- include "prometheus.server.labels" . | nindent 4 }}
name: {{ template "prometheus.server.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ template "prometheus.serviceAccountName.server" . }}
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "prometheus.server.fullname" . }}
{{- end }}
{{ end }}