Make name validators return string slices
This commit is contained in:
@@ -399,7 +399,7 @@ func getPodsAnnotationSet(template *api.PodTemplateSpec, object runtime.Object)
|
||||
func getPodsPrefix(controllerName string) string {
|
||||
// use the dash (if the name isn't too long) to make the pod name a bit prettier
|
||||
prefix := fmt.Sprintf("%s-", controllerName)
|
||||
if ok, _ := validation.ValidatePodName(prefix, true); !ok {
|
||||
if len(validation.ValidatePodName(prefix, true)) != 0 {
|
||||
prefix = controllerName
|
||||
}
|
||||
return prefix
|
||||
|
Reference in New Issue
Block a user