{{- if and (ne .Values.omsagent.secret.key "<your_workspace_key>") (ne .Values.omsagent.secret.wsid "<your_workspace_id>") (ne .Values.omsagent.env.clusterName "<your_cluster_name>")}}
apiVersion: v1
kind: Secret
metadata:
  name: omsagent-secret
  namespace: kube-system
  labels:
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
type: Opaque
data:
  WSID: {{ required "A valid workspace id is required!" .Values.omsagent.secret.wsid | b64enc | quote }}
  KEY: {{ required "A valid workspace key is required!" .Values.omsagent.secret.key | b64enc | quote }}
  DOMAIN: {{ .Values.omsagent.domain | b64enc | quote }}
{{- end }} 
