From 23ad84b0c76148f2d6cdb43e16268e42b4d21477 Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Wed, 10 Feb 2016 15:38:27 -0800 Subject: [PATCH] place damonset pods on not ready nodes --- pkg/controller/daemon/controller.go | 5 ----- pkg/controller/daemon/controller_test.go | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/pkg/controller/daemon/controller.go b/pkg/controller/daemon/controller.go index 7fbff804288..1b812a6acd9 100644 --- a/pkg/controller/daemon/controller.go +++ b/pkg/controller/daemon/controller.go @@ -582,11 +582,6 @@ func (dsc *DaemonSetsController) nodeShouldRunDaemonPod(node *api.Node, ds *exte if !(ds.Spec.Template.Spec.NodeName == "" || ds.Spec.Template.Spec.NodeName == node.Name) { return false } - // If the node is not ready, don't run on it. - // TODO(mikedanese): remove this once daemonpods forgive nodes - if !api.IsNodeReady(node) { - return false - } for _, c := range node.Status.Conditions { if c.Type == api.NodeOutOfDisk && c.Status == api.ConditionTrue { diff --git a/pkg/controller/daemon/controller_test.go b/pkg/controller/daemon/controller_test.go index 77df3394f81..00175cb74aa 100644 --- a/pkg/controller/daemon/controller_test.go +++ b/pkg/controller/daemon/controller_test.go @@ -187,7 +187,7 @@ func TestOneNodeDaemonLaunchesPod(t *testing.T) { syncAndValidateDaemonSets(t, manager, ds, podControl, 1, 0) } -// DaemonSets should not place onto NotReady nodes +// DaemonSets should place onto NotReady nodes func TestNotReadNodeDaemonDoesNotLaunchPod(t *testing.T) { manager, podControl := newTestController() node := newNode("not-ready", nil) @@ -199,7 +199,7 @@ func TestNotReadNodeDaemonDoesNotLaunchPod(t *testing.T) { manager.nodeStore.Add(node) ds := newDaemonSet("foo") manager.dsStore.Add(ds) - syncAndValidateDaemonSets(t, manager, ds, podControl, 0, 0) + syncAndValidateDaemonSets(t, manager, ds, podControl, 1, 0) } // DaemonSets should not place onto OutOfDisk nodes