Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/cargo/garde-0.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
clux authored Sep 11, 2023
2 parents c903c45 + 5e3d1cd commit 540d7e3
Show file tree
Hide file tree
Showing 18 changed files with 32 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
if: ${{ github.repository_owner == 'kube-rs' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
override: true
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
# Run these tests against older clusters as well
k8s: [v1.23, latest]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
override: true
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
# comile check e2e tests against mk8sv
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Find MK8SV
id: mk8sv
Expand Down Expand Up @@ -225,7 +225,7 @@ jobs:
matrix:
tls: [openssl, rustls]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/cache@v2
with:
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
clippy_nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: docker build .devcontainer
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
continue-on-error: ${{ matrix.checks == 'advisories' }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check ${{ matrix.checks }}
Expand All @@ -29,7 +29,7 @@ jobs:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/[email protected]
with:
profile: minimal
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
if: ${{ github.repository_owner == 'kube-rs' }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Generate release info
run: ./scripts/release-gh.sh
- name: Release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install nightly toolchain with rustfmt available
uses: actions-rs/toolchain@v1
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ These crates build upon Kubernetes [apimachinery](https://github.com/kubernetes/

## Installation

Select a version of `kube` along with the generated [k8s-openapi](https://github.com/Arnavion/k8s-openapi) types corresponding for your cluster version:
Select a version of `kube` along with the generated [k8s-openapi](https://github.com/Arnavion/k8s-openapi) structs at your chosen [Kubernetes version](https://kube.rs/kubernetes-version/):

```toml
[dependencies]
kube = { version = "0.86.0", features = ["runtime", "derive"] }
k8s-openapi = { version = "0.20.0", features = ["v1_28"] }
k8s-openapi = { version = "0.20.0", features = ["latest"] }
```

[Features are available](https://github.com/kube-rs/kube/blob/main/kube/Cargo.toml#L18).
Expand Down Expand Up @@ -153,7 +153,7 @@ By default [rustls](https://github.com/ctz/rustls) is used for TLS, but `openssl
```toml
[dependencies]
kube = { version = "0.86.0", default-features = false, features = ["client", "openssl-tls"] }
k8s-openapi = { version = "0.20.0", features = ["v1_28"] }
k8s-openapi = { version = "0.20.0", features = ["latest"] }
```

This will pull in `openssl` and `hyper-openssl`. If `default-features` is left enabled, you will pull in two TLS stacks, and the default will remain as `rustls`.
Expand Down
2 changes: 1 addition & 1 deletion e2e/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ name = "boot"
path = "boot.rs"

[features]
latest = ["k8s-openapi/v1_28"]
latest = ["k8s-openapi/latest"]
mk8sv = ["k8s-openapi/v1_23"]
rustls = ["kube/rustls-tls"]
openssl = ["kube/openssl-tls"]
Expand Down
2 changes: 1 addition & 1 deletion examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rustls-tls = ["kube/client", "kube/rustls-tls"]
runtime = ["kube/runtime", "kube/unstable-runtime"]
refresh = ["kube/oauth", "kube/oidc"]
ws = ["kube/ws"]
latest = ["k8s-openapi/v1_28"]
latest = ["k8s-openapi/latest"]

[dev-dependencies]
tokio-util = "0.7.0"
Expand Down
12 changes: 4 additions & 8 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fmt:
rustfmt +nightly --edition 2021 $(find . -type f -iname *.rs)

doc:
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --lib --workspace --features=derive,ws,oauth,oidc,jsonpatch,client,derive,runtime,admission,k8s-openapi/v1_28,unstable-runtime --open
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --lib --workspace --features=derive,ws,oauth,oidc,jsonpatch,client,derive,runtime,admission,k8s-openapi/latest,unstable-runtime --open

deny:
# might require rm Cargo.lock first to match CI
Expand Down Expand Up @@ -114,14 +114,10 @@ bump-msrv msrv:
# Increment the Kubernetes feature version from k8s-openapi for tests; "just bump-k8s"
bump-k8s:
#!/usr/bin/env bash
current=$(cargo tree --format "{f}" -i k8s-openapi | head -n 1)
next=${current::-2}$((${current:3} + 1))
fastmod -m -d . -e toml "$current" "$next"
fastmod -m "$current" "$next" -- README.md
fastmod -m "$current" "$next" -- justfile
latest=$(cargo tree --format "{f}" -i k8s-openapi | head -n 1 | choose -f ',' 1)
# bumping supported version also bumps our mk8sv
mk8svnew=${current::-2}$((${current:3} - 4))
mk8svold=${current::-2}$((${current:3} - 5))
mk8svnew=${latest::-2}$((${latest:3} - 4))
mk8svold=${latest::-2}$((${latest:3} - 5))
fastmod -m -d e2e -e toml "$mk8svold" "$mk8svnew"
fastmod -m -d .github/workflows -e yml "${mk8svold/_/\.}" "${mk8svnew/_/.}"
# bump mk8sv badge
Expand Down
4 changes: 2 additions & 2 deletions kube-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ config = ["__non_core", "pem", "home"]
__non_core = ["tracing", "serde_yaml", "base64"]

[package.metadata.docs.rs]
features = ["client", "rustls-tls", "openssl-tls", "ws", "oauth", "oidc", "jsonpatch", "admission", "k8s-openapi/v1_28"]
features = ["client", "rustls-tls", "openssl-tls", "ws", "oauth", "oidc", "jsonpatch", "admission", "k8s-openapi/latest"]
# Define the configuration attribute `docsrs`. Used to enable `doc_cfg` feature.
rustdoc-args = ["--cfg", "docsrs"]

Expand Down Expand Up @@ -87,4 +87,4 @@ tower-test = "0.4.0"
[dev-dependencies.k8s-openapi]
version = "0.20.0"
default-features = false
features = ["v1_28"]
features = ["latest"]
4 changes: 2 additions & 2 deletions kube-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repository = "https://github.com/kube-rs/kube"
readme = "../README.md"

[package.metadata.docs.rs]
features = ["ws", "admission", "jsonpatch", "k8s-openapi/v1_28"]
features = ["ws", "admission", "jsonpatch", "k8s-openapi/latest"]
rustdoc-args = ["--cfg", "docsrs"]

[features]
Expand Down Expand Up @@ -43,7 +43,7 @@ features = []
[dev-dependencies.k8s-openapi]
version = "0.20.0"
default-features = false
features = ["v1_28"]
features = ["latest"]

[dev-dependencies]
assert-json-diff = "2.0.1"
Expand Down
2 changes: 1 addition & 1 deletion kube-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ proc-macro = true
serde = { version = "1.0.130", features = ["derive"] }
serde_yaml = "0.9.19"
kube = { path = "../kube", version = "<1.0.0, >=0.61.0", features = ["derive", "client"] }
k8s-openapi = { version = "0.20.0", default-features = false, features = ["v1_28"] }
k8s-openapi = { version = "0.20.0", default-features = false, features = ["latest"] }
schemars = { version = "0.8.6", features = ["chrono"] }
chrono = { version = "0.4.19", default-features = false }
trybuild = "1.0.48"
Expand Down
4 changes: 2 additions & 2 deletions kube-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ unstable-runtime-stream-control = []
unstable-runtime-reconcile-on = []

[package.metadata.docs.rs]
features = ["k8s-openapi/v1_28", "unstable-runtime"]
features = ["k8s-openapi/latest", "unstable-runtime"]
# Define the configuration attribute `docsrs`. Used to enable `doc_cfg` feature.
rustdoc-args = ["--cfg", "docsrs"]

Expand Down Expand Up @@ -60,4 +60,4 @@ tracing-subscriber = "0.3.17"
[dev-dependencies.k8s-openapi]
version = "0.20.0"
default-features = false
features = ["v1_28"]
features = ["latest"]
4 changes: 2 additions & 2 deletions kube/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ runtime = ["kube-runtime"]
unstable-runtime = ["kube-runtime/unstable-runtime"]

[package.metadata.docs.rs]
features = ["client", "rustls-tls", "openssl-tls", "derive", "ws", "oauth", "jsonpatch", "admission", "runtime", "k8s-openapi/v1_28", "unstable-runtime"]
features = ["client", "rustls-tls", "openssl-tls", "derive", "ws", "oauth", "jsonpatch", "admission", "runtime", "k8s-openapi/latest", "unstable-runtime"]
# Define the configuration attribute `docsrs`. Used to enable `doc_cfg` feature.
rustdoc-args = ["--cfg", "docsrs"]

Expand Down Expand Up @@ -68,4 +68,4 @@ anyhow = "1.0.71"
[dev-dependencies.k8s-openapi]
version = "0.20.0"
default-features = false
features = ["v1_28"]
features = ["latest"]
4 changes: 2 additions & 2 deletions release.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# 0. (optional) cargo release minor ; verify readme + changelog bumped; then git reset --hard
# 1. PUBLISH_GRACE_SLEEP=20 cargo release minor --execute
# 1X. - on failure: follow plan manually, cd into next dirs and publish insequence with cargo publish --features=k8s-openapi/v1_28
# 1X. - on failure: follow plan manually, cd into next dirs and publish insequence with cargo publish --features=k8s-openapi/latest
# 2. check consolidated commit
# 2X. - on failure: git commit --amend and insert version
# 3. ./scripts/release-post.sh
Expand All @@ -21,4 +21,4 @@ push = false
tag = false
# A Kubernetes version is normally supplied by the application consuming the library in the end.
# Since we don't have that when verifying, supply one ourselves.
enable-features = ["k8s-openapi/v1_28"]
enable-features = ["k8s-openapi/latest"]

0 comments on commit 540d7e3

Please sign in to comment.