mirror of
https://github.com/stakater/Reloader.git
synced 2026-05-20 15:42:53 +00:00
29 lines
979 B
YAML
29 lines
979 B
YAML
{{- if and .Values.reloader.watchGlobally (.Values.reloader.rbac.enabled) }}
|
|
{{- if (.Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1") }}
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
{{ else }}
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
{{- end }}
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
annotations:
|
|
{{ include "reloader-helm3.annotations" . | indent 4 }}
|
|
labels:
|
|
{{ include "reloader-labels.chart" . | indent 4 }}
|
|
{{- if .Values.reloader.rbac.labels }}
|
|
{{ toYaml .Values.reloader.rbac.labels | indent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.reloader.matchLabels }}
|
|
{{ toYaml .Values.reloader.matchLabels | indent 4 }}
|
|
{{- end }}
|
|
name: {{ template "reloader-fullname" . }}-role-binding
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: {{ template "reloader-fullname" . }}-role
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: {{ template "reloader-serviceAccountName" . }}
|
|
namespace: {{ .Values.namespace | default .Release.Namespace }}
|
|
{{- end }}
|