revisit cluster_public_endpoint sylva-units value
Today, we have:
- libvirt-metal producing cluster-public-endpoint ConfigMap
- cluster-public-endpoint ConfigMap set as input to sylva-units HelmRelease, to position the
cluster_public_endpointvalue - ... but nothing in sylva-units seems to actually use
cluster_public_endpoint - this
cluster_public_endpointseems to only be used byretrieve_kubeconfig(in https://gitlab.com/sylva-projects/sylva-core/-/blob/2ccacfd011ce447f0666cdb92f459bfb7bfe2cb4/tools/shell-lib/common.sh#L134-136) which readscluster_public_endpointin the sylva-units-values Secret
This works but does not seem optimal:
- when libvirt-metal (in the bootstrap environment) produces the ConfigMap, the next periodic reconciliation of sylva-units sees new values and does a new Helm release of sylva-units, which isn't really necessary or optimal
- a side-effect (which we can compensate) is that, .Release.IsUpgrade being true on this second iteration, we have some settings that are wrongly set (
cluster-reachabledoes not depend onclusterunit anymore), leading to confusing things like this
My first impression is that we could improve this by:
- don't overwrite the
cluster_public_endpointvia a valuesFrom - have
retrieve_kubeconfigtry to find the value in cluster-public-endpoint ConfigMap if it exists, and read from the sylva-units-values Secret if it does not exist