Skip to content

Patch op-rs version to use one that fixes SUP-148. #655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@ strum = { version = "0.26", features = ["derive"] }
tokio = { version = "1.40", features = ["full"] }
tracing = "0.1"

[patch."https://github.com/stackabletech/operator-rs.git"]
stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "fix/SUP-148" }

# [patch."https://github.com/stackabletech/operator-rs.git"]
# stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" }
11 changes: 8 additions & 3 deletions rust/operator-binary/src/druid_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ use stackable_druid_crd::{
RUNTIME_PROPS, RW_CONFIG_DIRECTORY, S3_ACCESS_KEY, S3_ENDPOINT_URL, S3_PATH_STYLE_ACCESS,
S3_SECRET_KEY, ZOOKEEPER_CONNECTION_STRING,
};
use stackable_operator::k8s_openapi::api::core::v1::ServiceAccount;
use stackable_operator::kube::ResourceExt;
use stackable_operator::{
builder::{
self,
Expand All @@ -35,7 +37,7 @@ use stackable_operator::{
commons::{
opa::OpaApiVersion,
product_image_selection::ResolvedProductImage,
rbac::{build_rbac_resources, service_account_name},
rbac::build_rbac_resources,
s3::{S3AccessStyle, S3ConnectionSpec, S3Error},
tls_verification::TlsClientDetailsError,
},
Expand Down Expand Up @@ -488,7 +490,8 @@ pub async fn reconcile_druid(
)
.context(BuildRbacResourcesSnafu)?;
cluster_resources
.add(client, rbac_sa)
// We clone rbac_sa because we need to reuse it below
.add(client, rbac_sa.clone())
.await
.context(ApplyServiceAccountSnafu)?;
cluster_resources
Expand Down Expand Up @@ -559,6 +562,7 @@ pub async fn reconcile_druid(
s3_conn.as_ref(),
&druid_tls_security,
&druid_auth_config,
&rbac_sa,
)?;
cluster_resources
.add(client, rg_service)
Expand Down Expand Up @@ -916,6 +920,7 @@ fn build_rolegroup_statefulset(
s3_conn: Option<&S3ConnectionSpec>,
druid_tls_security: &DruidTlsSecurity,
druid_auth_config: &Option<DruidAuthenticationConfig>,
service_account: &ServiceAccount,
) -> Result<StatefulSet> {
// prepare container builder
let prepare_container_name = Container::Prepare.to_string();
Expand Down Expand Up @@ -1119,7 +1124,7 @@ fn build_rolegroup_statefulset(
.add_init_container(cb_prepare.build())
.add_container(cb_druid.build())
.metadata(metadata)
.service_account_name(service_account_name(APP_NAME))
.service_account_name(service_account.name_any())
.security_context(
PodSecurityContextBuilder::new()
.run_as_user(DRUID_UID)
Expand Down
Loading