-
An error occurs when v1 24 is upgraded to v1 26 [target.'cfg(unix)'.dependencies]
k8s-openapi = { version = "0.20.0", default-features = false ,features = ["v1_26"] }
kube-derive = { version = "0.87.1" }
kube = { version = "0.87.1", features = ["admission","derive","client","openssl-tls","runtime","ws"]} Compiling k8s-openapi v0.20.0
error: failed to run custom build command for `k8s-openapi v0.20.0`
Caused by:
process didn't exit successfully: `/Users/vincent/Documents/source/devops-v5/v-kubernetes-action/target/debug/build/k8s-openapi-f7c1c2517a0e4305/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=K8S_OPENAPI_ENABLED_VERSION
--- stderr
thread 'main' panicked at /Users/vincent/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/k8s-openapi-0.20.0/build.rs:45:13:
Both v1_24 and v1_26 features are enabled on the k8s-openapi crate. These feature indicates which version of Kubernetes the k8s-openapi crate should support. Only one feature can be enabled at the same time.
If you have enabled both of these features yourself, either via the k8s-openapi dependency in your Cargo.toml or via setting the `K8S_OPENAPI_ENABLED_VERSION` env var, please remove one of them. If you are writing a library crate, do not enable any features at all. Library crates *must not* enable any features on the k8s-openapi crate.
If you have not enabled one or both of these features yourself, then one of the library crates in your dependency graph *has*. Locate which library crates in your dependency graph depend on k8s-openapi and enable one or more of its features, and file a bug against them, citing this text. You can search your Cargo.lock for "k8s-openapi" to discover these crates.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish. |
Beta Was this translation helpful? Give feedback.
Answered by
clux
Nov 15, 2023
Replies: 1 comment
-
you want to only bring in remove this line: -kube-derive = { version = "0.87.1" } you already are using the derive feature on kube (you can import the macro with kube::CustomResource) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
vCassius
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you want to only bring in
kube
dependencies (and its openapi feature) onceremove this line:
-kube-derive = { version = "0.87.1" }
you already are using the derive feature on kube (you can import the macro with kube::CustomResource)