Stores hash of pod manifest in mirror pod's annotation

Use the hash to track whether the mirror pod is a truthful representation of
the static pod.
This commit is contained in:
Yu-Ju Hong
2015-10-20 13:51:54 -07:00
parent b896a66679
commit f8aa206ffa
6 changed files with 45 additions and 29 deletions

View File

@@ -96,10 +96,11 @@ func TestReadPodsFromFile(t *testing.T) {
},
expected: CreatePodUpdate(kubetypes.SET, kubetypes.FileSource, &api.Pod{
ObjectMeta: api.ObjectMeta{
Name: "test-" + hostname,
UID: "12345",
Namespace: "mynamespace",
SelfLink: getSelfLink("test-"+hostname, "mynamespace"),
Name: "test-" + hostname,
UID: "12345",
Namespace: "mynamespace",
Annotations: map[string]string{kubetypes.ConfigHashAnnotationKey: "12345"},
SelfLink: getSelfLink("test-"+hostname, "mynamespace"),
},
Spec: api.PodSpec{
NodeName: hostname,