specify pod name and hostname in indexed job
Kubernetes-commit: e64e34e0298d27d4099b632f5b7c1ba38fc66561
This commit is contained in:
parent
f0b4663d4c
commit
15750850e0
|
|
@ -43,12 +43,12 @@ const (
|
||||||
// TODO: make this flexible for non-core resources with alternate naming rules.
|
// TODO: make this flexible for non-core resources with alternate naming rules.
|
||||||
maxNameLength = 63
|
maxNameLength = 63
|
||||||
randomLength = 5
|
randomLength = 5
|
||||||
maxGeneratedNameLength = maxNameLength - randomLength
|
MaxGeneratedNameLength = maxNameLength - randomLength
|
||||||
)
|
)
|
||||||
|
|
||||||
func (simpleNameGenerator) GenerateName(base string) string {
|
func (simpleNameGenerator) GenerateName(base string) string {
|
||||||
if len(base) > maxGeneratedNameLength {
|
if len(base) > MaxGeneratedNameLength {
|
||||||
base = base[:maxGeneratedNameLength]
|
base = base[:MaxGeneratedNameLength]
|
||||||
}
|
}
|
||||||
return fmt.Sprintf("%s%s", base, utilrand.String(randomLength))
|
return fmt.Sprintf("%s%s", base, utilrand.String(randomLength))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue