diff --git a/test/e2e/network_partition.go b/test/e2e/network_partition.go index e6a2d21f2af..8a8443542c6 100644 --- a/test/e2e/network_partition.go +++ b/test/e2e/network_partition.go @@ -391,7 +391,6 @@ var _ = framework.KubeDescribe("Network Partition [Disruptive] [Slow]", func() { Expect(err).NotTo(HaveOccurred()) pst := statefulSetTester{c: c} - pst.saturate(ps) nn := framework.TestContext.CloudConfig.NumNodes nodeNames, err := framework.CheckNodesReady(f.ClientSet, framework.NodeReadyInitialTimeout, nn) diff --git a/test/e2e/petset.go b/test/e2e/petset.go index bcffbe5d616..d869f8f472d 100644 --- a/test/e2e/petset.go +++ b/test/e2e/petset.go @@ -114,6 +114,8 @@ var _ = framework.KubeDescribe("StatefulSet [Slow] [Feature:PetSet]", func() { petMounts := []api.VolumeMount{{Name: "datadir", MountPath: "/data/"}} podMounts := []api.VolumeMount{{Name: "home", MountPath: "/home"}} ps := newStatefulSet(psName, ns, headlessSvcName, 3, petMounts, podMounts, labels) + setInitializedAnnotation(ps, "false") + _, err := c.Apps().StatefulSets(ns).Create(ps) Expect(err).NotTo(HaveOccurred()) @@ -147,6 +149,7 @@ var _ = framework.KubeDescribe("StatefulSet [Slow] [Feature:PetSet]", func() { petMounts := []api.VolumeMount{{Name: "datadir", MountPath: "/data/"}} podMounts := []api.VolumeMount{{Name: "home", MountPath: "/home"}} ps := newStatefulSet(psName, ns, headlessSvcName, 2, petMounts, podMounts, labels) + setInitializedAnnotation(ps, "false") _, err := c.Apps().StatefulSets(ns).Create(ps) Expect(err).NotTo(HaveOccurred()) @@ -897,10 +900,8 @@ func newStatefulSet(name, ns, governingSvcName string, replicas int32, petMounts Replicas: replicas, Template: api.PodTemplateSpec{ ObjectMeta: api.ObjectMeta{ - Labels: labels, - Annotations: map[string]string{ - "pod.alpha.kubernetes.io/initialized": "false", - }, + Labels: labels, + Annotations: map[string]string{}, }, Spec: api.PodSpec{ Containers: []api.Container{ @@ -918,3 +919,7 @@ func newStatefulSet(name, ns, governingSvcName string, replicas int32, petMounts }, } } + +func setInitializedAnnotation(ss *apps.StatefulSet, value string) { + ss.Spec.Template.ObjectMeta.Annotations["pod.alpha.kubernetes.io/initialized"] = value +}