blob: ef32306f5a1a513a999acf03d3de74cf91de84fd [file] [log] [blame]
Giorgi Lekveishviliec6b3cc2023-12-01 16:30:04 +04001{{- if and .Values.autoscaler.enabled .Values.rbac.create }}
2---
3apiVersion: rbac.authorization.k8s.io/v1
4kind: ClusterRoleBinding
5metadata:
6 name: {{ template "coredns.fullname" . }}-autoscaler
7 labels: {{- include "coredns.labels.autoscaler" . | nindent 4 }}
8{{- if .Values.customLabels }}
9{{ toYaml .Values.customLabels | indent 4 }}
10{{- end }}
11{{- with .Values.customAnnotations }}
12 annotations:
13{{- toYaml . | nindent 4 }}
14{{- end }}
15roleRef:
16 apiGroup: rbac.authorization.k8s.io
17 kind: ClusterRole
18 name: {{ template "coredns.fullname" . }}-autoscaler
19subjects:
20- kind: ServiceAccount
21 name: {{ template "coredns.fullname" . }}-autoscaler
22 namespace: {{ .Release.Namespace }}
23{{- end }}