{{- if eq .Values.omsagent.secret.wsid "<your_workspace_id>" }}

##############################################################################
####   ERROR: You did not provide Azure Log Analytics workspace ID.       ####
##############################################################################

{{- end }}

{{- if eq .Values.omsagent.secret.key "<your_workspace_key>" }}

##############################################################################
####   ERROR: You did not provide Azure Log Analytics workspace key       ####
##############################################################################

{{- end }}

{{- if and (ne .Values.omsagent.env.clusterName "<your_cluster_name>") (ne .Values.omsagent.env.clusterId "<your_cluster_id>") }}

##############################################################################
####   ERROR: You did not provide cluster name                            ####
##############################################################################

{{- end }}

{{- if or (eq .Values.omsagent.secret.key "<your_workspace_key>") (eq .Values.omsagent.secret.wsid "<your_workspace_id>") (and (eq .Values.omsagent.env.clusterName "<your_cluster_name>") (eq .Values.omsagent.env.clusterId "<your_cluster_id>"))}}

This deployment will not complete. To proceed, run
 helm upgrade {{ .Release.Name }} \
   --set omsagent.secret.wsid=<your_workspace_id> \
   --set omsagent.secret.key=<your_workspace_key> \
   --set omsagent.env.clusterName=<your_cluster_name> \
   incubator/azuremonitor-containers

{{- else -}}

{{ .Release.Name }} deployment is complete.
{{ .Values.omsagent.domain}} is configured Azure Log Analytics Workspace Domain.
Data should start flowing to the Log Analytics workspace shortly.
Proceed to below link to view health and monitoring data of your clusters
{{- if eq (.Values.omsagent.domain | lower)  "opinsights.azure.com" }}
- Azure Public Cloud Portal URL : https://aka.ms/azmon-containers
{{- else if eq (.Values.omsagent.domain | lower)  "opinsights.azure.cn"  }}
- Azure China Cloud Portal URL: https://aka.ms/azmon-containers-mooncake
{{- else if eq (.Values.omsagent.domain | lower)  "opinsights.azure.us"  }}
- Azure US Government Cloud Portal URL: https://aka.ms/azmon-containers-fairfax
{{- else }}
########################################################################################
####   ERROR: Provided omsagent.domain value either invalid or not supported        ####
########################################################################################
{{- end }}
{{- end }}