coredns-deployment/charts/coredns/templates/clusterrolebinding-autoscaler.yaml
Adam Hamsik bfba43007a
Migrate helm chart from archived helm charts repo. (#241)
* Migrate helm chart from archived helm charts repo. Add github action which generates helm chart releases.

Signed-off-by: Adam Hamsik <adam.hamsik@lablabs.io>

* Add helm chart repository documentation

Signed-off-by: Adam Hamsik <adam.hamsik@lablabs.io>
2020-11-18 15:41:20 -05:00

28 lines
998 B
YAML

{{- if and .Values.autoscaler.enabled .Values.rbac.create }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "coredns.fullname" . }}-autoscaler
labels:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
{{- if .Values.isClusterService }}
k8s-app: {{ .Chart.Name }}-autoscaler
kubernetes.io/cluster-service: "true"
kubernetes.io/name: "CoreDNS"
{{- end }}
app.kubernetes.io/name: {{ template "coredns.name" . }}-autoscaler
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels | indent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "coredns.fullname" . }}-autoscaler
subjects:
- kind: ServiceAccount
name: {{ template "coredns.fullname" . }}-autoscaler
namespace: {{ .Release.Namespace }}
{{- end }}