Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 19, 2025

This PR adds support for the loadBalancerClass attribute on service.spec to enable Tailscale integration and other LoadBalancer class configurations.

Changes

  • Added service.loadBalancerClass parameter to values.yaml with proper documentation comments
  • Updated service template to conditionally include loadBalancerClass only when service type is LoadBalancer and the value is defined
  • Added comprehensive test coverage with 3 new test cases covering all scenarios:
    • LoadBalancer service with loadBalancerClass defined
    • Non-LoadBalancer service with loadBalancerClass defined (should be omitted)
    • LoadBalancer service without loadBalancerClass defined (should be omitted)
  • Updated README.md documentation with the new service parameter

Behavior

The loadBalancerClass field follows the same pattern as existing LoadBalancer-specific fields like loadBalancerIP and loadBalancerSourceRanges:

  • Only applied when service.type is "LoadBalancer"
  • Omitted when not defined or when service type is not LoadBalancer
  • Allows users to specify custom LoadBalancer implementations like Tailscale

Example Usage

service:
  enabled: true
  type: LoadBalancer
  loadBalancerClass: tailscale
  annotations:
    tailscale.com/hostname: myapp-host
  ports:
    - name: http
      port: 80
      targetPort: 8080

This generates a service with spec.loadBalancerClass: tailscale as required for Tailscale integration.

All existing tests continue to pass, and the new functionality is fully tested with 211 total tests passing.

Fixes #428.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Contributor Author

Copilot AI commented Aug 19, 2025

@aslafy-z 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@Copilot Copilot AI changed the title [WIP] add loadBalancerClass attribute on service.spec Add loadBalancerClass attribute support for LoadBalancer services Aug 19, 2025
@Copilot Copilot AI requested a review from aslafy-z August 19, 2025 09:04
Copilot finished work on behalf of aslafy-z August 19, 2025 09:04
@aslafy-z aslafy-z changed the title Add loadBalancerClass attribute support for LoadBalancer services feat: Add loadBalancerClass attribute support for LoadBalancer services Aug 19, 2025
@aslafy-z aslafy-z marked this pull request as ready for review August 19, 2025 09:06
Copy link

@jr200 jr200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

Co-authored-by: aslafy-z <8191198+aslafy-z@users.noreply.github.com>
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.

add loadBalancerClass attribute on service.spec
3 participants