@@ -77,7 +77,7 @@ pub struct ResolvedProductImage {
77
77
pub product_version : String ,
78
78
79
79
/// App version formatted for Labels
80
- pub app_version_label : LabelValue ,
80
+ pub app_version_label_value : LabelValue ,
81
81
82
82
/// Image to be used for the product image e.g. `oci.stackable.tech/sdp/superset:1.4.1-stackable2.1.0`
83
83
pub image : String ,
@@ -126,11 +126,11 @@ impl ProductImage {
126
126
let image_tag_or_hash = image. tag . or ( image. hash ) . unwrap_or ( "latest" . to_string ( ) ) ;
127
127
128
128
let app_version = format ! ( "{}-{}" , product_version, image_tag_or_hash) ;
129
- let app_version_label = Self :: prepare_app_version_label ( & app_version) ?;
129
+ let app_version_label_value = Self :: prepare_app_version_label_value ( & app_version) ?;
130
130
131
131
Ok ( ResolvedProductImage {
132
132
product_version,
133
- app_version_label ,
133
+ app_version_label_value ,
134
134
image : image_selection. custom . clone ( ) ,
135
135
image_pull_policy,
136
136
pull_secrets,
@@ -161,10 +161,10 @@ impl ProductImage {
161
161
"{repo}/{image_base_name}:{product_version}-stackable{stackable_version}" ,
162
162
) ;
163
163
let app_version = format ! ( "{product_version}-stackable{stackable_version}" ) ;
164
- let app_version_label = Self :: prepare_app_version_label ( & app_version) ?;
164
+ let app_version_label_value = Self :: prepare_app_version_label_value ( & app_version) ?;
165
165
Ok ( ResolvedProductImage {
166
166
product_version,
167
- app_version_label ,
167
+ app_version_label_value ,
168
168
image,
169
169
image_pull_policy,
170
170
pull_secrets,
@@ -189,7 +189,7 @@ impl ProductImage {
189
189
}
190
190
}
191
191
192
- fn prepare_app_version_label ( app_version : & str ) -> Result < LabelValue , Error > {
192
+ fn prepare_app_version_label_value ( app_version : & str ) -> Result < LabelValue , Error > {
193
193
let mut formatted_app_version = app_version. to_string ( ) ;
194
194
// Labels cannot have more than `LABEL_VALUE_MAX_LEN` characters.
195
195
formatted_app_version. truncate ( LABEL_VALUE_MAX_LEN ) ;
@@ -220,7 +220,7 @@ mod tests {
220
220
"# ,
221
221
ResolvedProductImage {
222
222
image: "oci.stackable.tech/sdp/superset:1.4.1-stackable23.7.42" . to_string( ) ,
223
- app_version_label : "1.4.1-stackable23.7.42" . parse( ) . expect( "static app version label is always valid" ) ,
223
+ app_version_label_value : "1.4.1-stackable23.7.42" . parse( ) . expect( "static app version label is always valid" ) ,
224
224
product_version: "1.4.1" . to_string( ) ,
225
225
image_pull_policy: "Always" . to_string( ) ,
226
226
pull_secrets: None ,
@@ -234,7 +234,7 @@ mod tests {
234
234
"# ,
235
235
ResolvedProductImage {
236
236
image: "oci.stackable.tech/sdp/superset:1.4.1-stackable0.0.0-dev" . to_string( ) ,
237
- app_version_label : "1.4.1-stackable0.0.0-dev" . parse( ) . expect( "static app version label is always valid" ) ,
237
+ app_version_label_value : "1.4.1-stackable0.0.0-dev" . parse( ) . expect( "static app version label is always valid" ) ,
238
238
product_version: "1.4.1" . to_string( ) ,
239
239
image_pull_policy: "Always" . to_string( ) ,
240
240
pull_secrets: None ,
@@ -248,7 +248,7 @@ mod tests {
248
248
"# ,
249
249
ResolvedProductImage {
250
250
image: "oci.stackable.tech/sdp/superset:1.4.1-stackable0.0.0-dev" . to_string( ) ,
251
- app_version_label : "1.4.1-stackable0.0.0-dev" . parse( ) . expect( "static app version label is always valid" ) ,
251
+ app_version_label_value : "1.4.1-stackable0.0.0-dev" . parse( ) . expect( "static app version label is always valid" ) ,
252
252
product_version: "1.4.1" . to_string( ) ,
253
253
image_pull_policy: "Always" . to_string( ) ,
254
254
pull_secrets: None ,
@@ -263,7 +263,7 @@ mod tests {
263
263
"# ,
264
264
ResolvedProductImage {
265
265
image: "oci.stackable.tech/sdp/superset:1.4.1-stackable2.1.0" . to_string( ) ,
266
- app_version_label : "1.4.1-stackable2.1.0" . parse( ) . expect( "static app version label is always valid" ) ,
266
+ app_version_label_value : "1.4.1-stackable2.1.0" . parse( ) . expect( "static app version label is always valid" ) ,
267
267
product_version: "1.4.1" . to_string( ) ,
268
268
image_pull_policy: "Always" . to_string( ) ,
269
269
pull_secrets: None ,
@@ -279,7 +279,7 @@ mod tests {
279
279
"# ,
280
280
ResolvedProductImage {
281
281
image: "my.corp/myteam/stackable/trino:1.4.1-stackable2.1.0" . to_string( ) ,
282
- app_version_label : "1.4.1-stackable2.1.0" . parse( ) . expect( "static app version label is always valid" ) ,
282
+ app_version_label_value : "1.4.1-stackable2.1.0" . parse( ) . expect( "static app version label is always valid" ) ,
283
283
product_version: "1.4.1" . to_string( ) ,
284
284
image_pull_policy: "Always" . to_string( ) ,
285
285
pull_secrets: None ,
@@ -294,7 +294,7 @@ mod tests {
294
294
"# ,
295
295
ResolvedProductImage {
296
296
image: "my.corp/myteam/stackable/superset" . to_string( ) ,
297
- app_version_label : "1.4.1-latest" . parse( ) . expect( "static app version label is always valid" ) ,
297
+ app_version_label_value : "1.4.1-latest" . parse( ) . expect( "static app version label is always valid" ) ,
298
298
product_version: "1.4.1" . to_string( ) ,
299
299
image_pull_policy: "Always" . to_string( ) ,
300
300
pull_secrets: None ,
@@ -309,7 +309,7 @@ mod tests {
309
309
"# ,
310
310
ResolvedProductImage {
311
311
image: "my.corp/myteam/stackable/superset:latest-and-greatest" . to_string( ) ,
312
- app_version_label : "1.4.1-latest-and-greatest" . parse( ) . expect( "static app version label is always valid" ) ,
312
+ app_version_label_value : "1.4.1-latest-and-greatest" . parse( ) . expect( "static app version label is always valid" ) ,
313
313
product_version: "1.4.1" . to_string( ) ,
314
314
image_pull_policy: "Always" . to_string( ) ,
315
315
pull_secrets: None ,
@@ -324,7 +324,7 @@ mod tests {
324
324
"# ,
325
325
ResolvedProductImage {
326
326
image: "127.0.0.1:8080/myteam/stackable/superset" . to_string( ) ,
327
- app_version_label : "1.4.1-latest" . parse( ) . expect( "static app version label is always valid" ) ,
327
+ app_version_label_value : "1.4.1-latest" . parse( ) . expect( "static app version label is always valid" ) ,
328
328
product_version: "1.4.1" . to_string( ) ,
329
329
image_pull_policy: "Always" . to_string( ) ,
330
330
pull_secrets: None ,
@@ -339,7 +339,7 @@ mod tests {
339
339
"# ,
340
340
ResolvedProductImage {
341
341
image: "127.0.0.1:8080/myteam/stackable/superset:latest-and-greatest" . to_string( ) ,
342
- app_version_label : "1.4.1-latest-and-greatest" . parse( ) . expect( "static app version label is always valid" ) ,
342
+ app_version_label_value : "1.4.1-latest-and-greatest" . parse( ) . expect( "static app version label is always valid" ) ,
343
343
product_version: "1.4.1" . to_string( ) ,
344
344
image_pull_policy: "Always" . to_string( ) ,
345
345
pull_secrets: None ,
@@ -354,7 +354,7 @@ mod tests {
354
354
"# ,
355
355
ResolvedProductImage {
356
356
image: "oci.stackable.tech/sdp/superset@sha256:85fa483aa99b9997ce476b86893ad5ed81fb7fd2db602977eb8c42f76efc1098" . to_string( ) ,
357
- app_version_label : "1.4.1-sha256-85fa483aa99b9997ce476b86893ad5ed81fb7fd2db602977eb" . parse( ) . expect( "static app version label is always valid" ) ,
357
+ app_version_label_value : "1.4.1-sha256-85fa483aa99b9997ce476b86893ad5ed81fb7fd2db602977eb" . parse( ) . expect( "static app version label is always valid" ) ,
358
358
product_version: "1.4.1" . to_string( ) ,
359
359
image_pull_policy: "Always" . to_string( ) ,
360
360
pull_secrets: None ,
@@ -370,7 +370,7 @@ mod tests {
370
370
"# ,
371
371
ResolvedProductImage {
372
372
image: "my.corp/myteam/stackable/superset:latest-and-greatest" . to_string( ) ,
373
- app_version_label : "1.4.1-latest-and-greatest" . parse( ) . expect( "static app version label is always valid" ) ,
373
+ app_version_label_value : "1.4.1-latest-and-greatest" . parse( ) . expect( "static app version label is always valid" ) ,
374
374
product_version: "1.4.1" . to_string( ) ,
375
375
image_pull_policy: "Always" . to_string( ) ,
376
376
pull_secrets: None ,
@@ -386,7 +386,7 @@ mod tests {
386
386
"# ,
387
387
ResolvedProductImage {
388
388
image: "my.corp/myteam/stackable/superset:latest-and-greatest" . to_string( ) ,
389
- app_version_label : "1.4.1-latest-and-greatest" . parse( ) . expect( "static app version label is always valid" ) ,
389
+ app_version_label_value : "1.4.1-latest-and-greatest" . parse( ) . expect( "static app version label is always valid" ) ,
390
390
product_version: "1.4.1" . to_string( ) ,
391
391
image_pull_policy: "IfNotPresent" . to_string( ) ,
392
392
pull_secrets: None ,
@@ -402,7 +402,7 @@ mod tests {
402
402
"# ,
403
403
ResolvedProductImage {
404
404
image: "my.corp/myteam/stackable/superset:latest-and-greatest" . to_string( ) ,
405
- app_version_label : "1.4.1-latest-and-greatest" . parse( ) . expect( "static app version label is always valid" ) ,
405
+ app_version_label_value : "1.4.1-latest-and-greatest" . parse( ) . expect( "static app version label is always valid" ) ,
406
406
product_version: "1.4.1" . to_string( ) ,
407
407
image_pull_policy: "Always" . to_string( ) ,
408
408
pull_secrets: None ,
@@ -418,7 +418,7 @@ mod tests {
418
418
"# ,
419
419
ResolvedProductImage {
420
420
image: "my.corp/myteam/stackable/superset:latest-and-greatest" . to_string( ) ,
421
- app_version_label : "1.4.1-latest-and-greatest" . parse( ) . expect( "static app version label is always valid" ) ,
421
+ app_version_label_value : "1.4.1-latest-and-greatest" . parse( ) . expect( "static app version label is always valid" ) ,
422
422
product_version: "1.4.1" . to_string( ) ,
423
423
image_pull_policy: "Never" . to_string( ) ,
424
424
pull_secrets: None ,
@@ -437,7 +437,7 @@ mod tests {
437
437
"# ,
438
438
ResolvedProductImage {
439
439
image: "my.corp/myteam/stackable/superset:latest-and-greatest" . to_string( ) ,
440
- app_version_label : "1.4.1-latest-and-greatest" . parse( ) . expect( "static app version label is always valid" ) ,
440
+ app_version_label_value : "1.4.1-latest-and-greatest" . parse( ) . expect( "static app version label is always valid" ) ,
441
441
product_version: "1.4.1" . to_string( ) ,
442
442
image_pull_policy: "Always" . to_string( ) ,
443
443
pull_secrets: Some ( vec![ LocalObjectReference { name: "myPullSecrets1" . to_string( ) } , LocalObjectReference { name: "myPullSecrets2" . to_string( ) } ] ) ,
0 commit comments