-
Notifications
You must be signed in to change notification settings - Fork 90
Description
Describe the bug
The cluster struct has ClusterCidr field which cannot be provided from the command line:
❯ autok3s -d create \
--provider native \
--name k3s\
--ssh-user ubuntu \
--ssh-key-path ./infrastructure/oci/autok3s/id_ed25519 \
--master-ips 10.0.1.201 \
--server-config-file ./infrastructure/oci/autok3s/config.yml \
--cluster-cidr 10.10.0.0/16 \
--cluster
Error: unknown flag: --cluster-cidrSince the value stays empty, the default CIDR is provided to the installation script:
autok3s/pkg/cluster/commands.go
Lines 138 to 141 in f548372
| if cluster.ClusterCidr != "" { | |
| runArgs = append(runArgs, "--cluster-cidr="+cluster.ClusterCidr) | |
| } | |
Even if we pass this flag using --master-extra-args '--cluster-cidr 10.10.0.0/16', the result is a duplicated entry in the env var: INSTALL_K3S_EXEC='server --advertise-address=10.0.1.201 --cluster-cidr=10.42.0.0/16 --cluster-init --node-external-ip=10.0.1.201 --tls-san=10.0.1.201 --cluster-cidr 10.10.0.0/16' leading to a k3s misconfiguration.
Expected behavior
A way to provide the cluster IP address (either from server-config-file or directly as an auto-k3s flag).