aenix-io / cozystack

Free and Open Source PaaS-platform for seamless management of virtual machines, managed Kubernetes, and Databases-as-a-Service
https://cozystack.io
Apache License 2.0
795 stars 45 forks source link

Configuration options for `cluster-domain` and `kubernetes-endpoint` in cozystack configmap. #168

Open kvaps opened 3 months ago

kvaps commented 3 months ago

We have to provide an extra options for cozystack configmap, which can be optional:

cluster-domain: cozy.local
kubernetes-endpoint: https://192.168.123.11:6443

If they are specified, we have to consume them by installer.sh instead of hardcoded values: https://github.com/aenix-io/cozystack/blob/838bee5d25bbe65a48f01e1de610298a4beb91cf/manifests/cozystack-installer.yaml#L73-L76

and also pass them for fluxcd and clilium values.

details:

kvaps commented 3 months ago

The cluster domain can also be extracted from resolv.conf using the following awk command:

awk '$1 == "search" { sub(/^.*.svc./, "", $2); print $2 }' /etc/resolv.conf

It might be possible to use this method to automate the configuration of the cluster domain for users.

However, we need to consider the convenience of local development. All commands like make show, make diff, and make apply should also receive the correct settings.