java
java copied to clipboard
Generating CRD action, no such file or directory error
Describe the bug I am trying to generate Java classes from the CRD below, it keeps giving "no such file or directory error". I am giving package name as the reversed order of group name in the crd as mentioned in the documentation.
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.0
creationTimestamp: "2022-10-03T20:18:24Z"
generation: 1
name: virtualclusters.tenancy.x-k8s.io
resourceVersion: "2436"
uid: 927f3779-fe5a-44e7-8188-94dd6f34d5dc
spec:
conversion:
strategy: None
group: tenancy.x-k8s.io
names:
kind: VirtualCluster
listKind: VirtualClusterList
plural: virtualclusters
shortNames:
- vc
singular: virtualcluster
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- jsonPath: .status.phase
name: Phase
type: string
- jsonPath: .spec.clusterVersionName
name: ClusterVersion
type: string
- jsonPath: .status.clusterNamespace
name: ClusterNamespace
priority: 1
type: string
name: v1alpha1
schema:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
clusterDomain:
type: string
clusterVersionName:
type: string
opaqueMetaPrefixes:
items:
type: string
type: array
pkiExpireDays:
format: int64
type: integer
serviceCidr:
type: string
transparentMetaPrefixes:
items:
type: string
type: array
required:
- clusterVersionName
type: object
status:
properties:
clusterNamespace:
type: string
conditions:
items:
properties:
lastTransitionTime:
format: date-time
type: string
message:
type: string
reason:
type: string
status:
type: string
required:
- status
type: object
type: array
message:
type: string
phase:
type: string
reason:
type: string
required:
- phase
type: object
type: object
served: true
storage: true
status:
acceptedNames:
kind: VirtualCluster
listKind: VirtualClusterList
plural: virtualclusters
shortNames:
- vc
singular: virtualcluster
conditions:
- lastTransitionTime: "2022-10-03T20:18:24Z"
message: no conflicts found
reason: NoConflicts
status: "True"
type: NamesAccepted
- lastTransitionTime: "2022-10-03T20:18:24Z"
message: the initial names have been accepted
reason: InitialNamesAccepted
status: "True"
type: Established
storedVersions:
- v1alpha1
Here is the error logs. From the erroneous action.
Client Version
15.0.1
Kubernetes Version
1.24.3
Java Version Java 8
To Reproduce Go to actions tab on your cloned repository. Run an action with the CRD I have specified above.
Expected behavior Expecting to get generated Java classes from the CRD.
Additional context I was able to generate some classes from different CRDs, from different CRD files. So I am not sure If there is an error with this CRD template.
Thanks in advance.