Skip to content

Commit b622d81

Browse files
Patch op-rs version to use one that fixes SUP-148. (#793)
* Patch op-rs version to use one that fixes SUP-148. * fix cargo * Upgrade stackable-operator to version 0.82.0 * Update changelog --------- Co-authored-by: Siegfried Weber <mail@siegfriedweber.net>
1 parent fb903c5 commit b622d81

File tree

6 files changed

+24
-20
lines changed

6 files changed

+24
-20
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ All notable changes to this project will be documented in this file.
2929
certificates used by Kafka. This allows you to access Kafka brokers secured using TLS via the global bootstrap
3030
service ([#741]).
3131
- An invalid `KafkaCluster` doesn't cause the operator to stop functioning ([#773]).
32+
- BREAKING: Use distinct ServiceAccounts for the Stacklets, so that multiple Stacklets can be
33+
deployed in one namespace. Existing Stacklets will use the newly created ServiceAccounts after
34+
restart ([#793]).
3235

3336
### Removed
3437

@@ -41,6 +44,7 @@ All notable changes to this project will be documented in this file.
4144
[#762]: https://github.com/stackabletech/kafka-operator/pull/762
4245
[#771]: https://github.com/stackabletech/kafka-operator/pull/771
4346
[#773]: https://github.com/stackabletech/kafka-operator/pull/773
47+
[#793]: https://github.com/stackabletech/kafka-operator/pull/793
4448

4549
## [24.7.0] - 2024-07-24
4650

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.nix

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ serde = { version = "1.0", features = ["derive"] }
2222
serde_json = "1.0"
2323
serde_yaml = "0.9"
2424
snafu = "0.8"
25-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.80.0" }
25+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.82.0" }
2626
strum = { version = "0.26", features = ["derive"] }
2727
tokio = { version = "1.40", features = ["full"] }
2828
tracing = "0.1"

crate-hashes.json

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

rust/operator-binary/src/kafka_controller.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ use stackable_operator::{
4848
core::v1::{
4949
ConfigMap, ConfigMapKeySelector, ConfigMapVolumeSource, ContainerPort, EnvVar,
5050
EnvVarSource, ExecAction, ObjectFieldSelector, PodSpec, Probe, Service,
51-
ServiceSpec, Volume,
51+
ServiceAccount, ServiceSpec, Volume,
5252
},
5353
},
5454
apimachinery::pkg::apis::meta::v1::LabelSelector,
@@ -524,7 +524,7 @@ pub async fn reconcile_kafka(
524524
.context(BuildRbacResourcesSnafu)?;
525525

526526
let rbac_sa = cluster_resources
527-
.add(client, rbac_sa)
527+
.add(client, rbac_sa.clone())
528528
.await
529529
.context(ApplyServiceAccountSnafu)?;
530530
cluster_resources
@@ -561,7 +561,7 @@ pub async fn reconcile_kafka(
561561
opa_connect.as_deref(),
562562
&kafka_security,
563563
&merged_config,
564-
&rbac_sa.name_any(),
564+
&rbac_sa,
565565
&client.kubernetes_cluster_info,
566566
)?;
567567
let rg_bootstrap_listener = build_broker_rolegroup_bootstrap_listener(
@@ -824,7 +824,7 @@ fn build_broker_rolegroup_statefulset(
824824
opa_connect_string: Option<&str>,
825825
kafka_security: &KafkaTlsSecurity,
826826
merged_config: &KafkaConfig,
827-
sa_name: &str,
827+
service_account: &ServiceAccount,
828828
cluster_info: &KubernetesClusterInfo,
829829
) -> Result<StatefulSet> {
830830
let role = kafka.role(kafka_role).context(InternalOperatorSnafu)?;
@@ -1096,7 +1096,7 @@ fn build_broker_rolegroup_statefulset(
10961096
)),
10971097
)
10981098
.context(AddVolumeSnafu)?
1099-
.service_account_name(sa_name)
1099+
.service_account_name(service_account.name_any())
11001100
.security_context(
11011101
PodSecurityContextBuilder::new()
11021102
.run_as_user(KAFKA_UID)

0 commit comments

Comments
 (0)