fabric8io / kubernetes-client

Java client for Kubernetes & OpenShift

Home Page:http://fabric8.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error "Not generating nothing for unrecognized resource" generating JAVA classes from CRD

fmachi opened this issue · comments

Describe the bug

I am trying to generate some java pojo from an existing CRD but it fails with the following message:

Not generating nothing for unrecognized resource

when running the java generator on the attached CRD file (renamed to txt to upload it)

cdr_definition.txt

Fabric8 Kubernetes Client version

6.12.1

Steps to reproduce

I downloaded the generator sh for version 6.12.1 as recommended here

and I run:

./java-generator-cli-6.12.1.sh -s /Users/flippo.machi/Downloads/generation/src -t /Users/flippo.machi/Downloads/generation/target

in the src directory there is the crd file I will attach

Expected behavior

classes are generated in the target folder

Runtime

Kubernetes (vanilla)

Kubernetes API Server version

1.25.3@latest

Environment

macOS

Fabric8 Kubernetes Client Logs

No response

Additional context

No response

The attached CRD definition is not a valid yaml representation of the resource.
Likely, it has been exported without passing the -o yaml flag to kubectl and the result is just text for human consumption.

Thanks @andreaTP , I will doublecheck with the colleague that provided the definition and let you know

It worked, thanks!