{{- if and (not .Values.controller.admin.existingSecret) (.Values.controller.adminSecret) -}} apiVersion: v1 kind: Secret metadata: name: {{ template "jenkins.fullname" . }} 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 }}" type: Opaque data: jenkins-admin-password: {{ template "jenkins.password" . }} jenkins-admin-user: {{ .Values.controller.adminUser | b64enc | quote }} {{- end }}