Skip to content

Commit 25f4e2b

Browse files
chore: Version CRD (#661)
* chore: migrate crd crate to operator-binary module * chore: add stackable-versioned dependency * chore: separate impls from crd data structures This makes way for the versioned module we will soon introduce * chore: version the crd At this point, errors will appear in any crates using the crd. It has only been done separately to illustrate the ease in versioning a CRD without all of the other necessary changes. * chore: version any other structures defined outside of the main crd This is helpful for later crd version sharing substructures that might not change. For example: v1alpha2::OpaCluster might still use user_info_fetcher::v1alpha1::Config, or perhaps it uses user_info_fetcher::v1beta1::Config. Similarly, shared structures from stackable-operators can then be versioned in the same way. * chore: update references in the crates The versioned module is imported rather than the individual structs and enums (when there is no conflict, eg: if also importing a versioned shared struct) so that that usages show the version explicitly. There might be times where this isn't possible, for example, once structs and enums are versioned in stackable-operator, there could be multiple modules with the same name. In this case, user-info-fetcher is also versioned with v1alpha1, so it is referred to as user_info_fetcher::v1alpha1 in crd/mod.rs so as to not conflict with the crds v1alpha1. * chore: add attribution Co-authored-by: Techassi <git@techassi.dev> * docs: Update references to include the version --------- Co-authored-by: Techassi <git@techassi.dev>
1 parent 1cf815c commit 25f4e2b

File tree

20 files changed

+2366
-1044
lines changed

20 files changed

+2366
-1044
lines changed

Cargo.lock

Lines changed: 392 additions & 139 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.nix

Lines changed: 1330 additions & 286 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ serde = { version = "1.0", features = ["derive"] }
3434
serde_json = "1.0"
3535
snafu = "0.8"
3636
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.85.0" }
37+
stackable-versioned = { git = "https://github.com/stackabletech/operator-rs.git", features = ["k8s"], tag = "stackable-versioned-0.5.0" }
3738
strum = { version = "0.26", features = ["derive"] }
3839
tar = "0.4"
3940
tokio = { version = "1.40", features = ["full"] }

crate-hashes.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/crd/Cargo.toml

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)