collect kube versions into a single file

This commit is contained in:
Bryton Hall 2022-08-13 21:39:56 -04:00
parent f251d55857
commit 7fb2bf9578
10 changed files with 25023 additions and 16805 deletions

View file

@ -9,7 +9,7 @@ This project uses [flakes](https://nixos.wiki/wiki/Flakes) so a development envi
nix develop
where you will find a [devshell](https://numtide.github.io/devshell) prompt (which supports [direnv](https://direnv.net/) so a one-time `direnv allow` at the base of the repo should automate the dev shell process).
> **NOTE**: there's also support for [direnv](https://direnv.net/) to automate the dev shell process
## Commits
@ -23,15 +23,11 @@ Do try to format the repo with [treefmt](https://github.com/numtide/treefmt) bef
To support a new Kubernetes version:
- Edit [`./jobs/generators/default.nix`](./jobs/generators/default.nix) and add a block for the version under `k8s`; for example:
- Edit [`./versions.nix`](./versions.nix) and add a new attribute for the version; for example:
```nix
{
name = "v1.23.nix";
path = generateK8S "v1.23" (builtins.fetchurl {
url = "https://github.com/kubernetes/kubernetes/raw/v1.23.0/api/openapi-spec/swagger.json";
sha256 = "0jivg8nlxka1y7gzqpcxkmbvhcbxynyrxmjn0blky30q5064wx2a";
});
"1.23.0" = "sha256:0jivg8nlxka1y7gzqpcxkmbvhcbxynyrxmjn0blky30q5064wx2a";
}
```
@ -40,9 +36,6 @@ To support a new Kubernetes version:
nix build '.#jobs.x86_64-linux.generators.k8s'
cp ./result/* modules/generated/
- Add the version in [`./modules/k8s.nix`](./modules/k8s.nix) under `options.kubernetes.version.type`
- Add a new check in [`./flake.nix`](./flake.nix) (e.g., `tests-k8s-1_23`)
## Tests
Tests are executed through GitHub actions; see the [workflow definition](../kubenix/.github/workflows/ci.yml) for commands.