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

add plural to Resource and GroupVersionKind #481

Merged
merged 7 commits into from
Mar 29, 2021
Merged

add plural to Resource and GroupVersionKind #481

merged 7 commits into from
Mar 29, 2021

Conversation

clux
Copy link
Member

@clux clux commented Mar 28, 2021

replaces #468.
closes #467

This changes kube-derive to no longer implement k8s_openapi traits.
We now instead implement kube::Resource instead so we can control the plural.

Because the trait now picks up on an override when it is generating the path_url, it is now correct in the Api urls.

@clux clux mentioned this pull request Mar 28, 2021
replaces #468.
closes #467

This changes kube-derive to no longer implement `k8s_openapi` traits.
We now instead implement `kube::Resource` instead so we can control the
plural.

Because the trait now picks up on an override when it is generating the
path_url, it is now correct in the Api urls.
@clux clux force-pushed the plural-resource branch from c8101f7 to 695db0a Compare March 28, 2021 22:10
@clux clux force-pushed the plural-resource branch from 31f2e90 to 0ee0b8d Compare March 28, 2021 23:13
@clux
Copy link
Member Author

clux commented Mar 28, 2021

One slightly awkward thing about this is that it sets up a cycle:

  • kube: depends on kube-derive so it can re-export it
  • kube-derive: depends on kube for kube::Resource

Not sure this is problematic or not. We avoided it before because the trait came from k8s_openapi, but now we would have to have a kube-traits or something. I don't think this causes any problems though?

EDIT: It does seem to be a problem. Will have to look into it later in the week as unless someone has suggestions.
EDIT2: Fixed it. Needed only to have dev-dependency from kube-derive back into kube plus make sure symbols existed in one stray test.

@clux clux merged commit 0cadf85 into master Mar 29, 2021
@clux clux deleted the plural-resource branch March 29, 2021 21:20
@clux
Copy link
Member Author

clux commented Mar 31, 2021

Released in 0.52.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not guess resource endpoints
3 participants