Skip to content

Commit b3086e2

Browse files
committed
add a warning about schemars 1
see kube-rs/kube#1774 Signed-off-by: clux <[email protected]>
1 parent 53fef08 commit b3086e2

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

docs/upgrading.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# Upgrading
22

3-
You can upgrade `kube` and it's sibling crate `k8s-openapi` using normal Rust methods to upgrade.
3+
You can upgrade `kube` using normal Rust methods to upgrade, as long as you stick to semver compatible versions of `k8s-openapi` and `schemars` (if using custom resource derive).
44

5-
!!! warning "`kube` and `k8s-openapi` are siblings"
5+
!!! warning "Peer dependencies"
66

7-
`kube` depends on `k8s-openapi`, but users need to select the Kubernetes version on `k8s-openapi`. Whenever `k8s-openapi` releases a new version, `kube` releases a new version shortly after.
7+
`kube` depends on a handful of unstable crates at certain versions, but new versions of these crates have not always propagated into kube.
8+
To avoid build issues, `k8s-openapi` and `schemars` must NOT exist at multiple semver incompatible versions in your dependency tree.
89

9-
We recommend you bump both `kube` and `k8s-openapi` crates at the same time to avoid build issues.
10+
We recommend you bump `kube`, `k8s-openapi` and `schemars` crates at the same time to avoid build issues.
1011

1112
Consider bumping the [[kubernetes-version]] feature pin on `k8s-openapi` unless you are using its `latest` feature.
1213

@@ -15,12 +16,16 @@ Consider bumping the [[kubernetes-version]] feature pin on `k8s-openapi` unless
1516
Using `cargo upgrade` via [cargo-edit]:
1617

1718
```sh
18-
cargo upgrade -p kube -p k8s-openapi -i
19+
cargo upgrade -p kube -p k8s-openapi -p schemars -i
1920
```
2021

22+
!!! warning "Schemars 1"
23+
24+
The major version of schemars 1 is expected to be released in the next Kubernetes version (1.34) in kube 2.0. Until then, if you need schemars 1, [pinning to git](https://github.com/kube-rs/kube/issues/1774#issuecomment-3072681555) is an option. Schemars 1 will not work with kube 1.
25+
2126
## Dependabot
2227

23-
[Configure](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file) the `cargo` ecosystem on dependabot and [group](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups) `kube` and `k8s-openapi` upgrades together:
28+
[Configure](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file) the `cargo` ecosystem on dependabot and [group](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups) codependent crates:
2429

2530
```yaml
2631
- package-ecosystem: "cargo"
@@ -32,6 +37,7 @@ cargo upgrade -p kube -p k8s-openapi -i
3237
patterns:
3338
- kube
3439
- k8s-openapi
40+
- schemars
3541
```
3642
3743
## Renovate
@@ -44,6 +50,7 @@ packageRules: [
4450
matchPackagePrefixes: [
4551
"kube",
4652
"k8s",
53+
"schemars",
4754
],
4855
groupName: "kubernetes crates",
4956
matchManagers: [

0 commit comments

Comments
 (0)