Skip to content

Commit d60da59

Browse files
committed
refactor: use v2 container builder
1 parent 5901236 commit d60da59

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

rust/operator-binary/src/controller/build/resource/statefulset.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use stackable_operator::{
88
builder::{
99
self,
1010
meta::ObjectMetaBuilder,
11-
pod::{PodBuilder, container::ContainerBuilder, security::PodSecurityContextBuilder},
11+
pod::{PodBuilder, security::PodSecurityContextBuilder},
1212
},
1313
constants::RESTART_CONTROLLER_ENABLED_LABEL,
1414
k8s_openapi::{
@@ -25,7 +25,7 @@ use stackable_operator::{
2525
kube::ResourceExt,
2626
product_logging,
2727
v2::{
28-
builder::pod::container::{EnvVarName, EnvVarSet},
28+
builder::pod::container::{EnvVarName, EnvVarSet, new_container_builder},
2929
product_logging::framework::{ValidatedContainerLogConfigChoice, vector_container},
3030
types::{
3131
kubernetes::{ContainerName, VolumeName},
@@ -46,6 +46,7 @@ use crate::{
4646
crd::{CONFIG_DIR_NAME, HbaseRole, LISTENER_VOLUME_DIR, LISTENER_VOLUME_NAME},
4747
};
4848

49+
stackable_operator::constant!(HBASE_CONTAINER_NAME: ContainerName = "hbase");
4950
stackable_operator::constant!(VECTOR_CONTAINER_NAME: ContainerName = "vector");
5051

5152
// Pod volume names. The Vector container reuses the `hbase-config` (rolegroup ConfigMap, which
@@ -172,7 +173,7 @@ pub fn build_rolegroup_statefulset(
172173
);
173174

174175
let role_name = hbase_role.cli_role_name();
175-
let mut hbase_container = ContainerBuilder::new("hbase").expect("ContainerBuilder not created");
176+
let mut hbase_container = new_container_builder(&HBASE_CONTAINER_NAME);
176177

177178
hbase_container
178179
.image_from_product_image(resolved_product_image)

0 commit comments

Comments
 (0)