cilium-cli
cilium-cli copied to clipboard
Transform autodetected cluster name to lowercase
kubeconfig cluster.name can contain uppercase.
https://github.com/cilium/cilium-cli/blob/e7035487d5b3675c3a6876369a4dbf11b57dba2e/install/autodetect.go#L33 forces it does not.
From the error it is not clear why the clustername must be lowercase and what is the purpose. Since there is some transformation already at https://github.com/cilium/cilium-cli/blob/e7035487d5b3675c3a6876369a4dbf11b57dba2e/install/autodetect.go#L135
Why not add also lowercase transformation?
Maybe also fix the documentation https://github.com/cilium/cilium-cli/blob/master/internal/cli/cmd/install.go#L51 with "Used for clustermesh if enabled" if that is true
For context, the cluster name is used as part for FQDNs names, see also this commit. So our validation is stricter than what is allowed as kubeconfig context name.
Hi, will this issue be addressed or shall I close it?
hi @dosmanak thanks for the report! as @kaworu mentioned, we intentionally limit the cluster name to be lowercase, so we'd like to keep the current restriction. i'll mark this as wontfix, but please let us know if you have some specific use cases in mind that require the cluster name to be uppercase 🙏
Hello. I understand the limit. But since there Is already replacement of _ to - I don't see why the creation should fail. It could instead transform all uppercase letters to lowercase. If already existing cluster contains uppercase, I can't install cilium using cli. It is possible to rename it in Kube config, but it can bring confusion.