diff --git a/charts/gateway-helm/templates/envoy-gateway-service.yaml b/charts/gateway-helm/templates/envoy-gateway-service.yaml index f02135fd50e..bc2a1a318e0 100644 --- a/charts/gateway-helm/templates/envoy-gateway-service.yaml +++ b/charts/gateway-helm/templates/envoy-gateway-service.yaml @@ -12,6 +12,9 @@ metadata: {{- include "eg.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} + {{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerIP }} + loadBalancerIP: {{ .Values.service.loadBalancerIP }} + {{- end }} selector: control-plane: envoy-gateway {{- include "eg.selectorLabels" . | nindent 4 }} diff --git a/test/helm/gateway-helm/service-customization.in.yaml b/test/helm/gateway-helm/service-customization.in.yaml index 6c35d65f298..1288e2fd91c 100644 --- a/test/helm/gateway-helm/service-customization.in.yaml +++ b/test/helm/gateway-helm/service-customization.in.yaml @@ -6,5 +6,7 @@ global: service: trafficDistribution: PreferClose + type: "LoadBalancer" + loadBalancerIP: "172.18.0.201" annotations: this: that diff --git a/test/helm/gateway-helm/service-customization.out.yaml b/test/helm/gateway-helm/service-customization.out.yaml index 2d613418307..701d6a409de 100644 --- a/test/helm/gateway-helm/service-customization.out.yaml +++ b/test/helm/gateway-helm/service-customization.out.yaml @@ -360,7 +360,8 @@ metadata: app.kubernetes.io/version: "latest" app.kubernetes.io/managed-by: Helm spec: - type: ClusterIP + type: LoadBalancer + loadBalancerIP: 172.18.0.201 selector: control-plane: envoy-gateway app.kubernetes.io/name: gateway-helm