custom resources: metadata.resourceVersion: Invalid value: 0x0: must be specified for an update

See original GitHub issue

I’m trying to use an “unstructured” client using custom resource as workaround and I have something like this:

CustomResourceDefinitionContext ctx = ... ;
Map<String, Object> unstructured = ...;

return kubernetesClient
    .customResource(ctx)
    .inNamespace(namespace)
    .createOrReplace(unstructured);

Sometimes, I get an exception like:

Message: kamelets.camel.apache.org "aws-sqs-source-v1alpha1" is invalid: metadata.resourceVersion:
 Invalid value: 0x0: must be specified for an update. Received status: Status(apiVersion=v1, code=422,
 details=StatusDetails(causes=[StatusCause(field=metadata.resourceVersion, message=Invalid value: 0x0:
 must be specified for an update, reason=FieldValueInvalid, additionalProperties={})], 
group=camel.apache.org, kind=kamelets, name=aws-sqs-source-v1alpha1, retryAfterSeconds=null, uid=null, 
additionalProperties={}), kind=Status, message=kamelets.camel.apache.org "aws-sqs-source-v1alpha1" is 
invalid: metadata.resourceVersion: Invalid value: 0x0: must be specified for an update, 
metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, 
additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={})

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
matthyxcommented, Apr 27, 2021

Thanks @rohanKanojia I will check once we merge the other PR…

0reactions
matthyxcommented, Apr 29, 2021

/assign

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid value: 0x0: must be specified for an update · Issue #3657
Describe the bug Argo application SyncFailed with: applications.argoproj.io "argocd" is invalid: metadata.resourceVersion: Invalid value: ...
Read more >
How to fix metadata.resourceVersion: Invalid value: "": must be ...
How to fix metadata.resourceVersion: Invalid value: 0x0: must be specified for an update is an error that may appear when using kubectl ...
Read more >
“kubectl apply -f” fail with “The xxxx is invalid: metadata ...
resourceVersion : Invalid value: 0x0: must be specified for an update". Issue. When running "kubectl apply" against a Resource in Kubernetes, ...
Read more >
custom resources: metadata.resourceVersion: Invalid value: 0x0
resourceVersion : Invalid value: 0x0: must be specified for an update. ... I'm trying to use an "unstructured" client using custom resource ......
Read more >
Learning about OpenKruise for Application Deployment
Understanding OpenKruise Kubernetes Resource Update Mechanisms ... resourceVersion: Invalid value: 0x0: must be specified for an update.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found