secret.yaml 805 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
{{- if .Values.master.useSecurity -}}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "jenkins.fullname" . }}
  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 }}"
type: Opaque
data:
  {{ if .Values.master.adminPassword -}}
  jenkins-admin-password: {{ .Values.master.adminPassword | b64enc | quote }}
  {{ else -}}
  jenkins-admin-password: {{ randAlphaNum 10 | b64enc | quote }}
  {{ end -}}
  jenkins-admin-user: {{ .Values.master.adminUser | b64enc | quote }}
{{- end }}