Never set pod.Name in kubelet config code

I think it is time to tighten up input requirements.  The validation code will
reject a pod that has an empty name field.
This commit is contained in:
Tim Hockin
2015-01-05 22:49:37 -08:00
parent 22a241aa57
commit 88fe5c6f46
4 changed files with 2 additions and 13 deletions

View File

@@ -153,7 +153,6 @@ func extractFromFile(filename string) (api.BoundPod, error) {
return pod, fmt.Errorf("can't convert pod from file %q: %v", filename, err)
}
pod.Name = simpleSubdomainSafeHash(filename)
if len(pod.UID) == 0 {
pod.UID = simpleSubdomainSafeHash(filename)
}