truecharts / public

Community Helm Chart Repository
https://truecharts.org
GNU Affero General Public License v3.0
1.14k stars 617 forks source link

[code-server addon] doesnt share IP when metallb is enabled #3900

Closed ksimm1 closed 1 year ago

ksimm1 commented 2 years ago

App Name

code-server addon

SCALE Version

22.02.3

App Version

N/A

Application Events

N/A

Application Logs

N/A

Application Configuration

  1. Have metallb installed and configured with an address pool
  2. Install an app using loadbalancer services
  3. Enable the codeserver addon for the same app using loadbalancer service
  4. check the IP addresses under k3s kubectl get svc -A

The workaround is to specify the LoadBalancer IP address under code-server addon to be the same as the one assigned to the other app's services.

Describe the bug

By default, all loadbalancer services include an annotation metallb.universe.tf/allow-shared-ip that ensures services under the same appname share the same IP address assigned by metallb.

Annotation code is here: https://github.com/truecharts/library-charts/blob/0783be11dc3720f55e5134bdbffad0b415875655/charts/common/templates/class/_service.tpl#L32

Codeserver code is here:

When code-server addon is enabled, it is not picking up this annotation, and the code-server addon gets assigned a different IP address by metallb

To Reproduce

  1. Have metallb installed and configured with an address pool
  2. Install an app using loadbalancer service, no IP specified
  3. Enable the codeserver addon for the same app using loadbalancer service, no IP specified
  4. check the IP addresses under k3s kubectl get svc -A

The workaround is to specify the LoadBalancer IP address under code-server addon to be the same as the one assigned to the other app's services.

Expected Behavior

Codeserver addon should share the same IP address as the IPs assigned in the other apps services

Screenshots

N/A

Additional Context

N/A

I've read and agree with the following

PrivatePuffin commented 2 years ago

To be clear: I'm not sure MetalLB guarantees automatic assignment to be the same on everything. Afaik that MIGHT happen and is likely to happen but is not a formal guarantee.

That being said: Yes, there is a code related issue/mistake around this that improves this behavior on our side. Just not it isn't some sort of guarantee

PrivatePuffin commented 2 years ago

I've looked into it, and to be honest: I don't see why it shouldn't do so already tbh.

truecharts-admin commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.

ksimm1 commented 1 year ago

This is no longer an issue. Tested with home-assistant and homepage apps. Codeserver addon shares IP with main service as expected

PrivatePuffin commented 1 year ago

YES, so new common fixed it, thanks for verifying @ksimm1

truecharts-admin commented 1 year ago

This issue is locked to prevent necro-posting on closed issues. Please create a new issue or contact staff on discord of the problem persists