mirror of
https://github.com/Telecominfraproject/wlan-cloud-helm.git
synced 2025-11-02 03:27:58 +00:00
TW-772: Convert Mqtt and gw-cloud as NodePorts
We are not able to generate the mqttData.log if we use IngressController as NodePorts. Looked at AP, it was generating the metrics but somehow they were not repoted in the mqttData.log file in the GW-sync pod. Changing the MQTT and GW-SYNC to NodePort service and then changing the LoadBalancers to use TargetGroup relative to these NodePorts fixed the issue. Still not clear on the reason.
This commit is contained in:
@@ -25,6 +25,13 @@ else use user-provided URL
|
||||
{{- printf "%s-%s" .Release.Name .Values.kafka.url | trunc 63 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Resolve the MQTT service-name to apply to a chart.
|
||||
*/}}
|
||||
{{- define "mqtt.service" -}}
|
||||
{{- printf "%s-%s" .Release.Name .Values.mqtt.url | trunc 63 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Resolve the integratedcloudcomponent service-name to apply to a chart.
|
||||
*/}}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{{- $icc := include "integratedcloudcomponent.service" . -}}
|
||||
{{- $prov := include "prov.service" . -}}
|
||||
{{- $ssc := include "ssc.service" . -}}
|
||||
{{- $mqtt := include "mqtt.service" . -}}
|
||||
{{- $ns := include "common.namespace" . -}}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
@@ -109,6 +110,10 @@ spec:
|
||||
exit 1
|
||||
fi
|
||||
{{- end }}
|
||||
- name: {{ include "common.name" . }}-mqtt-readiness
|
||||
image: busybox:1.28
|
||||
imagePullPolicy: {{ .Values.global.pullPolicy }}
|
||||
command: ['sh', '-c', "until nslookup {{ $mqtt }}.{{ $ns }}.svc.cluster.local; do echo waiting for Kafka; sleep 2; done"]
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
|
||||
@@ -12,9 +12,11 @@ spec:
|
||||
targetPort: {{ .Values.service.port1 }}
|
||||
protocol: TCP
|
||||
name: {{ .Values.service.name1 }}
|
||||
nodePort: {{ .Values.global.nodePortPrefix }}{{ .Values.service.nodePort1 }}
|
||||
- port: {{ .Values.service.port2 }}
|
||||
targetPort: {{ .Values.service.port2 }}
|
||||
protocol: TCP
|
||||
name: {{ .Values.service.name2 }}
|
||||
nodePort: {{ .Values.global.nodePortPrefix }}{{ .Values.service.nodePort2 }}
|
||||
selector:
|
||||
{{- include "common.selectorLabels" . | nindent 4 }}
|
||||
|
||||
@@ -57,11 +57,13 @@ probes:
|
||||
testsEnabled: false
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
type: NodePort
|
||||
port1: 6640
|
||||
nodePort1: 29
|
||||
name1: controller
|
||||
port2: 6643
|
||||
name2: redirector
|
||||
nodePort2: 30
|
||||
|
||||
integratedcloudcomponent:
|
||||
url: wlan-integrated-cloud-component-service
|
||||
@@ -75,6 +77,9 @@ ssc:
|
||||
url: wlan-ssc-service
|
||||
port: 9032
|
||||
|
||||
mqtt:
|
||||
url: opensync-mqtt-broker
|
||||
|
||||
# These are list of external HostAddresses for cloudserver, ovsdb, mqtt.
|
||||
# This is especially important for ovsdb and mqtt since
|
||||
# that's what AP sees. Please make sure to override
|
||||
|
||||
@@ -12,9 +12,11 @@ spec:
|
||||
targetPort: {{ .Values.service.port1 }}
|
||||
protocol: TCP
|
||||
name: {{ .Values.service.name1 }}
|
||||
nodePort: {{ .Values.global.nodePortPrefix }}{{ .Values.service.nodePort1 }}
|
||||
- port: {{ .Values.service.port2 }}
|
||||
targetPort: {{ .Values.service.port2 }}
|
||||
protocol: TCP
|
||||
name: {{ .Values.service.name2 }}
|
||||
nodePort: {{ .Values.global.nodePortPrefix }}{{ .Values.service.nodePort2 }}
|
||||
selector:
|
||||
{{- include "common.selectorLabels" . | nindent 4 }}
|
||||
|
||||
@@ -54,11 +54,13 @@ probes:
|
||||
testsEnabled: false
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
type: NodePort
|
||||
port1: 1883
|
||||
name1: listener
|
||||
nodePort1: 31
|
||||
port2: 9001
|
||||
name2: debug
|
||||
nodePort2: 32
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
|
||||
@@ -23,12 +23,12 @@ spec:
|
||||
serviceAccountName: {{ include "common.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
{{- if .Values.integratedWithPersistence.enabled }}
|
||||
initContainers:
|
||||
- name: {{ include "common.name" . }}-readiness
|
||||
image: busybox:1.28
|
||||
imagePullPolicy: {{ .Values.global.pullPolicy }}
|
||||
command: ['sh', '-c', "until nslookup {{ $pg }}.{{ $ns }}.svc.cluster.local; do echo waiting for POSTGRES; sleep 2; done"]
|
||||
{{- if .Values.integratedWithPersistence.enabled }}
|
||||
- name: {{ include "common.name" . }}-create-db-schema
|
||||
env:
|
||||
- name: POSTGRESQL_PORT_NUMBER
|
||||
@@ -81,7 +81,7 @@ spec:
|
||||
name: dshm
|
||||
- mountPath: /bitnami/postgresql
|
||||
name: data
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
|
||||
Reference in New Issue
Block a user