ReplicaSet has owner ref of the Deployment that created it

This commit is contained in:
Mayank Kumar
2016-10-26 23:58:20 -07:00
parent 9ef610b672
commit 777977612b
9 changed files with 382 additions and 17 deletions

View File

@@ -468,7 +468,9 @@ func (reaper *DeploymentReaper) Stop(namespace, name string, timeout time.Durati
// Delete deployment at the end.
// Note: We delete deployment at the end so that if removing RSs fails, we at least have the deployment to retry.
return deployments.Delete(name, nil)
var falseVar = false
nonOrphanOption := api.DeleteOptions{OrphanDependents: &falseVar}
return deployments.Delete(name, &nonOrphanOption)
}
type updateDeploymentFunc func(d *extensions.Deployment)