mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Merge pull request #24800 from thockin/validation_pt8-3
Automatic merge from submit-queue Make name validators return string slices Part of the larger validation PR, broken out for easier review and merge. Builds on previous PRs in the series.
This commit is contained in:
@@ -28,11 +28,10 @@ import (
|
||||
"k8s.io/kubernetes/pkg/util/validation/field"
|
||||
)
|
||||
|
||||
// ValidatePetSetName can be used to check whether the given PetSet
|
||||
// name is valid.
|
||||
// ValidatePetSetName can be used to check whether the given PetSet name is valid.
|
||||
// Prefix indicates this name will be used as part of generation, in which case
|
||||
// trailing dashes are allowed.
|
||||
func ValidatePetSetName(name string, prefix bool) (bool, string) {
|
||||
func ValidatePetSetName(name string, prefix bool) []string {
|
||||
// TODO: Validate that there's name for the suffix inserted by the pets.
|
||||
// Currently this is just "-index". In the future we may allow a user
|
||||
// specified list of suffixes and we need to validate the longest one.
|
||||
|
||||
Reference in New Issue
Block a user