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

ensure we use InternalIP or ExternalIP machine addresses #90

Merged
merged 2 commits into from
Mar 1, 2024

Conversation

neoaggelos
Copy link

Summary

Make sure that we use an IP address for the microk8s join commands. This is done by filtering for addresses of type InternalIP or ExternalIP.

Changes

  • Update getControlPlaneNodesToJoin to group the list of control plane addresses by type, then return a list of addresses of the same type. The order of preference is defined as InternalIP, then ExternalIP. We return the first list of addresses that is not empty.
  • Do not use a [2]string for the join addresses, but rather return the full slice of found addresses.
  • Adjust the 20-microk8s-join.sh script to accept any number of join urls, not hardcoded to two.
  • If no node IPs are found, we print an error and list the addresses that we found (hopefully this should be clear enough in case no IP is set on the machine addresses).

@neoaggelos neoaggelos merged commit 3dfd18a into main Mar 1, 2024
4 checks passed
@neoaggelos neoaggelos deleted the KU-454/machine-addresses branch March 1, 2024 09:24
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