javascript icon indicating copy to clipboard operation
javascript copied to clipboard

Can not apply crd after upgraded to `0.17.1`

Open zzjin opened this issue 2 years ago • 1 comments

Describe the bug After upgrade to sdk version to 1.17.1, cannot apply crd using apply example apply-example.ts

Client Version 0.17.1

Server Version n/a

To Reproduce Download example file and try to apply come custom crd.

Expected behavior Work like usual.

** Example Code** Same as apple example file.

Environment (please complete the following information): n/a

Additional context Error output:

./apply-example.ts:32:47
Type error: Argument of type 'KubernetesObject' is not assignable to parameter of type 'KubernetesObjectHeader<KubernetesObject>'.
  Type 'KubernetesObject' is not assignable to type '{ metadata: { name: string; namespace: string; }; }'.
    Types of property 'metadata' are incompatible.
      Type 'V1ObjectMeta | undefined' is not assignable to type '{ name: string; namespace: string; }'.
        Type 'undefined' is not assignable to type '{ name: string; namespace: string; }'.

zzjin avatar Sep 13 '22 19:09 zzjin

Thanks for reporting, I will take a look at this.

brendandburns avatar Sep 14 '22 18:09 brendandburns

came accross this issue when upgrading from x.15 to x.17.1 any resolve on this?

ontehfritz avatar Nov 23 '22 18:11 ontehfritz

it is on the client.read(spec) line I do something very similar and get the exact same message

ontehfritz avatar Nov 23 '22 18:11 ontehfritz

same problem here!

naimetti avatar Dec 30 '22 19:12 naimetti

The signature has changed I was able to get it working by not providing the whole spec but by providing the metadata, kind, and api version: client.read({ metadata: { name: spec.metadata.name, namespace: spec.metadata.namespace }, kind: spec.kind, apiVersion: spec.apiVersion });

ontehfritz avatar Dec 30 '22 19:12 ontehfritz

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Mar 30 '23 19:03 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Apr 29 '23 20:04 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar May 29 '23 20:05 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar May 29 '23 20:05 k8s-ci-robot