stackabletech / operator-rs

A simple wrapper/framework around kube-rs to make implementing Operators/Controllers easier
Apache License 2.0
116 stars 12 forks source link

feat: Add `stackable-versioned` and `k8s-version` crates for CRD versioning #764

Closed Techassi closed 4 months ago

Techassi commented 5 months ago

Part of https://github.com/stackabletech/issues/issues/507 (refinement)

# Tasks
- [x] Add container shape and name validation
- [x] Add common generation code for module and struct generation
- [x] Add support for versions
- [x] Add support to deprecate versions
- [x] Add support for field/variant addition
- [x] Add support for field/variant renaming
- [x] Add support for field/variant deprecation
# Reviewer
- [x] Code contains useful comments
- [x] (Integration-)Test cases added
- [x] Changelog updated
- [x] Cargo.toml only contains references to git tags (not specific commits or branches)
fhennig commented 5 months ago

I see that this is still a draft, but I already want to encourage the use of more comments in the code, especially more module-level comments like "This module is used for .. and called by ..." to make it easier to grasp the overall setup of the crate for someone that isn't familiar with it.

Techassi commented 5 months ago

I usually wait till the last second to add (doc) comments to my code. I do this, because there is a high chance that code will change until the PR is merge-able and thus I want to avoid rewriting the comments over and over again.

So don't worry, there will be plenty of comments when this gets merged :)

Techassi commented 4 months ago

This PR now implements the basic code to generate a very basic versioned field. There are a bunch of improvements we need in there, but I would like to merge the PR as is, and then introduce missing features / improvements in follow-up PRs, as this PR is already quite big.

Some items we need to tackle are:

I'll add a few more comments before moving this PR into "Ready for Review".