Set id width at 8 and pad with zeros.

This commit is contained in:
Brendan Burns
2014-06-26 19:22:12 -07:00
parent 9e90c14369
commit 78d9538358
2 changed files with 2 additions and 2 deletions

View File

@@ -62,7 +62,7 @@ func (r RealPodControl) createReplica(controllerSpec api.ReplicationController)
}
pod := api.Pod{
JSONBase: api.JSONBase{
ID: fmt.Sprintf("%x", rand.Int()),
ID: fmt.Sprintf("%08x", rand.Uint32()),
},
DesiredState: controllerSpec.DesiredState.PodTemplate.DesiredState,
Labels: controllerSpec.DesiredState.PodTemplate.Labels,