stackabletech / operator-rs

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

feat: Add ProductImage::product_version function #817

Closed razvan closed 4 weeks ago

razvan commented 4 weeks ago

Description

Needed for https://github.com/stackabletech/hbase-operator/pull/506

Useful for operators that need to support incompatible product versions.

Definition of Done Checklist

# Author
- [x] Changes are OpenShift compatible
- [x] CRD changes approved
- [x] Integration tests passed (for non trivial changes)
# Reviewer
- [ ] Code contains useful comments
- [ ] (Integration-)Test cases added
- [ ] Documentation added or updated
- [ ] Changelog updated
- [ ] Cargo.toml only contains references to git tags (not specific commits or branches)
# Acceptance
- [ ] Feature Tracker has been updated
- [ ] Proper release label has been added
razvan commented 3 weeks ago

I can revert if this is a veto. No problem.

Though I agree that the code comment insinuates this is about saving CPU cycles, it was more about failing fast and having concise code.

sbernauer commented 3 weeks ago

I guess you are right, I forgot about the need of passing image_base_name: &str, operator_version: &str to resolve. So let's keep the API as you have introduced it ;)

I created a PR for a small refactoring, would be awesome if you could have a look! https://github.com/stackabletech/operator-rs/pull/818