Skip to content

Commit fc96e05

Browse files
committed
use constants directly when resolving image
1 parent 9ab5f01 commit fc96e05

2 files changed

Lines changed: 12 additions & 9 deletions

File tree

rust/operator-binary/src/airflow_controller.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,7 @@ pub async fn reconcile_airflow(
364364

365365
let validated = crate::controller::validate::validate_cluster(
366366
airflow,
367-
CONTAINER_IMAGE_BASE_NAME,
368367
&ctx.operator_environment.image_repository,
369-
crate::built_info::PKG_VERSION,
370368
dereferenced,
371369
)
372370
.context(ValidateSnafu)?;

rust/operator-binary/src/controller/validate.rs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ use stackable_operator::{
88
use strum::IntoEnumIterator;
99

1010
use super::dereference::DereferencedObjects;
11-
use crate::crd::{
12-
AirflowConfig, AirflowExecutor, AirflowRole, MergedOverrides,
13-
authentication::AirflowClientAuthenticationDetailsResolved,
14-
authorization::AirflowAuthorizationResolved, v1alpha2,
11+
use crate::{
12+
airflow_controller::CONTAINER_IMAGE_BASE_NAME,
13+
crd::{
14+
AirflowConfig, AirflowExecutor, AirflowRole, MergedOverrides,
15+
authentication::AirflowClientAuthenticationDetailsResolved,
16+
authorization::AirflowAuthorizationResolved, v1alpha2,
17+
},
1518
};
1619

1720
#[derive(Snafu, Debug)]
@@ -55,15 +58,17 @@ pub struct ValidatedAirflowCluster {
5558

5659
pub fn validate_cluster(
5760
airflow: &v1alpha2::AirflowCluster,
58-
image_base_name: &str,
5961
image_repository: &str,
60-
pkg_version: &str,
6162
dereferenced: DereferencedObjects,
6263
) -> Result<ValidatedAirflowCluster, Error> {
6364
let resolved_product_image = airflow
6465
.spec
6566
.image
66-
.resolve(image_base_name, image_repository, pkg_version)
67+
.resolve(
68+
CONTAINER_IMAGE_BASE_NAME,
69+
image_repository,
70+
crate::built_info::PKG_VERSION,
71+
)
6772
.context(ResolveProductImageSnafu)?;
6873

6974
let mut role_groups = BTreeMap::new();

0 commit comments

Comments
 (0)