apiVersion: v1
kind: Secret
metadata:
  name: {{ template "wildfly.fullname" . }}
  labels: {{- include "wildfly.labels" . | nindent 4 }}
type: Opaque
data:
  {{- if .Values.wildflyPassword }}
  wildfly-password: {{ default "" .Values.wildflyPassword | b64enc | quote }}
  {{- else }}
  wildfly-password: {{ randAlphaNum 10 | b64enc | quote }}
  {{- end }}
