Skip to content
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

Doesn't support CRD which has a special value for kind, plural, singular and etc #458

Closed
iming0319 opened this issue Mar 11, 2021 · 4 comments · Fixed by #463
Closed

Doesn't support CRD which has a special value for kind, plural, singular and etc #458

iming0319 opened this issue Mar 11, 2021 · 4 comments · Fixed by #463
Assignees
Labels
derive kube-derive proc_macro related docs unclear documentation good first issue Good for newcomers help wanted Not immediately prioritised, please help!

Comments

@iming0319
Copy link

The CRD usage goes wrong when the spec.name.kind is not a single word.
For example, a part of NetworkAttachmentDefinition spec is
==== START ===
spec:
conversion:
strategy: None
group: k8s.cni.cncf.io
names:
kind: NetworkAttachmentDefinition
listKind: NetworkAttachmentDefinitionList
plural: network-attachment-definitions
shortNames:
- net-attach-def
singular: network-attachment-definition
==== OVER ===
You can see the plural is not low-case "NetworkAttachmentDefinition".
Please provide a solution for this case.
Thanks a lot.

@clux
Copy link
Member

clux commented Mar 11, 2021

Looks like this attr is not documented at the moment, but you can use #[kube(plural = "network-attachment-definitions")].

@clux clux added docs unclear documentation question Direction unclear; possibly a bug, possibly could be improved. labels Mar 11, 2021
@clux
Copy link
Member

clux commented Mar 14, 2021

Oh, wait you need a non-standard singular as well. Yeah, we need a flag for:

#[kube(singular = "network-attachment-definition")]

@clux clux added derive kube-derive proc_macro related good first issue Good for newcomers help wanted Not immediately prioritised, please help! and removed question Direction unclear; possibly a bug, possibly could be improved. labels Mar 14, 2021
@clux
Copy link
Member

clux commented Mar 14, 2021

Someone else feel free to tackle this, I am busy on other things for at least this week.

@clux
Copy link
Member

clux commented Mar 31, 2021

Properly fixed in 0.52.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
derive kube-derive proc_macro related docs unclear documentation good first issue Good for newcomers help wanted Not immediately prioritised, please help!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants