CustomResource update fails with "the body of the request was in an unknown format" error
See original GitHub issueHello!
- Vote on this issue by adding a 👍 reaction
- To contribute a fix for this issue, leave a comment (and link to your pull request, if you’ve opened one already)
Issue details
When running pulumi up
for the second time, CustomResource fails to update with the error:
error: 1 error occurred:
* the Kubernetes API server reported that "sidetrek-webapp-staging-cd3aydbs/frontend-svc" failed to fully initialize or become live: the body of the request was in an unknown format - accepted media types include: application/json-patch+json, application/merge-patch+json, application/apply-patch+yaml
Currently using @pulumi/pulumi ^3.10.1 and @pulumi/kubernetes ^3.6.0
Steps to reproduce
Run pulumi up
with a CustomResource for Knative service (runs fine the first time the resource is created but fails for every subsequent pulumi up
):
const KService = new k8s.apiextensions.CustomResource('api-svc', {
apiVersion: 'serving.knative.dev/v1',
kind: 'Service',
metadata: {
namespace,
name,
},
spec: {
template: {
spec: {
containers: [
{
image
}
],
}
},
},
}, { provider: k8sProvider })
Expected: Expected the CustomResource to be updated without error
Actual: Works fine on first pulumi up
but fails on update (i.e. every subsequent pulumi up
)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:11 (5 by maintainers)
Top Results From Across the Web
CustomResource update fails with "the body of the request ...
Vote on this issue by adding a reaction To contribute a fix for ... with "the body of the request was in an...
Read more >Error while applying JSON Patch to Kubernetes Custom ...
I'm fairly certain that my request body is a valid JSON patch, and I've previously already successfully updated core (non-CRD) API resources ...
Read more >kubectl patch the body of the request was in an unknown ...
Get error Failed to patch object when using the k8s command for a resource that already exists. ISSUE TYPE. Bug Report. COMPONENT NAME....
Read more >1619869 – oc patch on custom resource returns error
Bug 1619869 - oc patch on custom resource returns error ... the body of the request was in an unknown format - accepted...
Read more >Custom resource response objects - AWS CloudFormation
The status value sent by the custom resource provider in response to an AWS CloudFormation-generated request. Must be either SUCCESS or FAILED ....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Awesome! 🎉
I can confirm that Knative revisions are now getting created properly on code update:
Thanks for the quick turnaround on this!
It’s out now! https://github.com/pulumi/pulumi-kubernetes/releases/tag/v3.8.3