Skip to content

GatewaySpec.addresses is ignored, static IP not respected in GKE #12174

@mateuszklysz

Description

@mateuszklysz

kgateway version

v2.0.4

Kubernetes Version

v1.32.7

Describe the bug

When setting a static IP address under Gateway.spec.addresses, kgateway does not respect the provided value. Instead, the operator provisions a new Service of type LoadBalancer and assigns a random ephemeral IP from GCP.

This makes it impossible to bind a Gateway to an existing reserved static IP in GCP, which is required in production to ensure stable DNS records.

Expected Behavior

  • The Service created by kgateway should use the IP provided in Gateway.spec.addresses.
  • If the IP is invalid or unavailable, the Gateway status.addresses should reflect this, per the Gateway API spec.

Steps to reproduce the bug

  1. Reserve a static external IP in GCP.
  2. Create a Gateway with spec.addresses set to that IP.
  3. Wait for kgateway to provision the Service with type: LoadBalancer.
  4. Observe that the Service gets a random IP instead of the requested one.

Additional Environment Detail

In my configuration, the annotation in GatewayParameters was not effective, which can occur. Since this path is unavailable and the loadBalancerIP field in the generated Service is also not exposed, there should be some way to directly assign a static IP address.

Additional Context

This issue makes it difficult to use a reserved static IP with kgateway.
Without the ability to specify the IP directly, users cannot guarantee stable external endpoints, which is often required for DNS or firewall rules. Providing a way to set the loadBalancerIP would allow static IP assignment without relying on annotations that may not work in all setups.

Metadata

Metadata

Assignees

Type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions