Skip to content

Commit

Permalink
deploy: set background propagation policy for old deployment cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mfojtik committed May 2, 2017
1 parent 93687c3 commit 307b8b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/deploy/controller/deploymentconfig/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/golang/glog"

kapierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
kutilerrors "k8s.io/apimachinery/pkg/util/errors"
Expand Down Expand Up @@ -435,7 +436,9 @@ func (c *DeploymentConfigController) cleanupOldDeployments(existingDeployments [
continue
}

err := c.rn.ReplicationControllers(deployment.Namespace).Delete(deployment.Name, nil)
err := c.rn.ReplicationControllers(deployment.Namespace).Delete(deployment.Name, metav1.DeleteOptions{
PropagationPolicy: &metav1.DeletePropagationBackground,
})
if err != nil && !kapierrors.IsNotFound(err) {
deletionErrors = append(deletionErrors, err)
}
Expand Down

0 comments on commit 307b8b5

Please sign in to comment.