operator
operator copied to clipboard
Unable to import the crds using cdk8s
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.
Seems to be a known issue for cdk8s project. https://github.com/cdk8s-team/cdk8s/issues/932
Seems to be a known issue for
cdk8sproject. https://github.com/cdk8s-team/cdk8s/issues/932
Thanks a lot for pointing this out. I also raised an issue there as well.