Skip to content

Conversation

SreedevT
Copy link

@SreedevT SreedevT commented Sep 21, 2025

Summary

From the k8s docs:

    // loadBalancerClass is the class of the load balancer implementation this Service belongs to.
    // If specified, the value of this field must be a label-style identifier, with an optional prefix,
    // e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users.
    // This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load
    // balancer implementation is used, today this is typically done through the cloud provider integration,
    // but should apply for any default implementation. If set, it is assumed that a load balancer
    // implementation is watching for Services with a matching class. Any default load balancer
    // implementation (e.g. cloud providers) should ignore Services that set this field.
    // This field can only be set when creating or updating a Service to type 'LoadBalancer'.
    // Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type.

AWS EKS uses this field on EKS clusters > 1.24 that have upgraded to the new AWS LoadBalancer Controller

Adds support for loadBalancerClass field in Proxy service configuration to resolve
Kubernetes validation error: "spec.loadBalancerClass: Invalid value: "null": may
not change once set".

Changes

  • Added loadBalancerClass field to Proxy CRD and ServiceConfig model
  • Modified service creation to only set loadBalancerClass when value is non-null
    (avoids Kubernetes validation error)
  • Updated migration tool to preserve existing loadBalancerClass values
  • Added comprehensive tests

Testing

  • All existing tests pass
  • New test testServiceLoadBalancerClassNull() verifies correct null handling
  • Supports any load balancer class (MetalLB, AWS NLB, etc.)

Resolves the referenced issue #202 .

@SreedevT
Copy link
Author

@pgier Could you take a look at this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant