Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Validate Application Cluster Names In shipperctl admin clusters apply #64

Merged
merged 5 commits into from
Apr 2, 2019

Conversation

parhamdoustdar
Copy link
Contributor

@parhamdoustdar parhamdoustdar commented Jan 16, 2019

This pull request does the following:

  • Moves the validation of the application cluster to the very beginning so that we don't leave the clusters in a half-state
  • Validates the application cluster name to make sure that it's a valid object name. The reason this is not done for the management cluster is that the management cluster is not turned into a Cluster object.

Fixes #61.

process, to prevent the command leaving the configuration in a
half-state because of a validation error
- Added an extra line of validation to validate that cluster names are
DNS-1123 subdomain compliant.
cmd/shipperctl/cmd/apply.go Outdated Show resolved Hide resolved
cmd/shipperctl/cmd/apply.go Outdated Show resolved Hide resolved
  changed the link in the CLI output
- Used `%q` in the error output to have Go automatically quote the
  error message, instead of doing it by hand
- Changed `ValidateConfiguration` to `ValidateApplicationClusters`
  which is more "true" ;-)
@osdrv osdrv merged commit ff70e7e into master Apr 2, 2019
@parhamdoustdar parhamdoustdar deleted the shipperctl-apply-validation branch May 15, 2019 10:10
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants