Skip to content

Update-ips script breaking on some providers with capi #2908

@AlbinB97

Description

@AlbinB97

Experienced behaviour

If you set up a capi-cluster on a provider like Elastx, when you run the update-ips script it adds the individual nodes to network policies instead of the subnet. Which breaks the network policies for ingress-nginx.

This is because in the update-ips script it checks if a cluster installer is capi and the provider is openstack here. But while setting up a cluster with Elastx, the provider is elastx, not openstack, which means it will try to add the individual nodes instead of the subnet range, which will block traffic through the loadbalancer.

Expected behaviour

When I run update-ips script, I expect it to give me the correct ips/range needed for a functioning network policy, even if my provider is a selected provider like elastx, instead of a generic one like openstack.

Steps to reproduce

  1. Set up capi cluster on elastx
  2. Run update-ips
  3. Watch it add node ips instead of subnet range
  4. Apply to cluster
  5. Watch loadbalancer not working

Welkin Apps Version

v0.49.1

Kubernetes Version

v1.33.6

Additional context

The solution could be tricky because we still want the solution to be cloud agnostic, and not have to specify our scripts to certain cloud providers and having to add special cases for all of them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions