Open Vad1mo opened 10 months ago
I was also running into this and figured out it was due to the v
prefix in the tag. Looks like that breaks the URL resolution here a bit. doc.crds.dev will output tags containing the v
prefix (you and I probably copy-pasted it from the site), so it should probably be supported here 😄
Here's some evidence from my end:
~/code/pbcloud-next ↓3
♪ yarn cdk8s import github:projectcontour/contour@v1.25.0
Error: unsupported protocol github:
at download (/Users/pierce/code/pbcloud-next/.yarn/unplugged/cdk8s-cli-npm-2.64.0-cf582c8fb4/node_modules/cdk8s-cli/lib/util.js:177:19)
at ImportCustomResourceDefinition.fromSpec (/Users/pierce/code/pbcloud-next/.yarn/unplugged/cdk8s-cli-npm-2.64.0-cf582c8fb4/node_modules/cdk8s-cli/lib/import/crd.js:108:52)
at matchImporter (/Users/pierce/code/pbcloud-next/.yarn/unplugged/cdk8s-cli-npm-2.64.0-cf582c8fb4/node_modules/cdk8s-cli/lib/import/dispatch.js:35:49)
at async importDispatch (/Users/pierce/code/pbcloud-next/.yarn/unplugged/cdk8s-cli-npm-2.64.0-cf582c8fb4/node_modules/cdk8s-cli/lib/import/dispatch.js:10:26)
at async Object.handler (/Users/pierce/code/pbcloud-next/.yarn/unplugged/cdk8s-cli-npm-2.64.0-cf582c8fb4/node_modules/cdk8s-cli/lib/cli/cmds/import.js:31:9)
~/code/pbcloud-next ↓3 ⚠ ERROR
ø yarn cdk8s import github:projectcontour/contour@1.25.0
Importing resources, this may take a few moments...
projectcontour.io
projectcontour.io/contourconfiguration
projectcontour.io/contourdeployment
projectcontour.io/extensionservice
projectcontour.io/httpproxy
projectcontour.io/tlscertificatedelegation
@pbar1 thank you for your kind response, Indeed this was the issue.
This is the way to go without the v
version prefix.
cdk8s import github:grafana/agent@0.35.4
Hey, I wouldn't necessarily call this closed. Take https://doc.crds.dev/github.com/knative/operator for example - the tag one would want to import would also run into this issue without being able to remove the v
prefix - the import command shakes out to look like:
cdk8s import github:knative/operator@knative-v1.10.2
One can't just remove the knative-v
prefix in this case.
Hmm. The knative-v
tags are definitely unexpected :\
I am trying to import a CRD that is listed on https://doc.crds.dev/github.com/grafana/agent@v0.35.4 into cdk8s.
From the
cdk8s import --help
I got the description thatcdk8s import github:crossplane/crossplane@0.14.0 Imports constructs for a GitHub repo using doc.crds.dev
should work.I tried
cdk8s import github:crossplane/crossplane@0.14.0
and the result was successfulDescription of the bug:
When I however try to import
github:grafana/agent@v0.35.4
I see this error:Reproduction Steps:
Error Log:
Environment:
Other:
This is :bug: Bug Report