Skip to content

Commit ce2d1b8

Browse files
committed
Patch op-rs version to use one that fixes SUP-148.
1 parent 6d23872 commit ce2d1b8

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@ strum = { version = "0.26", features = ["derive"] }
2727
tokio = { version = "1.40", features = ["full"] }
2828
tracing = "0.1"
2929

30+
[patch."https://github.com/stackabletech/operator-rs.git"]
31+
stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "fix/SUP-148" }
32+
3033
#[patch."https://github.com/stackabletech/operator-rs.git"]
3134
#stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" }

rust/operator-binary/src/hbase_controller.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ use stackable_operator::{
2424
},
2525
},
2626
cluster_resources::{ClusterResourceApplyStrategy, ClusterResources},
27-
commons::{
28-
product_image_selection::ResolvedProductImage,
29-
rbac::{build_rbac_resources, service_account_name},
30-
},
27+
commons::{product_image_selection::ResolvedProductImage, rbac::build_rbac_resources},
3128
k8s_openapi::{
3229
api::{
3330
apps::v1::{StatefulSet, StatefulSetSpec},
3431
core::v1::{
35-
ConfigMap, ConfigMapVolumeSource, ContainerPort, Probe, Service, ServicePort,
36-
ServiceSpec, TCPSocketAction, Volume,
32+
ConfigMap, ConfigMapVolumeSource, ContainerPort, Probe, Service, ServiceAccount,
33+
ServicePort, ServiceSpec, TCPSocketAction, Volume,
3734
},
3835
},
3936
apimachinery::pkg::{apis::meta::v1::LabelSelector, util::intstr::IntOrString},
4037
DeepMerge,
4138
},
42-
kube::core::{error_boundary, DeserializeGuard},
43-
kube::{runtime::controller::Action, Resource},
39+
kube::{
40+
core::{error_boundary, DeserializeGuard},
41+
runtime::controller::Action,
42+
Resource, ResourceExt,
43+
},
4444
kvp::{Label, LabelError, Labels, ObjectLabels},
4545
logging::controller::ReconcilerError,
4646
memory::{BinaryMultiple, MemoryQuantity},
@@ -407,7 +407,7 @@ pub async fn reconcile_hbase(
407407
)
408408
.context(BuildRbacResourcesSnafu)?;
409409
cluster_resources
410-
.add(client, rbac_sa)
410+
.add(client, rbac_sa.clone())
411411
.await
412412
.context(ApplyServiceAccountSnafu)?;
413413
cluster_resources
@@ -452,6 +452,7 @@ pub async fn reconcile_hbase(
452452
rolegroup_config,
453453
&merged_config,
454454
&resolved_product_image,
455+
&rbac_sa,
455456
)?;
456457
cluster_resources
457458
.add(client, rg_service)
@@ -778,6 +779,7 @@ fn build_rolegroup_statefulset(
778779
rolegroup_config: &HashMap<PropertyNameKind, BTreeMap<String, String>>,
779780
config: &HbaseConfig,
780781
resolved_product_image: &ResolvedProductImage,
782+
service_account: &ServiceAccount,
781783
) -> Result<StatefulSet> {
782784
let hbase_version = &resolved_product_image.app_version_label;
783785

@@ -943,7 +945,7 @@ fn build_rolegroup_statefulset(
943945
)),
944946
)
945947
.context(AddVolumeSnafu)?
946-
.service_account_name(service_account_name(APP_NAME))
948+
.service_account_name(service_account.name_any())
947949
.security_context(
948950
PodSecurityContextBuilder::new()
949951
.run_as_user(HBASE_UID)

0 commit comments

Comments
 (0)