{{- define "uavcloud-middleware.emqx.cluster.config.acl" -}}
{allow, {user, "admin"}, pubsub, ["admin/#"]}.
{allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}.
{allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}.
{deny, all, subscribe, ["$SYS/#", {eq, "#"}]}.
{allow, all}.
{{- end -}}

{{- define "uavcloud-middleware.emqx.cluster.config.emqx_auth_username" -}}
auth.user.1.username = {{ .Values.auth.username }}
auth.user.1.password = {{ .Values.auth.password }}
auth.user.password_hash = sha256
{{- end -}}

{{- define "uavcloud-middleware.emqx.cluster.config.loaded_plugins" -}}
{emqx_auth_username,true}.
{emqx_management, true}.
{emqx_recon, true}.
{emqx_retainer, false}.
{emqx_dashboard, true}.
{emqx_telemetry, true}.
{emqx_rule_engine, true}.
{emqx_bridge_mqtt, false}.
{{- end -}}