Kubernetes-client: PropagationPolicy is ignored

Created on 20 Apr 2020  路  8Comments  路  Source: fabric8io/kubernetes-client

Hi,

when setting a propagation policy for the delete operation this is ignored

client.resource(item).withPropagationPolicy("Foreground").delete()

Generated request:

--> DELETE https://127.0.0.1:32774/apis/sources.knative.dev/v1alpha1/namespaces/site/githubsources/github-source
Content-Type: application/json; charset=utf-8
Content-Length: 67

{"apiVersion":"v1","kind":"DeleteOptions","orphanDependents":false}
--> END DELETE (67-byte body)

PS: propagation policy not being propagated. Nice 馃お!

bug

Most helpful comment

Have it working locally. I麓ll open a PR

All 8 comments

Umm, Need to check. Does it work with you use item with DSL? For example, client.pods().inNamespace("foo").withName("some").withPropagationPolicy("Foreground").delete()

I can see propagation policy being appended in code, but need to check whether control comes here when using generic resource API:
https://github.com/fabric8io/kubernetes-client/blob/16bd97fb010fad230ab7851d8e2b9286a739f38a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/OperationSupport.java#L220-L227

Yeah, it then calls resource-specific handler which is a generated class

Have it working locally. I麓ll open a PR

馃槒 applying this to the entire project is no fun, especially knative. IMO it makes more sense to first apply https://github.com/fabric8io/kubernetes-client/pull/2134 to knative as well and then continue with this

2178 should be able to fix this issue

2178 is merged. I think we can close this

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fabian-K picture Fabian-K  路  12Comments

chenchun picture chenchun  路  28Comments

umutcann picture umutcann  路  17Comments

WywTed picture WywTed  路  22Comments

uce picture uce  路  15Comments