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
Generate Api and Model classes from CRD results in missing IoK8sApimachineryPkgApisMetaV1DeleteOptionsV2 when run against kind 1.20 #1710
Comments
Any idea what might be causing this or any workaround to apply? |
Seems that using Still the issue is Why with 1.20 k8s version it's not working. Is it possible to be some issue with def remove_model_prefixes(spec, crd_mode=False): and then conflict between DeleteOptions_V2 (which is available on 1.20 kind) and v1.DeleteOptions? |
The Swagger definitions for the APIs are downloaded from the Kubernetes API server. I suspect that the API object definitions changed between 1.19 and 1.20 |
@asavov it seems that you're doing the code-generation in a deprecated approach. i'd suggest trying the latest doc according to https://github.com/kubernetes-client/java/blob/master/docs/generate-model-from-third-party-resources.md |
Yes. with 1.20 it does not work. While with 1.19 and 1.18 it do work. |
I tried with
and it worked. And this is cause it uses internally
Still when run with 1.20 it fails. I will change issue Name/Title. |
Any feedback on this? |
Existing cluster generation should be used |
This image can't run. The parameters should be wrong. Do you have any details? |
hi @asavov i wasnt able to reproduce this after bumping the built-in kind version to 0.10.0 which provisions 1.20 k8s cluster internally. can you elaborate ur case why u need a newer k8s cluster to do the code-gen. i can publish a new one w/ the kind binary bumped if that works for u. |
@yue9944882 Excuse my delayed response. Was on vacation. On a brand new and fresh Mac (configured with latest bins)
those 2 are still missing/invalid
Working on a project using latest kind and kindest/node:v1.20.2, and needing k8s-models auto-generation. How about to set up zoom? Let me know if I can provide more details. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
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. |
I'm running in to this very issue, on macOS, Docker Desktop:
The only reference I could google is to this issue, so I'm really stumped. This is with the master version of gen. |
This issue also occurs when using github action "CRD Java Model Generate" |
Describe the bug
Using
java-crd-cmd.sh
script to generate Models and Apis from single CRD results in:InfraAlexComV1Api
.using
IoK8sApimachineryPkgApisMetaV1ObjectMetaV2
(which is missing) instead ofio.kubernetes.client.openapi.models.V1ObjectMeta
not
implements KubernetesObject
by root CR (V1CloudAccount) object.Here's the generate script:
The full log from generation is : gen-models-output.txt
Client Version
12.0
Kubernetes Version
kind k8s from image: kindest/node:v1.20.2@sha256:8f7ea6e7642c0da54f04a7ee10431549c0257315b3a634f6ef2fecaaedb19bab
^^^ That's the problematic part.
Java Version
java -version
openjdk version "11.0.7" 2020-04-14 LTS
OpenJDK Runtime Environment Zulu11.39+16-SA (build 11.0.7+10-LTS)
OpenJDK 64-Bit Server VM Zulu11.39+16-SA (build 11.0.7+10-LTS, mixed mode)
To Reproduce
This script is executed prior above
generate
script.Server (please complete the following information):
Additional context
This SAME script used to work. And the Api code generated referred:
Seems that some recent change has introduced/replaced
V1DeleteOptions
andV1Status
withThe text was updated successfully, but these errors were encountered: