Hi,
I was deleting a resource using this
operation().inNamespace(namespace).withName(name).cascading(cascading).withGracePeriod(gracePeriod).delete();
Since cascading has been deprecated in 4.10.2 (currently using) I updated the code to
operation().inNamespace(namespace).withName(name).withPropagationPolicy(cascading ? DeletionPropagation.FOREGROUND : DeletionPropagation.ORPHAN).delete();
But I cannot set withGracePeriod(long) anymore.
I can do
operation().inNamespace(namespace).withName(name).withGracePeriod(gracePeriod).delete();
but there the propagation policy is not set.
How can I set both of these properties?
Thanks
It seems this made it into 4.10.3 however I am still not able to do
KubernetesClient kc = new DefaultKubernetesClient();
kc.apps().statefulSets().inNamespace("ns").withName("name").withGracePeriod(42L).withPropagationPolicy(DeletionPropagation.FOREGROUND).delete();
I think it's available like this:
client.apps().deployments().inNamespace("rokumar").withName("nginx").withPropagationPolicy(DeletionPropagation.FOREGROUND).withGracePeriod(0L).delete();
Aha! Thanks
Most helpful comment
I think it's available like this: