{{- if .Values.metrics.enabled }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "emqx.fullname" . }}-basic-auth
  namespace: {{ .Release.Namespace }}
type: kubernetes.io/basic-auth
stringData:
  username: {{ .Values.emqxConfig.EMQX_DASHBOARD__DEFAULT_USERNAME | default "admin" }}
  password: {{ .Values.emqxConfig.EMQX_DASHBOARD__DEFAULT_PASSWORD | default "public" }}
{{- end }}
