You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
1.0.0-rc3 Error "None of the given media types are supported" #1398
Describe the bug
When any patch functions are called, such as patchNamespacedStatefulSet, the client throws "None of the given media types are supported"
** Client Version **
e.g. 1.0.0-rc3
** Server Version **
e.g. 1.25.1
To Reproduce
Steps to reproduce the behavior:
make a call to patchNamespacedStatefulSet with any parameters
Expected behavior
The patch functions should work. And in addition to be working, I'm also not sure how the API will figure out which mediaType to prefer given the content of the body. The old api allows overriding the headers via the options, now this is no longer available.
** Example Code**
let kubeConfig = new k8s.KubeConfig();
kubeConfig.loadFromDefault();
const k8sAppsApi = kubeConfig.makeApiClient(k8s.AppsV1Api);
// how to make sure this is done with header
// 'Content-Type': 'application/merge-patch+json'??
await k8sAppsApi.patchNamespacedStatefulSet({
name: 'test',
namespace: 'default',
body: {
spec: {
replicas: replicas,
},
}
})
Environment (please complete the following information):
OS: [Ubuntu 22.04]
NodeJS Version [18]
Cloud runtime [NA]
Additional context
Is there a general status the testing coverage of the 1.0.0 branch?
Given the release candidate tag, I had higher expectation of the quality of the code, but it seems quite hard to move forward with all these bugs.
Activity
mstruebing commentedon Nov 9, 2023
I think this is connected to #1341 and should be supported if we merge this and cut another RC.
ci: add release workflow for 1.x
ci: add release workflow for 1.x
ci: add release workflow for 1.x
chore: move node options into npm script
chore: switch to c8 instead of nyc
mstruebing commentedon Dec 23, 2023
@tugtugtug I've published a new release
1.0.0-rc4: https://www.npmjs.com/package/@kubernetes/client-node/v/1.0.0-rc4Could you confirm that this issue is solved in this release?
tugtugtug commentedon Jan 2, 2024
Verified fixed!
tugtugtug commentedon Jan 4, 2024
Hi @mstruebing,
I thought things were working as no errors were reported. But apparently the example that changes the content-type does not work.
e.g.
the passed
_optionsis not used in the case, instead the object'sthis.configuration.middlewareis used.One workaround found, that should be future compatible.
Let me know if you prefer a new issue tho.
tugtugtug commentedon Jan 4, 2024
made a new issue #1499