kuma
kuma copied to clipboard
Validate zone name is valid on control-plane install (and startup)
Summary
I followed the documentation : https://kuma.io/docs/1.2.1/deployments/multi-zone/#set-up-a-multi-zone-deployment And in the "verify control plane connectivity" step, I couldn't see any zone connected. Finally the zone was not connected to the global control plane because special characters are not accepted in the zone name.
I named my zone 'cluster_k8s_1' --> it was the issue I renamed my zone 'clusterk8s1 --> issue resolved, I verified control plane connectivity
Steps To Reproduce
- Follow kuma documentation https://kuma.io/docs/1.2.1/deployments/multi-zone/#multi-zone-mode
- At step "Zone control plane"
kumactl install control-plane \
--mode=zone \
--zone=<zone name> \
--ingress-enabled \
--kds-global-address grpcs://`<global-kds-address>` | kubectl apply -f -
choose a name with charactere as '_' example : 'cluster_k8s_1'
- verify log from the global control plane you will something like Error logs provide below
Additional Details & Logs
- Version : Kuma 1.2.3
- Error logs :
2021-08-25T12:21:58.515Z INFO kds-global new session created {"peer-id": "cluster_k8s_1"}
2021-08-25T12:21:58.516Z INFO kds-global creating Zone {"name": "cluster_k8s_1"}
2021-08-25T12:21:58.524Z ERROR kds-global Global CP could not create a zone {"peer-id": "cluster_k8s_1", "error": "failed to create k8s resource: Zone.kuma.io \"cluster_k8s_1\" is invalid: metadata.name: Invalid value: \"cluster_k8s_1\": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')", "errorVerbose": "Zone.kuma.io \"cluster_k8s_1\" is invalid: metadata.name: Invalid value: \"cluster_k8s_1\": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
- Configuration : default
- Platform and Operating System : 2 VMs : K8S cluster
- Installation Method (Helm, kumactl, AWS CloudFormation, etc.) : Minikube, and kuma 1.2.3
Seems like we should had validation on the zone name in kumactl install control-plane
I was trying to create with a zone like "CamelCase" and the same issue happened. It may also be possible to add tips in the deployment doc to let users know that they should conform to the RFC 1123 standard.
Good idea! If you want to contribute here's the file you'll want to modify: https://github.com/kumahq/kuma-website/blob/master/docs/docs/1.3.1/deployments/multi-zone.md
Thanks!
@lahabana Does the zone name need to have such a restrictive character set?
This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant please comment on it promptly or attend the next triage meeting.
I think in the end they end up as the name of a k8s resource which is why it's restrictive.
This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant please comment on it promptly or attend the next triage meeting.
This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant please comment on it promptly or attend the next triage meeting.
This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant please comment on it promptly or attend the next triage meeting.
We've also noticed something with 100 chars limits on zone names.
This is tricky to have entity names limited to 100 characters as they end up being something like: <zone>_<podName>_<namespace>
for example
We've discussed that maybe having good names like this wasn't required.
This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant please comment on it promptly or attend the next triage meeting.
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.