mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Set OrphanDependents=&falseVar so the GC will (or should remove the dummy Pod
This commit is contained in:
parent
fbc94c0896
commit
8cc265d9c9
@ -156,8 +156,10 @@ func createAndWaitForADummyDeployment(client *clientset.Clientset) error {
|
||||
|
||||
fmt.Println("[apiclient] Test deployment succeeded")
|
||||
|
||||
// TODO: In the future, make sure the ReplicaSet and Pod are garbage collected
|
||||
if err := client.ExtensionsV1beta1().Deployments(metav1.NamespaceSystem).Delete("dummy", &metav1.DeleteOptions{}); err != nil {
|
||||
falseVar := false
|
||||
if err := client.ExtensionsV1beta1().Deployments(metav1.NamespaceSystem).Delete("dummy", &metav1.DeleteOptions{
|
||||
OrphanDependents: &falseVar,
|
||||
}); err != nil {
|
||||
fmt.Printf("[apiclient] Failed to delete test deployment [%v] (will ignore)\n", err)
|
||||
}
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user