Files
2026-08-26 03:39:42 +05:30

25 lines
747 B
YAML

{{- if and .Values.rbac.create (not .Values.rbac.namespaced) }}
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ template "vmalert.server.fullname" . }}-clusterrolebinding
namespace: {{ .Release.Namespace }}
labels:
{{- include "vmalert.server.labels" . | nindent 4 }}
{{- with .Values.rbac.extraLabels }}
{{ toYaml . | indent 4}}
{{- end }}
{{- with .Values.rbac.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
name: {{ include "vmalert.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ template "vmalert.server.fullname" . }}-clusterrole
apiGroup: rbac.authorization.k8s.io
{{- end -}}