Skip to content
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

Merged
merged 1 commit into from
Feb 15, 2019
Merged

types: validate cluster name in InstallConfig #1255

merged 1 commit into from
Feb 15, 2019

Conversation

staebler
Copy link
Contributor

@staebler staebler commented Feb 14, 2019

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

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 14, 2019
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 14, 2019
@abhinavdahiya
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 14, 2019
@staebler
Copy link
Contributor Author

Updated to add the validation of <cluster-name>.<base-domain> as well.

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
@abhinavdahiya
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 14, 2019
@openshift-ci-robot
Copy link
Contributor

[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:
  • OWNERS [abhinavdahiya,staebler]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 0b656ae into openshift:master Feb 15, 2019
wking added a commit to wking/openshift-installer that referenced this pull request Apr 4, 2020
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 ;).
vrutkovs pushed a commit to vrutkovs/installer that referenced this pull request Apr 13, 2020
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 ;).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants