Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changing ipaddress pool needs a good way to propagate into traefik service #377

Open
nishant-dash opened this issue Jun 27, 2024 · 3 comments

Comments

@nishant-dash
Copy link
Contributor

nishant-dash commented Jun 27, 2024

Enhancement Proposal

if you have a setup with metallb and ipranges set in the metallb charm, an ipaddresspool object is created in k8s from which the loadbalancer for traefik gets an ip
If you change this ipaddresspool (metallb ipranges charm config), there does not seem to a be a good/smooth/juju way to get an updated ip for traefik for example.
I presume this generally applies to all relevant juju k8s charms

Metallb docs suggest

  1. restarting the MetalLB’s controller pod
  2. deleting and re-creating the service

source: https://metallb.universe.tf/configuration/_advanced_ipaddresspool_configuration/#changing-the-ip-of-a-service

TO reproduce this behaviour:

  1. deploy k8s
  2. deploy metallb with ipranges config set to any local ip
  3. deploy cos-lite bundle
  4. change the metallb ipranges config
@PietroPasotti
Copy link
Collaborator

I thought juju would keep an eye on the backing service and pop a config-changed if that happens to get modified?
But indeed we should check this

@PietroPasotti
Copy link
Collaborator

@nishant-dash would adding an action to traefik to refresh the IP help mitigate this issue?
The charm has no way to 'notice' if the IP has changed.
Doing it on a schedule (e.g. custom pebble notice, cronjob, resurrect) is tricky because we'd need to do that very frequently to avoid "too much" data loss.
We could combine the approaches.

@nishant-dash
Copy link
Contributor Author

@PietroPasotti I think having an action to get it to request a new ip is ok, but eventually if there was a better way to handle this, maybe something the metallb charm could help with, having the charm automatically refresh its ip would be ideal

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

No branches or pull requests

2 participants