# helm_charts_jenkins-master-backendconfig.yaml
{{- if .Values.master.backendconfig.enabled }}
apiVersion: {{ .Values.master.backendconfig.apiVersion }}
kind: BackendConfig
metadata:
  name: {{ .Values.master.backendconfig.name }}
  namespace: {{ template "jenkins.namespace" . }}
  labels:
    "app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
    "helm.sh/chart": "{{ .Chart.Name }}-{{ .Chart.Version }}"
    "app.kubernetes.io/managed-by": "{{ .Release.Service }}"
    "app.kubernetes.io/instance": "{{ .Release.Name }}"
    "app.kubernetes.io/component": "{{ .Values.master.componentName }}"
{{- if .Values.master.backendconfig.labels }}
{{ toYaml .Values.master.backendconfig.labels | indent 4 }}
{{- end }}
{{- if .Values.master.backendconfig.annotations }}
  annotations:
{{ toYaml .Values.master.backendconfig.annotations | indent 4 }}
{{- end }}
spec:
{{ toYaml .Values.master.backendconfig.spec | indent 2 }}
{{- end }}