{{/* vim: set filetype=mustache: */}}
{{/*
Kubernetes standard labels
*/}}
{{- define "uavcloud-middleware.emqx.labels.standard" -}}
cmii.type: {{ .Values.global.application.type }}
{{- if .Values.enabled.clusterMode}}
cmii.app: {{ .Values.appName.clusterMode }}
cmii.emqx.architecture: cluster
{{- else }}
cmii.app: {{ .Values.appName.standaloneMode }}
cmii.emqx.architecture: standalone
{{- end }}
helm.sh/chart: {{ include "uavcloud-middleware.chart" . }}
app.kubernetes.io/managed-by: {{ $.Release.Service }}
{{- if .Values.global.image.tag }}
app.kubernetes.io/version: {{ .Values.global.image.tag | quote }}
{{- end }}
{{- end -}}

{{/*
Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector
*/}}
{{- define "uavcloud-middleware.emqx.labels.matchLabels" -}}
cmii.type: {{ .Values.global.application.type }}
{{- if .Values.enabled.clusterMode}}
cmii.app: {{ .Values.appName.clusterMode }}
cmii.emqx.architecture: cluster
{{- else }}
cmii.app: {{ .Values.appName.standaloneMode }}
cmii.emqx.architecture: standalone
{{- end }}
{{- end -}}
