Skip to content

Commit a8e8aa4

Browse files
Merge branch 'main' into update-release-branch
2 parents 27f57a3 + 34c1d22 commit a8e8aa4

File tree

9 files changed

+34
-51
lines changed

9 files changed

+34
-51
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- Implement `envOverrides` for HbaseCluster ([#550]).
2222
- Omid test: use 1.1.2, update default port number and raise test timeout ([#556]).
2323
- An invalid `HBaseCluster` doesn't cause the operator to stop functioning (#[575]).
24+
- 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 ([#594]).
2425

2526
### Removed
2627

@@ -32,6 +33,7 @@
3233
[#558]: https://github.com/stackabletech/hbase-operator/pull/558
3334
[#574]: https://github.com/stackabletech/hbase-operator/pull/574
3435
[#584]: https://github.com/stackabletech/hbase-operator/pull/584
36+
[#594]: https://github.com/stackabletech/hbase-operator/pull/594
3537

3638
## [24.7.0] - 2024-07-24
3739

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
@@ -21,7 +21,7 @@ serde = { version = "1.0", features = ["derive"] }
2121
serde_json = "1.0"
2222
serde_yaml = "0.9"
2323
snafu = "0.8"
24-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.80.0" }
24+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.82.0" }
2525
product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.7.0" }
2626
strum = { version = "0.26", features = ["derive"] }
2727
tokio = { version = "1.40", features = ["full"] }

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ SHELL=/usr/bin/env bash -euo pipefail
2929
render-readme:
3030
scripts/render_readme.sh
3131

32+
render-docs:
33+
scripts/docs_templating.sh
34+
3235
## Docker related targets
3336
docker-build:
3437
docker build --force-rm --build-arg VERSION=${VERSION} -t "${DOCKER_REPO}/${ORGANIZATION}/${OPERATOR_NAME}:${VERSION}-${ARCH}" -f docker/Dockerfile .

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.

docs/modules/hbase/examples/getting_started/getting_started.sh

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,7 @@
22
set -euo pipefail
33

44
# DO NOT EDIT THE SCRIPT
5-
# Instead, update the j2 template, and regenerate it for dev:
6-
# cat <<EOF | jinja2 --format yaml getting_started.sh.j2 -o getting_started.sh
7-
# helm:
8-
# repo_name: stackable-dev
9-
# repo_url: https://repo.stackable.tech/repository/helm-dev/
10-
# versions:
11-
# zookeeper: 0.0.0-dev
12-
# hdfs: 0.0.0-dev
13-
# commons: 0.0.0-dev
14-
# secret: 0.0.0-dev
15-
# listener: 0.0.0-dev
16-
# hbase: 0.0.0-dev
17-
# EOF
5+
# Instead, update the j2 template, and regenerate it for dev with `make render-docs`.
186

197
# This script contains all the code snippets from the guide, as well as some assert tests
208
# to test if the instructions in the guide work. The user *could* use it, but it is intended

docs/modules/hbase/examples/getting_started/getting_started.sh.j2

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,7 @@
22
set -euo pipefail
33

44
# DO NOT EDIT THE SCRIPT
5-
# Instead, update the j2 template, and regenerate it for dev:
6-
# cat <<EOF | jinja2 --format yaml getting_started.sh.j2 -o getting_started.sh
7-
# helm:
8-
# repo_name: stackable-dev
9-
# repo_url: https://repo.stackable.tech/repository/helm-dev/
10-
# versions:
11-
# zookeeper: 0.0.0-dev
12-
# hdfs: 0.0.0-dev
13-
# commons: 0.0.0-dev
14-
# secret: 0.0.0-dev
15-
# listener: 0.0.0-dev
16-
# hbase: 0.0.0-dev
17-
# EOF
5+
# Instead, update the j2 template, and regenerate it for dev with `make render-docs`.
186

197
# This script contains all the code snippets from the guide, as well as some assert tests
208
# to test if the instructions in the guide work. The user *could* use it, but it is intended

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)