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