java icon indicating copy to clipboard operation
java copied to clipboard

Create CRD model fail

Open LinzeSu opened this issue 2 years ago • 10 comments

Describe the bug Followed steps here: https://github.com/kubernetes-client/java/blob/master/docs/generate-model-from-third-party-resources.md. Have run both using Github Action and locally and failed with the same message (except for the directory part as they run in different place):

cp: can't stat '/home/runner/work/java/java/crd-gen/gen/src/main/java/com/hirain/adminapp/crd/models': No such file or directory

To Reproduce Run workflow with https://raw.githubusercontent.com/GoogleCloudPlatform/spark-on-k8s-operator/master/charts/spark-operator-chart/crds/sparkoperator.k8s.io_sparkapplications.yaml. And this error occurs.

Additional context I've been looking through similar issues and solutions but sadly none of them works. Including setting .spec.preserveUnknownFields to false(https://github.com/kubernetes-client/java/issues/1254) and change the .spec.group to another name(https://github.com/kubernetes-client/java/issues/1496).

LinzeSu avatar Feb 22 '23 07:02 LinzeSu

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 May 23 '23 07:05 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 Jun 22 '23 08:06 k8s-triage-robot

Same problem with me. i'm generate crd model for gateway api https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/main/config/crd/standard/gateway.networking.k8s.io_gatewayclasses.yaml

Just change the url of https://gist.githubusercontent.com/yue9944882/266fee8e95c2f15a93778263633e72ed/raw/be12c13379eeed13d2532cb65da61fffb19ee3e7/crontab-crd.yaml to gatewayapi crd url of https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/main/config/crd/standard/gateway.networking.k8s.io_gatewayclasses.yaml

And it's not working.

liangyuanpeng avatar Jul 08 '23 08:07 liangyuanpeng

/remove-lifecycle rotten

liangyuanpeng avatar Jul 10 '23 01:07 liangyuanpeng

Also not working with github action: https://github.com/liangyuanpeng/kubernetes-client-java/actions/runs/5504497489/jobs/10030762778

crd url: https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/main/config/crd/standard/gateway.networking.k8s.io_gatewayclasses.yaml package: gateway.networking.k8s.io

error log:

...
[INFO] writing file /output_dir/.openapi-generator/VERSION
[INFO] writing file /output_dir/.openapi-generator/FILES
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.094 s
[INFO] Finished at: 2023-07-10T05:42:47Z
[INFO] ------------------------------------------------------------------------
---Done.
---Done.
cp: can't stat '/home/runner/work/kubernetes-client-java/kubernetes-client-java/crd-gen/gen/src/main/java/gateway/networking/k8s/io/models': No such file or directory

liangyuanpeng avatar Jul 10 '23 03:07 liangyuanpeng

I'm building image of myself with https://github.com/kubernetes-client/java/blob/master/client-java-contrib/publish-gen-image.sh , and the image seems like is not working.

Got the broken image. Run with:

** v1.0.6 ** Change to ** test **

docker run   --rm   -v /var/run/docker.sock:/var/run/docker.sock   -v "$(pwd)":"$(pwd)"   -ti   --network host   ghcr.io/kubernetes-client/java/crd-model-gen:test   /generate.sh   -u https://gist.githubusercontent.com/yue9944882/266fee8e95c2f15a93778263633e72ed/raw/be12c13379eeed13d2532cb65da61fffb19ee3e7/crontab-crd.yaml   -n com.example.stable   -p com.example.stable   -o "$(pwd)"
Successfully tagged kubernetes-java-client-gen-with-openapi-generator:v1
--- Running generator inside container...
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "mvn-entrypoint.sh": executable file not found in $PATH: unknown.
ERRO[0000] error waiting for container: context canceled 

Any doc for build generate crd model gen image? Remind me if i misses something,Thanks.

cc @yue9944882 @brendanburns

liangyuanpeng avatar Jul 10 '23 06:07 liangyuanpeng

same here, an error occurred when I wanna generate models for https://github.com/kubevela/kubevela/blob/master/charts/vela-core/crds/core.oam.dev_applications.yaml

log: https://gist.github.com/KaitaoQiu/c0b642ff6389730643fda2b344730093

KaitaoQiu avatar Sep 14 '23 22:09 KaitaoQiu

I have fixed my problem, I need to use the reverse order for group name

KaitaoQiu avatar Sep 15 '23 01:09 KaitaoQiu

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 Jan 28 '24 11:01 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 Feb 27 '24 12:02 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 Mar 28 '24 13:03 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 Mar 28 '24 13:03 k8s-ci-robot