File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,11 @@ import (
3030 "github.com/spf13/viper"
3131)
3232
33+ const (
34+ clusterNameMaxLength = 20
35+ namespaceMaxLength = 20
36+ )
37+
3338var installCmdOptions struct {
3439 dryRun bool
3540 clusterNameInCodefresh string
@@ -219,10 +224,10 @@ func parseNodeSelector(s string) (nodeSelector, error) {
219224}
220225
221226func validateInstallOptions (opts plugins.InstallOptions ) (error ) {
222- if len (opts .ClusterName ) > 20 {
227+ if len (opts .ClusterName ) > clusterNameMaxLength {
223228 return errors .New ("cluster name lenght is limited to 20" )
224229 }
225- if len (opts .ClusterNamespace ) > 20 {
230+ if len (opts .ClusterNamespace ) > namespaceMaxLength {
226231 return errors .New ("cluster namespace is limited to 20" )
227232 }
228233 return nil
You can’t perform that action at this time.
0 commit comments