Skip to content

Commit d79e227

Browse files
committed
Patch op-rs version to use one that fixes SUP-148.
1 parent 1efd22c commit d79e227

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
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
@@ -41,6 +41,9 @@ tracing = "0.1"
4141
url = "2.5"
4242
uuid = "1.10"
4343

44+
[patch."https://github.com/stackabletech/operator-rs.git"]
45+
stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "fix/SUP-148" }
46+
4447
# [patch."https://github.com/stackabletech/operator-rs.git"]
4548
# stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" }
4649
# stackable-operator = { path = "../operator-rs/crates/stackable-operator" }

rust/operator-binary/src/controller.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ use stackable_operator::{
3838
apps::v1::{DaemonSet, DaemonSetSpec},
3939
core::v1::{
4040
ConfigMap, EmptyDirVolumeSource, EnvVar, HTTPGetAction, Probe, SecretVolumeSource,
41-
Service, ServicePort, ServiceSpec,
41+
Service, ServiceAccount, ServicePort, ServiceSpec,
4242
},
4343
},
4444
apimachinery::pkg::{apis::meta::v1::LabelSelector, util::intstr::IntOrString},
@@ -457,7 +457,7 @@ pub async fn reconcile_opa(
457457
build_rbac_resources(opa, APP_NAME, required_labels).context(BuildRbacResourcesSnafu)?;
458458

459459
let rbac_sa = cluster_resources
460-
.add(client, rbac_sa)
460+
.add(client, rbac_sa.clone())
461461
.await
462462
.context(ApplyServiceAccountSnafu)?;
463463
cluster_resources
@@ -495,7 +495,7 @@ pub async fn reconcile_opa(
495495
&merged_config,
496496
&ctx.opa_bundle_builder_image,
497497
&ctx.user_info_fetcher_image,
498-
&rbac_sa.name_any(),
498+
&rbac_sa,
499499
)?;
500500

501501
cluster_resources
@@ -740,7 +740,7 @@ fn build_server_rolegroup_daemonset(
740740
merged_config: &OpaConfig,
741741
opa_bundle_builder_image: &str,
742742
user_info_fetcher_image: &str,
743-
sa_name: &str,
743+
service_account: &ServiceAccount,
744744
) -> Result<DaemonSet> {
745745
let role = opa.role(opa_role);
746746
let role_group = opa
@@ -932,7 +932,7 @@ fn build_server_rolegroup_daemonset(
932932
.build(),
933933
)
934934
.context(AddVolumeSnafu)?
935-
.service_account_name(sa_name)
935+
.service_account_name(service_account.name_any())
936936
.security_context(
937937
PodSecurityContextBuilder::new()
938938
.run_as_user(1000)

0 commit comments

Comments
 (0)