37 lines
1.3 KiB
YAML
37 lines
1.3 KiB
YAML
{{- if and .Values.enabled.standaloneMode (not .Values.enabled.clusterMode) }}
|
|
{{- $namespace := .Release.Namespace -}}
|
|
{{- $applicationName := .Values.appName.standaloneMode -}}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ $applicationName }}
|
|
namespace: {{ $namespace }}
|
|
labels:
|
|
{{- include "uavcloud-middleware.emqx.labels.standard" . | nindent 4 }}
|
|
spec:
|
|
type: {{ .Values.global.middlewareService.type }}
|
|
selector:
|
|
{{- include "uavcloud-middleware.emqx.labels.matchLabels" . | nindent 4 }}
|
|
ports:
|
|
- port: {{ .Values.containerPort.mqtt }}
|
|
name: mqtt
|
|
targetPort: {{ .Values.containerPort.mqtt }}
|
|
{{- if eq .Values.global.middlewareService.type "NodePort" }}
|
|
nodePort: {{ .Values.nodePort.mqtt }}
|
|
{{- end }}
|
|
- port: {{ .Values.containerPort.dashboard }}
|
|
name: dashboard
|
|
targetPort: {{ .Values.containerPort.dashboard }}
|
|
{{- if eq .Values.global.middlewareService.type "NodePort" }}
|
|
nodePort: {{ .Values.nodePort.dashboard }}
|
|
{{- end }}
|
|
- port: {{ .Values.containerPort.websocket }}
|
|
name: mqtt-websocket
|
|
targetPort: {{ .Values.containerPort.websocket }}
|
|
{{- if eq .Values.global.middlewareService.type "NodePort" }}
|
|
nodePort: {{ .Values.nodePort.mqttWebSocket }}
|
|
{{- end }}
|
|
---
|
|
{{- end }}
|