Support all Kubernetes versions 1.20 through 1.30 #107
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed that when trying to use certain Kubernetes endpoints with this library (such as DELETE of a
Service
), the response would fail to parse.Looking into it, I found it's because
kubernetes-client-core
is currently generated against K8S release 1.20, which is rather old at this point. The K8S API is pretty stable, but not stable enough that such an old version will work flawlessly against a newer cluster (mine is 1.27).So, I decided to generate
kubernetes-client-core
for all versions from 1.20 through 1.30. These are now stored in the folders./kubernetes-1.xx
. I think it would be nice to publish all of these to Hackage using their version numbers, but for now it's easy to use in astack.yaml
like this:I also:
generate_all.sh
and it will generate all the versions, using Nix to obtain a pinned version of thegen
repo. This step formerly needed to be done by hand. Adding a new K8S version in the future should be a 1-line change.swagger.json
andopenapi.yaml
to.gitignore
, as these are only needed at generation time and not to use the library.I think the results are good. You can now easily choose the version of the K8S API you want to target. And a git clone is still plenty fast, with each autogenerated folder only contributing around 6MB uncompressed.
CC @jonschoning @akshaymankar @guoshimin