Przeglądaj źródła

feat(helm-chart): add support for loadBalancerClass

Insert loadBalancerClass in the service manifest. Required for clusters with multiple loadbalancers.
Kiril Velikov 2 lat temu
rodzic
commit
5a693240da

+ 1 - 0
deploy/charts/emqx-enterprise/README.md

@@ -73,6 +73,7 @@ The following table lists the configurable parameters of the emqx chart and thei
 | `service.nodePorts.ws` | Kubernetes node port for WebSocket/HTTP. | nil |
 | `service.nodePorts.wss` | Kubernetes node port for WSS/HTTPS. | nil |
 | `service.nodePorts.dashboard` | Kubernetes node port for dashboard. | nil |
+| `service.loadBalancerClass` | The load balancer implementation this Service belongs to | |
 | `service.loadBalancerIP` | loadBalancerIP for Service | nil |
 | `service.loadBalancerSourceRanges` | Address(es) that are allowed when service is LoadBalancer | [] |
 | `service.externalIPs` | ExternalIPs for the service | [] |

+ 3 - 0
deploy/charts/emqx-enterprise/templates/service.yaml

@@ -18,6 +18,9 @@ spec:
   externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | default "Cluster" }}
   {{- end }}
   {{- if eq .Values.service.type "LoadBalancer" }}
+  {{- if .Values.service.loadBalancerClass }}
+  loadBalancerClass: {{ .Values.service.loadBalancerClass }}
+  {{- end }}
   {{- if .Values.service.loadBalancerIP }}
   loadBalancerIP: {{ .Values.service.loadBalancerIP }}
   {{- end }}

+ 5 - 1
deploy/charts/emqx-enterprise/values.yaml

@@ -163,6 +163,10 @@ service:
     wss:
     dashboard:
     dashboardtls:
+  ## Specifies the load balancer implementation this Service belongs to.
+  ## Once set, it can not be changed.
+  ##
+  # loadBalancerClass:
   ## Set the LoadBalancer service type to internal only.
   ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
   ##
@@ -245,7 +249,7 @@ ssl:
   useExisting: false
   existingName: emqx-tls
   dnsnames: []
-  commonName: 
+  commonName:
   issuer:
     name: letsencrypt-dns
     kind: ClusterIssuer

+ 1 - 0
deploy/charts/emqx/README.md

@@ -74,6 +74,7 @@ The following table lists the configurable parameters of the emqx chart and thei
 | `service.nodePorts.ws` | Kubernetes node port for WebSocket/HTTP. | nil |
 | `service.nodePorts.wss` | Kubernetes node port for WSS/HTTPS. | nil |
 | `service.nodePorts.dashboard` | Kubernetes node port for dashboard. | nil |
+| `service.loadBalancerClass` | The load balancer implementation this Service belongs to | |
 | `service.loadBalancerIP` | loadBalancerIP for Service | nil |
 | `service.loadBalancerSourceRanges` | Address(es) that are allowed when service is LoadBalancer | [] |
 | `service.externalIPs` | ExternalIPs for the service | [] |

+ 3 - 0
deploy/charts/emqx/templates/service.yaml

@@ -18,6 +18,9 @@ spec:
   externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | default "Cluster" }}
   {{- end }}
   {{- if eq .Values.service.type "LoadBalancer" }}
+  {{- if .Values.service.loadBalancerClass }}
+  loadBalancerClass: {{ .Values.service.loadBalancerClass }}
+  {{- end }}
   {{- if .Values.service.loadBalancerIP }}
   loadBalancerIP: {{ .Values.service.loadBalancerIP }}
   {{- end }}

+ 5 - 1
deploy/charts/emqx/values.yaml

@@ -163,6 +163,10 @@ service:
     wss:
     dashboard:
     dashboardtls:
+  ## Specifies the load balancer implementation this Service belongs to.
+  ## Once set, it can not be changed.
+  ##
+  # loadBalancerClass:
   ## Set the LoadBalancer service type to internal only.
   ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
   ##
@@ -245,7 +249,7 @@ ssl:
   useExisting: false
   existingName: emqx-tls
   dnsnames: []
-  commonName: 
+  commonName:
   issuer:
     name: letsencrypt-dns
     kind: ClusterIssuer