-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating an AKS cluster or properties with uppercase letters causes failure #4699
Comments
@willie-yao can you PTAL? |
/assign |
Did some testing and it looks like not allowing uppercase letters isn't caused by ASO. Same errors show up on release v1.10 which didn't include ASO. Is this still something we want to add support for? |
@willie-yao Can you share the template you were testing with? |
@nojnhuh I just used to default AKS template and replaced ${CLUSTER_NAME} with capital letters |
Seems like this validation is done by kubernetes itself from the |
@willie-yao I think the original case here is with an extension name that contains capital letters. It looks like CAPZ isn't validating the name of the extension in the AzureManagedControlPlane, but when CAPZ goes to create the ASO extension resource, it uses the invalid name. I think CAPZ should be able to create the ASO resource with a valid kubernetes name in that case. |
A capital letter in a name property violates a core Kubernetes contract. For example:
It wouldn't be a terrible idea to document this, although strictly speaking this is not a CAPZ error. It doesn't seem like mutating the name during resource creation time is a great idea (maybe I'm missing something?). The idiomatic thing would be to inherit the Kubernetes data contract here and let folks know right away (via admission webhook) that their spec is invalid. |
Yes, I think that if we document this somewhere on the book and don't allow people to provision something immediately returning a useful message as such would be a good user experience. Allowing you to provision it and then having to look in debug logs is not the best. |
We already don't allow people to provision clusters with upper case characters as seen in the AzureCluster webhook:
I've also added a note in the notes in my PR. @jackfrancis just following up from our discussions, should we still allow users to use capital letters specifically for AKS Extensions, or just strictly enforce lower-case characters? |
I encountered a similar error while working through the ClusterAPI quick start for Azure: I'm not in control of the Azure Unfortunately, the name of the Is this something that the Azure Provider should be able to support, e.g. by converting |
We discussed in CAPZ office hours that the transition to ASO may have introduced a regression with naming as now resources like resource groups, vnets, etc are backed by Kubernetes CRDs, which adds the RFC 1123 restriction. We will make sure to fix this soon! |
/kind bug
What steps did you take and what happened:
Created an extension with an uppercase name. It failed to create with this message:
Created a cluster and failed with this:
What did you expect to happen:
minimum - documentation stating uppercase letters are not supported at all
best - Auto-converting uppercase letters to lowercase and just working with informational message
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version
): 1.29.2/etc/os-release
): WSL / docker desktopThe text was updated successfully, but these errors were encountered: