fed: Disable orphaning of per-cluster resources on deletion.

The Federation control plane issues a delete command unless it wants to orphan the underlying per-cluster resource. When issuing that command, always set the orphanDependents to false.
This commit is contained in:
Christian Bell
2017-04-04 14:19:48 -07:00
parent fb645a11a3
commit 39d4fbfe36
9 changed files with 18 additions and 9 deletions

View File

@@ -291,7 +291,8 @@ func New(federationClient fedclientset.Interface, dns dnsprovider.Interface,
},
func(client kubeclientset.Interface, obj pkgruntime.Object) error {
svc := obj.(*v1.Service)
err := client.Core().Services(svc.Namespace).Delete(svc.Name, &metav1.DeleteOptions{})
orphanDependents := false
err := client.Core().Services(svc.Namespace).Delete(svc.Name, &metav1.DeleteOptions{OrphanDependents: &orphanDependents})
return err
})