Skip to content

Separate Kubernetes client into a client part and an API part #481

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

Closed
wants to merge 1 commit into from

Conversation

siegfriedweber
Copy link
Member

Description

Changed

  • BREAKING: Kubernetes client separated into a client part and an API part. This follows now the same pattern as in kube-rs and was necessary because kube-rs 0.75.0 constrains the Resource trait by a scope (see Constrain Resource trait and Api::namespaced by Scope kube-rs/kube#956). For instance, client.get::<ConfigMap>(configmap_name, namespace) must be migrated to client.get_namespaced_api::<ConfigMap>(namespace).get(configmap_name).
  • Check added that ClusterResources are in the namespace of the cluster.
  • k8s-openapi 0.15.0 -> 0.16.0
  • kube-rs 0.74.0 -> 0.75.0

Closes #471

Review Checklist

  • Code contains useful comments
  • (Integration-)Test cases added (or not applicable)
  • Documentation added (or not applicable)
  • Changelog updated (or not applicable)
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Once the review is done, comment bors r+ (or bors merge) to merge. Further information

@siegfriedweber siegfriedweber self-assigned this Oct 4, 2022
@siegfriedweber siegfriedweber force-pushed the upgrade_kube-rs branch 2 times, most recently from 1f87e20 to d8b8bfb Compare October 4, 2022 14:20
@siegfriedweber siegfriedweber requested a review from a team October 10, 2022 06:39
@siegfriedweber siegfriedweber marked this pull request as ready for review October 10, 2022 06:39
@nightkr nightkr self-requested a review October 13, 2022 14:26
@nightkr
Copy link
Member

nightkr commented Oct 13, 2022

I don't think we actually need the Api separation, though it requires some type-level hackery to get around. Pushing a PR with an alternate take...

nightkr added a commit that referenced this pull request Oct 13, 2022
This is an alternate take on #481/#471 that does not introduce a new
operator-framework-level `Api` type. Instead, it introduces a new `GetApi`
trait that lets `Client::get_api` specialize as needed.
bors bot pushed a commit that referenced this pull request Oct 17, 2022
## Description

This is an alternate take on #481/#471 that does not introduce a new operator-framework-level `Api` type. Instead, it introduces a new `GetApi` trait that lets `Client::get_api` specialize as needed.



Co-authored-by: Teo Klestrup Röijezon <[email protected]>
@siegfriedweber
Copy link
Member Author

Closed in favor of #490

@siegfriedweber siegfriedweber deleted the upgrade_kube-rs branch October 17, 2022 13:42
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.

Upgrade to kube-rs 0.75.0
2 participants