{{- if and .Values.minio.enabled .Values.minio.auth.rootPassword (not .Values.minio.auth.existingSecret) -}}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "colanode.fullname" . }}-minio
  labels:
    {{- include "colanode.labels" . | nindent 4 }}
type: Opaque
data:
  {{ .Values.minio.auth.rootUserKey }}: {{ .Values.minio.auth.rootUser | b64enc | quote }}
  {{ .Values.minio.auth.rootPasswordKey }}: {{ .Values.minio.auth.rootPassword | b64enc | quote }}
{{- end }} 