Change:
cc
Thanks for flagging it! Its not flaky, it is broken as we did not enable deployments for that test suite. Sent to fix that.

Discussion:
: ${E2E_UP:="true"} : ${E2E_TEST:="false"} : ${E2E_DOWN:="false"} <ins> : ${ENABLE_DEPLOYMENTS:=true} </ins> NUM_MINIONS=3 ;;

ns := f.Namespace.Name c := f.Client // Create nginx pods. <del> podLabels := map[string]string{"name": "sample-pod"} </del> <ins> deploymentPodLabels := map[string]string{"name": "sample-pod"} rcPodLabels := map[string]string{ "name": "sample-pod", "pod":  "nginx", } </ins> rcName := "nginx-controller" _, err := c.ReplicationControllers(ns).Create(&api.ReplicationController{ ObjectMeta: api.ObjectMeta{

}, Spec: api.ReplicationControllerSpec{ Replicas: 3, <del> Selector: podLabels, </del> <ins> Selector: rcPodLabels, </ins> Template: &api.PodTemplateSpec{ ObjectMeta: api.ObjectMeta{ <del> Labels: podLabels, </del> <ins> Labels: rcPodLabels, </ins> }, Spec: api.PodSpec{ Containers: []api.Container{

}, Spec: experimental.DeploymentSpec{ Replicas:       3, <del> Selector:       podLabels, </del> <ins> Selector:       deploymentPodLabels, </ins> UniqueLabelKey: "deployment.kubernetes.io/podTemplateHash", Template: &api.PodTemplateSpec{ ObjectMeta: api.ObjectMeta{ <del> Labels: podLabels, </del> <ins> Labels: deploymentPodLabels, </ins> }, Spec: api.PodSpec{ Containers: []api.Container{

Expect(c.Deployments(ns).Delete(deploymentName, nil)).NotTo(HaveOccurred()) }() <del> waitForDeploymentStatus(c, ns, deploymentName, 3, 2, 4) </del> <ins> err = waitForDeploymentStatus(c, ns, deploymentName, 3, 2, 4) Expect(err).NotTo(HaveOccurred()) </ins> } func testRollingUpdateDeploymentEvents(f *Framework) { ns := f.Namespace.Name c := f.Client // Create nginx pods. <del> podLabels := map[string]string{"name": "sample-pod"} </del> <ins> deploymentPodLabels := map[string]string{"name": "sample-pod"} rcPodLabels := map[string]string{ "name": "sample-pod", "pod":  "nginx", } </ins> rcName := "nginx-controller" _, err := c.ReplicationControllers(ns).Create(&api.ReplicationController{ ObjectMeta: api.ObjectMeta{

}, Spec: api.ReplicationControllerSpec{ Replicas: 1, <del> Selector: podLabels, </del> <ins> Selector: rcPodLabels, </ins> Template: &api.PodTemplateSpec{ ObjectMeta: api.ObjectMeta{ <del> Labels: podLabels, </del> <ins> Labels: rcPodLabels, </ins> }, Spec: api.PodSpec{ Containers: []api.Container{

}, Spec: experimental.DeploymentSpec{ Replicas:       1, <del> Selector:       podLabels, </del> <ins> Selector:       deploymentPodLabels, </ins> UniqueLabelKey: "deployment.kubernetes.io/podTemplateHash", Template: &api.PodTemplateSpec{ ObjectMeta: api.ObjectMeta{ <del> Labels: podLabels, </del> <ins> Labels: deploymentPodLabels, </ins> }, Spec: api.PodSpec{ Containers: []api.Container{

Expect(c.Deployments(ns).Delete(deploymentName, nil)).NotTo(HaveOccurred()) }() <del> waitForDeploymentStatus(c, ns, deploymentName, 1, 0, 2) </del> <ins> err = waitForDeploymentStatus(c, ns, deploymentName, 1, 0, 2) Expect(err).NotTo(HaveOccurred()) </ins> // Verify that the pods were scaled up and down as expected. We use events to verify that. deployment, err := c.Deployments(ns).Get(deploymentName) Expect(err).NotTo(HaveOccurred())

// Waits for the deployment to reach desired state. // Returns an error if minAvailable or maxCreated is broken at any times. func waitForDeploymentStatus(c *client.Client, ns, deploymentName string, desiredUpdatedReplicas, minAvailable, maxCreated int) error { <del> return wait.Poll(poll, 2*time.Minute, func() (bool, error) { </del> <ins> return wait.Poll(poll, 5*time.Minute, func() (bool, error) { </ins> deployment, err := c.Deployments(ns).Get(deploymentName) if err != nil {