-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
types: validate cluster name in InstallConfig #1255
types: validate cluster name in InstallConfig #1255
Conversation
/lgtm |
Updated to add the validation of |
Validate that the cluster name in an InstallConfig is a valid DNS subdomain. Validate that <cluster-name>.<base-domain> is a valid DNS subdomain. The DomainName function in pkg/validate now takes a parameter specifying whether the domain name being validated is permitted to have a trailing dot. The base domain is allowed to have a trailing dot, but the cluster name is not allowed to have a trailing dot. Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1663447
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, staebler The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
This logic became a method in 1ab1cd3 (types: add ClusterDomain helper for InstallConfig, 2019-01-31, openshift#1169); so we can drop the validation-specific helper which was from bf3ee03 (types: validate cluster name in InstallConfig, 2019-02-14, openshift#1255). Or maybe we never needed the validation-specific helper ;).
This logic became a method in 1ab1cd3 (types: add ClusterDomain helper for InstallConfig, 2019-01-31, openshift#1169); so we can drop the validation-specific helper which was from bf3ee03 (types: validate cluster name in InstallConfig, 2019-02-14, openshift#1255). Or maybe we never needed the validation-specific helper ;).
Validate that the cluster name in an InstallConfig is a valid DNS subdomain.
Validate that
<cluster-name>.<base-domain>
is a valid DNS subdomain.The DomainName function in pkg/validate now takes a parameter specifying whether the domain name being validated is permitted to have a trailing dot. The base domain is allowed to have a trailing dot, but the cluster name is not allowed to have a trailing dot.
Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1663447