From 6769b39bf1506769d3c2430da2659bc93ced7866 Mon Sep 17 00:00:00 2001 From: chris8205 Date: Thu, 19 Sep 2024 22:14:36 +0200 Subject: [PATCH] fix accidently removed definition --- helm/frost-server/templates/NOTES.txt | 2 +- helm/frost-server/templates/_helpers.tpl | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/helm/frost-server/templates/NOTES.txt b/helm/frost-server/templates/NOTES.txt index 0f67b8fbc..522f16319 100644 --- a/helm/frost-server/templates/NOTES.txt +++ b/helm/frost-server/templates/NOTES.txt @@ -34,7 +34,7 @@ FROST-Server's resource | Access URL HTTP - Homepage | {{ include "frost-server.http.serviceRootUrl" . }} HTTP - SensorThings API | {{ include "frost-server.http.serviceRootUrl" . }}{{ include "frost-server.http.apiVersion" . }} {{- if .Values.frost.mqtt.enabled }} -MQTT - TCP | {{ include "frost-server.mqtt.serviceHost" . }} +MQTT - TCP | {{ include "frost-server.mqtt.serviceEndpoint" . }} MQTT - Websocket | {{ include "frost-server.mqtt.serviceRootUrl" . }} {{- end }} diff --git a/helm/frost-server/templates/_helpers.tpl b/helm/frost-server/templates/_helpers.tpl index 310e304dc..25983bd4c 100644 --- a/helm/frost-server/templates/_helpers.tpl +++ b/helm/frost-server/templates/_helpers.tpl @@ -72,9 +72,6 @@ Get the MQTT service root URL. {{ .Values.frost.mqtt.serviceProtocol }}://{{ template "frost-server.mqtt.serviceHost" . }}{{ if .Values.frost.mqtt.servicePort }}:{{ .Values.frost.mqtt.servicePort }}{{ else if not .Values.frost.mqtt.ingress.enabled }}:{{ .Values.frost.mqtt.ports.mqtt.nodePort }}{{ end }}{{ if .Values.frost.mqtt.ingress.enabled }}{{ template "frost-server.mqtt.websockPath" . }}{{ end }} {{- end -}} -{{/* -{{- end -}} - {{/* Get the MQTT Websock-Path. */}} @@ -86,6 +83,17 @@ Get the MQTT Websock-Path. {{- end -}} {{- end -}} +{{/* +Get the MQTT TCP service EndPoint +*/}} +{{- define "frost-server.mqtt.serviceEndpoint" -}} + {{- if and .Values.frost.http.serviceHost .Values.frost.mqtt.ports.mqtt.nodePort -}} + {{- printf "%s:%s" .Values.frost.http.serviceHost .Values.frost.mqtt.ports.mqtt.nodePort -}} + {{- else -}} + {{- printf "NOT CONFIGURED -- please set frost.mqtt.ports.mqtt.nodePort in values.yaml" -}} + {{- end -}} +{{- end -}} + {{/* Get the default agic rewriteAnnotations for ingress. */}}