From 5b3f6c93af9ba4951afcd774c443fad25f003770 Mon Sep 17 00:00:00 2001 From: Marius Ensrud Date: Tue, 15 Feb 2022 10:26:31 +0100 Subject: [PATCH] load balancer --- charts/omada-controller/5.0/Chart.yaml | 4 +- .../5.0/templates/service.yaml | 62 +++++++++++++++++++ charts/omada-controller/5.0/values.yaml | 2 +- 3 files changed, 65 insertions(+), 3 deletions(-) diff --git a/charts/omada-controller/5.0/Chart.yaml b/charts/omada-controller/5.0/Chart.yaml index 20fed89..124d267 100644 --- a/charts/omada-controller/5.0/Chart.yaml +++ b/charts/omada-controller/5.0/Chart.yaml @@ -15,9 +15,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 5.0 +version: '5.0' # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: 5.0 +appVersion: '5.0' diff --git a/charts/omada-controller/5.0/templates/service.yaml b/charts/omada-controller/5.0/templates/service.yaml index d1c7e0a..1b58932 100644 --- a/charts/omada-controller/5.0/templates/service.yaml +++ b/charts/omada-controller/5.0/templates/service.yaml @@ -1,3 +1,64 @@ +{{- if eq .Values.service.type "LoadBalancer" }} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "omada-controller.fullname" . }} + labels: + {{- include "omada-controller.labels" . | nindent 4 }} + annotation: + metallb.universe.tf/allow-shared-ip: omada +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.manage.port }} + targetPort: 8088 + protocol: TCP + name: manage + - port: {{ .Values.service.managessl.port }} + targetPort: 8043 + protocol: TCP + name: managessl + - port: {{ .Values.service.portalssl.port }} + targetPort: 8843 + protocol: TCP + name: portalssl + - port: {{ .Values.service.eapmanage.port }} + targetPort: 29811 + protocol: TCP + name: eapmanage + - port: {{ .Values.service.eapadopt.port }} + targetPort: 29812 + protocol: TCP + name: eapadopt + - port: {{ .Values.service.eapupgrade.port }} + targetPort: 29813 + protocol: TCP + name: eapupgrade + - port: {{ .Values.service.managev2.port }} + targetPort: 29814 + protocol: TCP + name: managev2 + selector: + {{- include "omada-controller.selectorLabels" . | nindent 4 }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ include "omada-controller.fullname" . }}-UDP + labels: + {{- include "omada-controller.labels" . | nindent 4 }} + annotation: + metallb.universe.tf/allow-shared-ip: omada +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.eapdiscovery.port }} + targetPort: 29810 + protocol: UDP + name: eapdiscovery + selector: + {{- include "omada-controller.selectorLabels" . | nindent 4 }} +{{ else }} apiVersion: v1 kind: Service metadata: @@ -46,3 +107,4 @@ spec: {{- end }} selector: {{- include "omada-controller.selectorLabels" . | nindent 4 }} +{{ end }} diff --git a/charts/omada-controller/5.0/values.yaml b/charts/omada-controller/5.0/values.yaml index e01149d..12b30fc 100644 --- a/charts/omada-controller/5.0/values.yaml +++ b/charts/omada-controller/5.0/values.yaml @@ -8,7 +8,7 @@ image: repository: mbentley/omada-controller pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: 5.0 + tag: '5.0' imagePullSecrets: "" nameOverride: ""