Closed Meallia closed 2 days ago
Thanks for reporting this issue.
You are right, it's caused by #303. I'll fix it soon.
As a work-around you can remove this line: _content_type="application/apply-patch+yaml"
, new logic should use the strategic-merge patch in this case and it should work properly too.
The workaround I'm using is to convert the dict to a json byte string and going directly in the bytes
case that does not enforce any content type checking.
the strategic merge and apply patches don't exactly the same way, in particular, apply patches allow to only use the PATCH method even if the object is not present on the cluster.
I added a MR with a test and a quick fix for that (basically reverting part of the changes from #303 )
Thanks for your contribution!
You're welcome. Thanks for maintaining this repo.
On Thu, Jun 27, 2024, 9:17 AM Tomasz Prus @.***> wrote:
Thanks for your contribution!
— Reply to this email directly, view it on GitHub https://github.com/tomplus/kubernetes_asyncio/issues/316#issuecomment-2193969152, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYOKRG2MYMNNBR4MS7VTHTZJO4CDAVCNFSM6AAAAABJ5Z4L6WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJTHE3DSMJVGI . You are receiving this because you authored the thread.Message ID: @.***>
Hi
The following code:
Now fails with
The issue seems related to changes in #303, especially https://github.com/tomplus/kubernetes_asyncio/pull/303/files#diff-481a59905e58931309ea5b06ec23b1a38bf6618415a0378a03585a407f7b16f1L145