File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
crates/stackable-operator Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file.
1313 - [ kube #1494 ] ( https://github.com/kube-rs/kube/pull/1494 )
1414 - [ kube #1504 ] ( https://github.com/kube-rs/kube/pull/1504 )
1515- Upgrade opentelemetry crates ([ #811 ] ).
16+ - Added ` ProductImage.product_version() ` utility function ([ #817 ] )
1617
1718### Fixed
1819
@@ -21,6 +22,7 @@ All notable changes to this project will be documented in this file.
2122[ #804 ] : https://github.com/stackabletech/operator-rs/pull/804
2223[ #811 ] : https://github.com/stackabletech/operator-rs/pull/811
2324[ #812 ] : https://github.com/stackabletech/operator-rs/pull/812
25+ [ #817 ] : https://github.com/stackabletech/operator-rs/pull/817
2426
2527## [ 0.69.3] - 2024-06-12
2628
Original file line number Diff line number Diff line change @@ -161,6 +161,20 @@ impl ProductImage {
161161 }
162162 }
163163 }
164+
165+ /// The product version is always known without having to resolve the image.
166+ pub fn product_version ( & self ) -> & str {
167+ match & self . image_selection {
168+ ProductImageSelection :: Custom ( ProductImageCustom {
169+ product_version : pv,
170+ ..
171+ } ) => pv,
172+ ProductImageSelection :: StackableVersion ( ProductImageStackableVersion {
173+ product_version : pv,
174+ ..
175+ } ) => pv,
176+ }
177+ }
164178}
165179
166180#[ cfg( test) ]
You can’t perform that action at this time.
0 commit comments