OCPBUGS-66943: Validate cluster name against Azure reserved words#10221
Conversation
Azure prohibits the use of certain reserved words and trademarks in resource names. This change adds validation to reject cluster names containing any of the 43 reserved words documented by Azure, preventing deployment failures with ReservedResourceName errors. Reserved words checked include: - Complete reserved words (40): AZURE, OFFICE, EXCHANGE, etc. - Substring forbidden (2): MICROSOFT, WINDOWS - Prefix forbidden (1): LOGIN
|
@gpei: This pull request references Jira Issue OCPBUGS-66943, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@gpei: This pull request references Jira Issue OCPBUGS-66943, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Some local test of the built installer |
|
/retest-required |
|
/approve ...but I'm not happy I can't name my cluster HOLOLENS! |
|
/lgtm cancel (Sorry for cancelling Thuan's lgtm, but it makes more sense than removing approve). I just noticed that the commits need to be squashed. We can actually use tide to squash ALL the commits, and that would be fine in this case (but it doesn't work well if you have a PR where you want to preserve multiple commits). If you want to use tide, that's fine we can re-add lgtm Nice work on writing a good commit message |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: patrickdillon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@patrickdillon Thanks for letting me know about this. The last two commits are just fixes, so squashing them all is fine, we can just use Tide to squash the commits. |
|
/label tide/merge-method-squash I think this is the right command for squashing 👀 |
|
/lgtm Happy to reapply the |
|
Pre-merge verification done on this, the installer works as expected. |
|
@gpei: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
This should be a small enhancement that could be backported to 4.21. But I'm wondering about timing, with 4.21 about to GA soon and this not being a big issue (we already have docs warning against these reserved words), so should we backport now or wait for 4.21.z releases after GA? |
|
@gpei: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
@gpei: Jira Issue Verification Checks: Jira Issue OCPBUGS-66943 Jira Issue OCPBUGS-66943 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
I guess the "bug" here is really a "user error" and we are helping to guard against it so it's a not a bug in the product that should block 4.21 GA. Looking at the criteria Patrick mentioned the other day, there is no attached customer case, and it's not critical so we can skip backporting it? But if we do, z-stream seems like a good place :D What do you think Patrick? |
Azure prohibits certain reserved words and trademarks in resource names that have accessible endpoints (such as FQDNs). This change adds validation to reject cluster names that violate Azure's reserved word restrictions, preventing deployment failures with ReservedResourceName or DomainNameLabelReserved errors.
The validation implements three types of restrictions based on Azure documentation[1]:
Complete reserved words (40): Cannot be used as the exact cluster name
Examples: ACCESS, AZURE, OFFICE, EXCHANGE, XBOX
Substring forbidden (2): Cannot appear anywhere in the name
MICROSOFT, WINDOWS
Prefix forbidden (1): Cannot be used at the start
LOGIN
[1]https://learn.microsoft.com/en-us/azure/azure-resource-manager/troubleshooting/error-reserved-resource-name