Fix Node Number validation (#918)

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
Daniel Valdivia
2021-08-03 09:18:51 -07:00
committed by GitHub
parent 7e4d34958e
commit fcb74aee77
4 changed files with 44 additions and 41 deletions

View File

@@ -38,9 +38,10 @@ var (
errLicenseNotFound = errors.New("license not found")
errAvoidSelfAccountDelete = errors.New("logged in user cannot be deleted by itself")
errAccessDenied = errors.New("access denied")
errTooFewNodes = errors.New("at least 4 nodes are required in cluster")
errTooFewSchedulableNodes = errors.New("at least 4 schedulable nodes are required in cluster")
errFewerThanFourNodes = errors.New("at least 4 nodes are required in request")
errTooManyNodes = errors.New("cannot request more nodes than what is available in the cluster")
errTooFewNodes = errors.New("there are not enough nodes in the cluster to support this tenant")
errTooFewSchedulableNodes = errors.New("there is not enough schedulable nodes to satisfy this requirement")
errFewerThanFourNodes = errors.New("at least 4 nodes are required for a tenant")
)
// prepareError receives an error object and parse it against k8sErrors, returns the right error code paired with a generic error message