Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to import the crds using cdk8s #804

Closed
nilroy opened this issue Nov 6, 2023 · 3 comments
Closed

Unable to import the crds using cdk8s #804

nilroy opened this issue Nov 6, 2023 · 3 comments

Comments

@nilroy
Copy link

nilroy commented Nov 6, 2023

Hi,

I am trying to import the crds in my cdk8s project using cdk8s import command

cdk8s import crd.yaml

Reference: cdk8s import

But its failing with below error

operator.victoriametrics.com
  operator.victoriametrics.com/vmsingle
NOTE: Temp directory retained due to an error: /tmp/temp-F9LVQF
Error: jsii compilation failed with non-zero exit code: 1
  | [2023-11-06T16:24:03.363] [ERROR] jsii/compiler - Compilation errors prevented the JSII assembly from being created
  | warning JSII6: A "peerDependency" on "constructs" at "10.3.0" means you should take a "devDependency" on "constructs" at "10.3.0" (found "undefined")
  | warning JSII6: A "peerDependency" on "cdk8s" at "2.67.6" means you should take a "devDependency" on "cdk8s" at "2.67.6" (found "undefined")
  | warning JSII3: There is no "README.md" file. It is required in order to generate valid PyPI (Python) packages.
  | com.victoriametrics.operator.ts:2218:12 - error TS2300: Duplicate identifier 'sourceLabels'.
  | 2218   readonly sourceLabels?: string[];
  |                 ~~~~~~~~~~~~
  | com.victoriametrics.operator.ts:2225:12 - error TS2300: Duplicate identifier 'sourceLabels'.
  | 2225   readonly sourceLabels?: string[];
  |                 ~~~~~~~~~~~~
  | com.victoriametrics.operator.ts:2232:12 - error TS2300: Duplicate identifier 'targetLabel'.
  | 2232   readonly targetLabel?: string;
  |                 ~~~~~~~~~~~
  | com.victoriametrics.operator.ts:2239:12 - error TS2300: Duplicate identifier 'targetLabel'.
  | 2239   readonly targetLabel?: string;
  |                 ~~~~~~~~~~~
  | com.victoriametrics.operator.ts:2338:12 - error TS2300: Duplicate identifier 'sourceLabels'.
  | 2338   readonly sourceLabels?: string[];
  |                 ~~~~~~~~~~~~
  | com.victoriametrics.operator.ts:2345:12 - error TS2300: Duplicate identifier 'sourceLabels'.
  | 2345   readonly sourceLabels?: string[];
  |                 ~~~~~~~~~~~~
  | com.victoriametrics.operator.ts:2352:12 - error TS2300: Duplicate identifier 'targetLabel'.
  | 2352   readonly targetLabel?: string;
  |                 ~~~~~~~~~~~
  | com.victoriametrics.operator.ts:2359:12 - error TS2300: Duplicate identifier 'targetLabel'.
  | 2359   readonly targetLabel?: string;
  |                 ~~~~~~~~~~~
  +----------------------------------------------------------------------------------
  | Command: /usr/lib/node_modules/cdk8s-cli/node_modules/jsii-srcmak/node_modules/jsii/bin/jsii --silence-warnings reserved-word
  | Workdir: /tmp/temp-F9LVQF
  +----------------------------------------------------------------------------------
    at newError (/usr/lib/node_modules/cdk8s-cli/node_modules/jsii-srcmak/lib/util.js:62:20)
    at ChildProcess.<anonymous> (/usr/lib/node_modules/cdk8s-cli/node_modules/jsii-srcmak/lib/util.js:79:29)
    at Object.onceWrapper (node:events:629:26)
    at ChildProcess.emit (node:events:514:28)
    at ChildProcess._handle.onexit (node:internal/child_process:291:12)

On careful inspection I found custom resources in the crd.yaml has something to do with the sourceLabes and targetLabel.

I came across this issue and I saw there has been some changes done with those in there. And I can confirm the crds before that release works just fine.

I could download the crds from tag v0.6.1 and those get imported perfectly in cdk8s.

@f41gh7
Copy link
Collaborator

f41gh7 commented Nov 6, 2023

Seems to be a known issue for cdk8s project. cdk8s-team/cdk8s-cli#2722

@nilroy
Copy link
Author

nilroy commented Nov 6, 2023

Seems to be a known issue for cdk8s project. cdk8s-team/cdk8s-cli#2722

Thanks a lot for pointing this out. I also raised an issue there as well.

@nilroy nilroy changed the title Unable to import he crds using cdk8s Unable to import the crds using cdk8s Feb 20, 2024
@nilroy
Copy link
Author

nilroy commented Oct 19, 2024

Looks like this has been solved by cdk8s here.

But it does not work with v0.39.1. I tried importing v0.48.4 which worked.

cdk8s import https://github.com/VictoriaMetrics/operator/releases/download/v0.48.4/crd.yaml --language python

@nilroy nilroy closed this as completed Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants