Skip to content

Commit

Permalink
Adds support for specifying specific IP for cloud provider load balan…
Browse files Browse the repository at this point in the history
…cers for ingress service, see: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer or https://docs.microsoft.com/en-us/azure/aks/static-ip#create-a-service-using-the-static-ip-address (#2779)

Signed-off-by: James D Bloom <733179+jamesdbloom@users.noreply.github.com>
(cherry picked from commit a423c20)
  • Loading branch information
jamesdbloom authored and mergify-bot committed Sep 20, 2021
1 parent 280710f commit 4c86138
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions deployments/charts/kuma/templates/cp-global-sync-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ metadata:
{{- end }}
spec:
type: {{ .Values.controlPlane.globalZoneSyncService.type }}
{{- if .Values.controlPlane.globalZoneSyncService.loadBalancerIP }}
loadBalancerIP: {{ .Values.controlPlane.globalZoneSyncService.loadBalancerIP }}
{{- end }}
ports:
- port: {{ .Values.controlPlane.globalZoneSyncService.port }}
{{- if eq .Values.controlPlane.globalZoneSyncService.type "NodePort" }}
Expand Down
2 changes: 1 addition & 1 deletion deployments/charts/kuma/templates/cp-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
- port: 5653
name: dns-server
protocol: UDP
{{- end }}
{{- end }}
selector:
app: {{ include "kuma.name" . }}-control-plane
{{- include "kuma.selectorLabels" . | nindent 4 }}
3 changes: 3 additions & 0 deletions deployments/charts/kuma/templates/ingress-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ metadata:
{{- end }}
spec:
type: {{ .Values.ingress.service.type }}
{{- if .Values.ingress.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.ingress.service.loadBalancerIP }}
{{- end }}
ports:
- port: {{ .Values.ingress.service.port }}
protocol: TCP
Expand Down
4 changes: 4 additions & 0 deletions deployments/charts/kuma/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ controlPlane:
globalZoneSyncService:
# -- Service type of the Global-zone sync
type: LoadBalancer
# -- (string) Optionally specify IP to be used by cloud provider when configuring load balancer
loadBalancerIP:
# -- Additional annotations to put on the Global Zone Sync Service
annotations: { }
# -- Port on which Global Zone Sync Service is exposed
Expand Down Expand Up @@ -178,6 +180,8 @@ ingress:
service:
# -- Service type of the Ingress
type: LoadBalancer
# -- (string) Optionally specify IP to be used by cloud provider when configuring load balancer
loadBalancerIP:
# -- Additional annotations to put on the Ingress service
annotations: { }
# -- Port on which Ingress is exposed
Expand Down

0 comments on commit 4c86138

Please sign in to comment.