Skip to content

Crate should not default select kubernetes versions and kube featuresΒ #2

@clux

Description

@clux

Currently Cargo.toml sets default features enabling many kube features and also k8s-openapi features:

https://github.com/kube-rs/gateway-api-rs/blob/main/Cargo.toml#L13-L20

We should try to minimize these as much as possible to:

  1. avoid making dependency problems worse for users if we lag behind updates
  2. avoid making the k8s-openapi version feature selection any more confusing than it is

For 2. we shoul definitely not set the k8s-openapi version feature by default, because then if users pick another version, they will get the compile error about multiple version features.

For 1. you could limit almost all kube features to be dev-dependencies so that we can test them, but avoid forcing them on users by default.

You do probably need to actually depend on kube with the derive feature enabled though. The don't see a smart way around that, except possibly generating the code with --hide-kube, but then users need to newtype the main structs and do the #[derive(CustomResource)] themselves on these (which possibly changes the schemas because it's wrapped, and makes it harder to test things here).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions