@@ -28,6 +28,7 @@ use stackable_operator::{
2828 volume:: { ListenerOperatorVolumeSourceBuilder , ListenerReference } ,
2929 } ,
3030 } ,
31+ cli:: OperatorEnvironmentOptions ,
3132 cluster_resources:: { ClusterResourceApplyStrategy , ClusterResources } ,
3233 commons:: {
3334 product_image_selection:: { self , ResolvedProductImage } ,
@@ -80,7 +81,7 @@ use crate::{
8081 command:: create_init_container_command_args,
8182 config:: jvm:: { construct_non_heap_jvm_args, construct_zk_server_heap_env} ,
8283 crd:: {
83- DOCKER_IMAGE_BASE_NAME , JMX_METRICS_PORT_NAME , JVM_SECURITY_PROPERTIES_FILE ,
84+ CONTAINER_IMAGE_BASE_NAME , JMX_METRICS_PORT_NAME , JVM_SECURITY_PROPERTIES_FILE ,
8485 MAX_PREPARE_LOG_FILE_SIZE , MAX_ZK_LOG_FILES_SIZE , METRICS_PROVIDER_HTTP_PORT_NAME ,
8586 STACKABLE_CONFIG_DIR , STACKABLE_DATA_DIR , STACKABLE_LOG_CONFIG_DIR , STACKABLE_LOG_DIR ,
8687 STACKABLE_RW_CONFIG_DIR , ZOOKEEPER_ELECTION_PORT , ZOOKEEPER_ELECTION_PORT_NAME ,
@@ -108,6 +109,7 @@ pub const LISTENER_VOLUME_DIR: &str = "/stackable/listener";
108109pub struct Ctx {
109110 pub client : stackable_operator:: client:: Client ,
110111 pub product_config : ProductConfigManager ,
112+ pub operator_environment : OperatorEnvironmentOptions ,
111113}
112114
113115type Result < T , E = Error > = std:: result:: Result < T , E > ;
@@ -365,7 +367,11 @@ pub async fn reconcile_zk(
365367 let resolved_product_image = zk
366368 . spec
367369 . image
368- . resolve ( DOCKER_IMAGE_BASE_NAME , crate :: built_info:: PKG_VERSION )
370+ . resolve (
371+ CONTAINER_IMAGE_BASE_NAME ,
372+ & ctx. operator_environment . image_repository ,
373+ crate :: built_info:: PKG_VERSION ,
374+ )
369375 . context ( ResolveProductImageSnafu ) ?;
370376
371377 let mut cluster_resources = ClusterResources :: new (
@@ -1149,7 +1155,7 @@ mod tests {
11491155 let resolved_product_image = zookeeper
11501156 . spec
11511157 . image
1152- . resolve ( DOCKER_IMAGE_BASE_NAME , "0.0.0-dev" )
1158+ . resolve ( CONTAINER_IMAGE_BASE_NAME , "oci.example.org" , "0.0.0-dev" )
11531159 . expect ( "test resolved product image is always valid" ) ;
11541160
11551161 let validated_config = validate_all_roles_and_groups_config (
0 commit comments