Skip to content
Merged
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ All notable changes to this project will be documented in this file.
### Fixed

- Failing to parse one `ZookeeperCluster`/`ZookeeperZnode` should no longer cause the whole operator to stop functioning ([#872]).
- BREAKING: Use distinct ServiceAccounts for the Stacklets, so that multiple Stacklets can be deployed in one namespace. Existing Stacklets will use the newly created ServiceAccounts after restart ([#889]).

[#853]: https://github.com/stackabletech/zookeeper-operator/pull/853
[#857]: https://github.com/stackabletech/zookeeper-operator/pull/857
[#870]: https://github.com/stackabletech/zookeeper-operator/pull/870
[#872]: https://github.com/stackabletech/zookeeper-operator/pull/872
[#889]: https://github.com/stackabletech/zookeeper-operator/pull/889

## [24.7.0] - 2024-07-24

Expand Down
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.

14 changes: 7 additions & 7 deletions Cargo.nix

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
snafu = "0.8"
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.80.0" }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.82.0" }
product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.7.0" }
strum = { version = "0.26", features = ["derive"] }
tokio = { version = "1.40", features = ["full"] }
Expand Down
6 changes: 3 additions & 3 deletions crate-hashes.json

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

18 changes: 9 additions & 9 deletions rust/operator-binary/src/zk_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,14 @@ use stackable_operator::{
pod::{container::ContainerBuilder, resources::ResourceRequirementsBuilder, PodBuilder},
},
cluster_resources::{ClusterResourceApplyStrategy, ClusterResources},
commons::{
product_image_selection::ResolvedProductImage,
rbac::{build_rbac_resources, service_account_name},
},
commons::{product_image_selection::ResolvedProductImage, rbac::build_rbac_resources},
k8s_openapi::{
api::{
apps::v1::{StatefulSet, StatefulSetSpec},
core::v1::{
ConfigMap, ConfigMapVolumeSource, EmptyDirVolumeSource, EnvVar, EnvVarSource,
ExecAction, ObjectFieldSelector, PodSecurityContext, Probe, Service, ServicePort,
ServiceSpec, Volume,
ExecAction, ObjectFieldSelector, PodSecurityContext, Probe, Service,
ServiceAccount, ServicePort, ServiceSpec, Volume,
},
},
apimachinery::pkg::apis::meta::v1::LabelSelector,
Expand All @@ -43,7 +40,7 @@ use stackable_operator::{
api::DynamicObject,
core::{error_boundary, DeserializeGuard},
runtime::controller,
Resource,
Resource, ResourceExt,
},
kvp::{Label, LabelError, Labels},
logging::controller::ReconcilerError,
Expand Down Expand Up @@ -395,7 +392,7 @@ pub async fn reconcile_zk(
.context(BuildRbacResourcesSnafu)?;

cluster_resources
.add(client, rbac_sa)
.add(client, rbac_sa.clone())
.await
.context(ApplyServiceAccountSnafu)?;

Expand Down Expand Up @@ -444,6 +441,7 @@ pub async fn reconcile_zk(
&zookeeper_security,
&resolved_product_image,
&merged_config,
&rbac_sa,
)?;
cluster_resources
.add(client, rg_service)
Expand Down Expand Up @@ -749,6 +747,7 @@ fn build_server_rolegroup_service(
/// The rolegroup [`StatefulSet`] runs the rolegroup, as configured by the administrator.
///
/// The [`Pod`](`stackable_operator::k8s_openapi::api::core::v1::Pod`)s are accessible through the corresponding [`Service`] (from [`build_server_rolegroup_service`]).
#[allow(clippy::too_many_arguments)]
fn build_server_rolegroup_statefulset(
zk: &ZookeeperCluster,
zk_role: &ZookeeperRole,
Expand All @@ -757,6 +756,7 @@ fn build_server_rolegroup_statefulset(
zookeeper_security: &ZookeeperSecurity,
resolved_product_image: &ResolvedProductImage,
config: &ZookeeperConfig,
service_account: &ServiceAccount,
) -> Result<StatefulSet> {
let role = zk.role(zk_role).context(InternalOperatorFailureSnafu)?;
let rolegroup = zk
Expand Down Expand Up @@ -964,7 +964,7 @@ fn build_server_rolegroup_statefulset(
fs_group: Some(1000),
..PodSecurityContext::default()
})
.service_account_name(service_account_name(APP_NAME));
.service_account_name(service_account.name_any());

if let Some(ContainerLogConfig {
choice:
Expand Down
Loading