The repository supports the latest patch versions of each of the separate 1.x releases.
# Create all node images
KIND_IMAGES="$(realpath ~/kind-images)"
mkdir -p "$KIND_IMAGES"
./test.sh all create-node-image "$KIND_IMAGES"
# Create all clusters
./test.sh all create-cluster "$KIND_IMAGES"
# Run all tests in record mode
K8S_RECORD=1 ./test.sh all run-tests
# Delete all clusters
./test.sh all delete-cluster
# Run all tests in replay mode
./test.sh all run-tests
(Eg: The repository supports v1.50.5 and you want to add support for v1.50.6)
-
/k8s-openapi-codegen/src/supported_version.rs
: Update thespec_url
for the correspondingSupportedVersion
. -
/k8s-openapi-codegen/src/supported_version.rs
: Add fixups for the new variant as necessary. -
/k8s-openapi-codegen/
: Usecargo run
to regenerate the bindings. Inspect the diff. This combined with the changelog may indicate new fixups that could be backported to older versions. -
/test.sh
: UpdateK8S_VERSIONS
andKIND_VERSIONS
map entries for the new version. -
/
: Use./test.sh '...' create-node-image '...'; ./test.sh '...' create-cluster '...'; K8S_RECORD=1 ./test.sh '...' run-tests
to create a cluster and run the tests against it in record mode. -
/
: Use./test.sh '...' delete-cluster; ./test.sh '...' run-tests
to delete the cluster and run the tests in replay mode.
(Eg: The repository supports v1.50.x and you want to add support for v1.51.0)
-
/k8s-openapi-codegen/src/supported_version.rs
: Add a new variant to theSupportedVersion
enum. Use the appropriatemod_root
andspec_url
. -
/k8s-openapi-codegen/src/supported_version.rs
: Add the new variant to theALL
list. -
/k8s-openapi-codegen/src/supported_version.rs
: Add fixups for the new variant as necessary. -
/k8s-openapi-codegen/
: Usecargo run
to generate the bindings for the new version.diff
the mod root of the previous version and the new one to see precisely what changed between the two versions. This is useful to discover new fixups that could be backported to older versions. -
Search for
_[a-z]s:
to find new special idents that need to be handled inget_rust_ident
. If found, handle them, and add tests infn special_idents
-
/Cargo.toml
: Add a new feature for the new version. -
/Cargo.toml
: Updatelatest
feature to the new feature. -
/build.rs
: Update the value ofMAX
-
/src/lib.rs
: Add a new doc header attribute for the new version. -
/src/lib.rs
: Add a newmod
for the new version. -
/k8s-openapi-tests/Cargo.toml
: Add a new feature for the new version. It should enable the corresponding feature of thek8s-openapi
crate. -
/k8s-openapi-tests/build.rs
: Update the value ofMAX
-
/k8s-openapi-tests/src/lib.rs
: Add a newreplays_directory
inClient::new
-
/k8s-openapi-tests-macro-deps/Cargo.toml
: Add a new feature for the new version. It should enable the corresponding feature of thek8s-openapi
crate. -
/test.sh
: AddK8S_VERSIONS
andKIND_VERSIONS
map enties for the new version. -
/
: Create a cluster and run the tests against it in record mode../test.sh '...' create-node-image /path/of/node/images/directory ./test.sh '...' create-cluster /path/of/node/images/directory K8S_RECORD=1 ./test.sh '...' run-tests
-
/k8s-openapi-tests/
: Delete the cluster and run the tests in replay mode../test.sh '...' delete-cluster ./test.sh '...' run-tests
-
/devenv.sh
: Updatemax_version
.
-
/Cargo.toml
: Updatepackage.version
value -
/Cargo.toml
: Updatepackage.documentation
value -
/Cargo.toml
: Updatepackage.links
value -
/k8s-openapi-codegen-common/Cargo.toml
: Updatepackage.version
value -
/k8s-openapi-codegen-common/Cargo.toml
: Updatepackage.documentation
value -
/k8s-openapi-derive/Cargo.toml
: Updatepackage.version
value -
/k8s-openapi-derive/Cargo.toml
: Updatepackage.documentation
value -
/k8s-openapi-derive/Cargo.toml
: Update version req ofk8s-openapi-codegen-common
dependency -
Generate docs (change directory name as appropriate).
rm -rf ./target/doc/ && cargo rustdoc --features 'latest' -- -A 'rustdoc::bare_urls' -Z unstable-options --enable-index-page && CARGO_TARGET_DIR="$(realpath ./target)" cargo rustdoc --manifest-path ./k8s-openapi-codegen-common/Cargo.toml -- -Z unstable-options --enable-index-page && CARGO_TARGET_DIR="$(realpath ./target)" cargo rustdoc --manifest-path ./k8s-openapi-derive/Cargo.toml -- -Z unstable-options --enable-index-page && rm -rf ../k8s-openapi-gh-pages/v0.23.x && cp -R ./target/doc ../k8s-openapi-gh-pages/v0.23.x
-
../k8s-openapi-gh-pages/index.html
: Add new anchor if this is a new major release
Keep these in mind when dropping support for older versions:
-
az account list-locations --query '[].name' --output tsv | while read -r location; do (</dev/null az aks get-versions --location "$location" --query 'values[].patchVersions.keys(@)[]' --output tsv 2>/dev/null) & : done | sort --version-sort | head -1