{{- if $.Values.dashboard.enabled }}
# OneUptime dashboard Deployment
{{- $dashboardPorts := $.Values.dashboard.ports -}}
{{- $dashboardEnv := dict "PORT"  $.Values.dashboard.ports.http "DISABLE_TELEMETRY" $.Values.dashboard.disableTelemetryCollection -}}
{{- $dashboardDeploymentArgs :=dict "IsUI" true "ServiceName" "dashboard" "Ports" $dashboardPorts "Release" $.Release "Values" $.Values "Env" $dashboardEnv "Resources" $.Values.dashboard.resources "NodeSelector" $.Values.dashboard.nodeSelector "PodSecurityContext" $.Values.dashboard.podSecurityContext "ContainerSecurityContext" $.Values.dashboard.containerSecurityContext "DisableAutoscaler" $.Values.dashboard.disableAutoscaler "ReplicaCount" $.Values.dashboard.replicaCount -}}
{{- include "oneuptime.deployment" $dashboardDeploymentArgs }}
---

# OneUptime dashboard Service
{{- $dashboardPorts := $.Values.dashboard.ports -}}
{{- $dashboardServiceArgs := dict "ServiceName" "dashboard" "Ports" $dashboardPorts "Release" $.Release "Values" $.Values -}}
{{- include "oneuptime.service" $dashboardServiceArgs }}
---

# OneUptime dashboard autoscaler
{{- $dashboardAutoScalerArgs := dict "ServiceName" "dashboard" "Release" $.Release "Values" $.Values "DisableAutoscaler" $.Values.dashboard.disableAutoscaler -}}
{{- include "oneuptime.autoscaler" $dashboardAutoScalerArgs }}
---
{{- end }}