@@ -148,12 +148,12 @@ func ValidateKubernetesNamespace(namespace string) error {
148148}
149149
150150func validateKubernetesNamespace (name string ) error {
151- errorMsgPrefix := fmt .Sprintf ("kubernetes namespace should be a valid DNS-1123 subdomain " )
151+ errorMsgPrefix := fmt .Sprintf ("kubernetes namespace should be a valid DNS-1123 label " )
152152 if len (name ) == 0 {
153153 return nil
154154 } else if len (name ) > kubernetesNamespaceMaxSize {
155155 return fmt .Errorf ("%s: %q is %d chars long" , errorMsgPrefix , name , len (name ))
156- } else if msgs := validation .IsDNS1123Subdomain (name ); len (msgs ) > 0 {
156+ } else if msgs := validation .IsDNS1123Label (name ); len (msgs ) > 0 {
157157 return fmt .Errorf ("%s: %s" , errorMsgPrefix , strings .Join (msgs , ", " ))
158158 }
159159 return nil
@@ -171,12 +171,12 @@ func ValidateHelmRelease(name string) error {
171171}
172172
173173func validateHelmRelease (name string ) error {
174- errorMsgPrefix := fmt .Sprintf ("helm release name should be a valid DNS-1123 subdomain and be maximum %d chars" , helmReleaseMaxSize )
174+ errorMsgPrefix := fmt .Sprintf ("helm release name should be a valid DNS-1123 label and be maximum %d chars" , helmReleaseMaxSize )
175175 if len (name ) == 0 {
176176 return nil
177177 } else if len (name ) > helmReleaseMaxSize {
178178 return fmt .Errorf ("%s: %q is %d chars long" , errorMsgPrefix , name , len (name ))
179- } else if msgs := validation .IsDNS1123Subdomain (name ); len (msgs ) > 0 {
179+ } else if msgs := validation .IsDNS1123Label (name ); len (msgs ) > 0 {
180180 return fmt .Errorf ("%s: %s" , errorMsgPrefix , strings .Join (msgs , ", " ))
181181 }
182182 return nil
0 commit comments