Kuber.jl icon indicating copy to clipboard operation
Kuber.jl copied to clipboard

Setting `PropagationPolicy`

Open YoungFaithful opened this issue 3 years ago • 1 comments

We face the issue that deleting a Job does not delete the containing Pods.

We'd like to set the propagationPolicy to "Background". It seems that propagationPolicy is implemented in the ApiImpl, but I was not able to find a solution to set this Parameter by applying it to the ctx.client or so. What would be a possible way to do so?

YoungFaithful avatar Apr 08 '22 08:04 YoungFaithful

Facing the same issue. A solution to this would be great!!

maxstb avatar Jun 10 '22 07:06 maxstb

The delete! APIs take additional keyword args that can be passed to the API. So something like this should work:

julia> delete!(ctx, job; propagationPolicy="Background")
{
  "kind": "Status",
  "metadata": {},
  "apiVersion": "v1",
  "status": "Success",
  "details": {
    "kind": "jobs",
    "group": "batch",
    "name": "testjob",
    "uid": "50dcebb3-111c-4cf6-95c2-346b3d4e8ae3"
  }
}

tanmaykm avatar Dec 19 '22 04:12 tanmaykm