From f1a4209ba664a65ea44c69ce56481aa1a103f344 Mon Sep 17 00:00:00 2001 From: Techassi Date: Mon, 18 Nov 2024 16:15:56 +0100 Subject: [PATCH 1/6] Update CHANGELOG.md from release 24.11.0 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9c1bdf4..eafc78ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased] +## [24.11.0] - 2024-11-18 + ### Added - The operator can now run on Kubernetes clusters using a non-default cluster domain. From 21e48c2938d5b3076689e1de463f79978587a553 Mon Sep 17 00:00:00 2001 From: Stacky McStackface <95074132+stackable-bot@users.noreply.github.com> Date: Mon, 18 Nov 2024 22:46:15 +0100 Subject: [PATCH 2/6] chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@fd40109c1bd66c79fa74bf67a5b5bff1e3a96ce8 (#589) Reference-to: stackabletech/operator-templating@fd40109 (Add make render-doc command) --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 309ca26d..db7f6b71 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,9 @@ SHELL=/usr/bin/env bash -euo pipefail render-readme: scripts/render_readme.sh +render-docs: + scripts/docs_templating.sh + ## Docker related targets docker-build: docker build --force-rm --build-arg VERSION=${VERSION} -t "${DOCKER_REPO}/${ORGANIZATION}/${OPERATOR_NAME}:${VERSION}-${ARCH}" -f docker/Dockerfile . From fa2ba97be1a851a4c5241628aaafd77e6b6da823 Mon Sep 17 00:00:00 2001 From: Nick <10092581+NickLarsenNZ@users.noreply.github.com> Date: Wed, 20 Nov 2024 20:15:31 +1300 Subject: [PATCH 3/6] chore(getting_started): replace templating instructions with make (#590) --- .../examples/getting_started/getting_started.sh | 14 +------------- .../examples/getting_started/getting_started.sh.j2 | 14 +------------- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/docs/modules/hbase/examples/getting_started/getting_started.sh b/docs/modules/hbase/examples/getting_started/getting_started.sh index 955c9f22..1660a565 100755 --- a/docs/modules/hbase/examples/getting_started/getting_started.sh +++ b/docs/modules/hbase/examples/getting_started/getting_started.sh @@ -2,19 +2,7 @@ set -euo pipefail # DO NOT EDIT THE SCRIPT -# Instead, update the j2 template, and regenerate it for dev: -# cat < Date: Thu, 21 Nov 2024 04:28:23 +1300 Subject: [PATCH 4/6] tests: Add OPA as a test dimension (main) (#592) --- tests/templates/kuttl/opa/11-install-opa.yaml.j2 | 2 +- tests/test-definition.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/templates/kuttl/opa/11-install-opa.yaml.j2 b/tests/templates/kuttl/opa/11-install-opa.yaml.j2 index 1e2aadc5..b15bc23a 100644 --- a/tests/templates/kuttl/opa/11-install-opa.yaml.j2 +++ b/tests/templates/kuttl/opa/11-install-opa.yaml.j2 @@ -5,7 +5,7 @@ metadata: name: opa spec: image: - productVersion: 0.61.0 + productVersion: "{{ test_scenario['values']['opa'] }}" pullPolicy: IfNotPresent servers: roleGroups: diff --git a/tests/test-definition.yaml b/tests/test-definition.yaml index f6c8053d..8d27924a 100644 --- a/tests/test-definition.yaml +++ b/tests/test-definition.yaml @@ -33,6 +33,9 @@ dimensions: - name: krb5 values: - 1.21.1 + - name: opa + values: + - 0.67.1 # Used for zookeeper, hdfs and hbase - name: listener-class values: @@ -81,6 +84,7 @@ tests: - zookeeper-latest - krb5 - openshift + - opa - name: orphaned_resources dimensions: - hbase-latest From 34c1d22bc5a70183264dab3eb86de339f716f964 Mon Sep 17 00:00:00 2001 From: Malte Sander Date: Mon, 25 Nov 2024 16:35:17 +0100 Subject: [PATCH 5/6] Patch op-rs version to use one that fixes SUP-148. (#594) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Patch op-rs version to use one that fixes SUP-148. * Updated changelog Use op-rs 0.82 instead of PR branch. * Regenerate Nix files --------- Co-authored-by: Sönke Liebau Co-authored-by: Siegfried Weber --- CHANGELOG.md | 2 ++ Cargo.lock | 8 +++---- Cargo.nix | 14 ++++++------- Cargo.toml | 2 +- crate-hashes.json | 6 +++--- rust/operator-binary/src/hbase_controller.rs | 22 +++++++++++--------- 6 files changed, 29 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eafc78ed..ac35833a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - Implement `envOverrides` for HbaseCluster ([#550]). - Omid test: use 1.1.2, update default port number and raise test timeout ([#556]). - An invalid `HBaseCluster` doesn't cause the operator to stop functioning (#[575]). +- 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]). ### Removed @@ -32,6 +33,7 @@ [#558]: https://github.com/stackabletech/hbase-operator/pull/558 [#574]: https://github.com/stackabletech/hbase-operator/pull/574 [#584]: https://github.com/stackabletech/hbase-operator/pull/584 +[#594]: https://github.com/stackabletech/hbase-operator/pull/594 ## [24.7.0] - 2024-07-24 diff --git a/Cargo.lock b/Cargo.lock index 93f88c98..ba92b419 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2210,8 +2210,8 @@ dependencies = [ [[package]] name = "stackable-operator" -version = "0.80.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.80.0#6fbe32300b60f95e0baa2ab0ff2daf961b06531c" +version = "0.82.0" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.82.0#415bbd031bd52e9c0c5392060235030e9930b46b" dependencies = [ "chrono", "clap", @@ -2249,7 +2249,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.80.0#6fbe32300b60f95e0baa2ab0ff2daf961b06531c" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.82.0#415bbd031bd52e9c0c5392060235030e9930b46b" dependencies = [ "darling", "proc-macro2", @@ -2260,7 +2260,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.0.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.80.0#6fbe32300b60f95e0baa2ab0ff2daf961b06531c" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.82.0#415bbd031bd52e9c0c5392060235030e9930b46b" dependencies = [ "kube", "semver", diff --git a/Cargo.nix b/Cargo.nix index 693e415a..ba4ed259 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -6827,13 +6827,13 @@ rec { }; "stackable-operator" = rec { crateName = "stackable-operator"; - version = "0.80.0"; + version = "0.82.0"; edition = "2021"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "6fbe32300b60f95e0baa2ab0ff2daf961b06531c"; - sha256 = "16jrq3wdwz63210jgmqbx3snrr15wxw6l1smqhzv7b7jpq8qvya3"; + rev = "415bbd031bd52e9c0c5392060235030e9930b46b"; + sha256 = "0phasjwb64rxgn5hs8vks92icmx9255bd5v9dms280clrfpcg4hy"; }; libName = "stackable_operator"; authors = [ @@ -6990,8 +6990,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "6fbe32300b60f95e0baa2ab0ff2daf961b06531c"; - sha256 = "16jrq3wdwz63210jgmqbx3snrr15wxw6l1smqhzv7b7jpq8qvya3"; + rev = "415bbd031bd52e9c0c5392060235030e9930b46b"; + sha256 = "0phasjwb64rxgn5hs8vks92icmx9255bd5v9dms280clrfpcg4hy"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -7025,8 +7025,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "6fbe32300b60f95e0baa2ab0ff2daf961b06531c"; - sha256 = "16jrq3wdwz63210jgmqbx3snrr15wxw6l1smqhzv7b7jpq8qvya3"; + rev = "415bbd031bd52e9c0c5392060235030e9930b46b"; + sha256 = "0phasjwb64rxgn5hs8vks92icmx9255bd5v9dms280clrfpcg4hy"; }; libName = "stackable_shared"; authors = [ diff --git a/Cargo.toml b/Cargo.toml index ee6a214d..b963f40b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,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"] } diff --git a/crate-hashes.json b/crate-hashes.json index 562fb18b..0ca37e6e 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -1,6 +1,6 @@ { - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.80.0#stackable-operator-derive@0.3.1": "16jrq3wdwz63210jgmqbx3snrr15wxw6l1smqhzv7b7jpq8qvya3", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.80.0#stackable-operator@0.80.0": "16jrq3wdwz63210jgmqbx3snrr15wxw6l1smqhzv7b7jpq8qvya3", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.80.0#stackable-shared@0.0.1": "16jrq3wdwz63210jgmqbx3snrr15wxw6l1smqhzv7b7jpq8qvya3", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.82.0#stackable-operator-derive@0.3.1": "0phasjwb64rxgn5hs8vks92icmx9255bd5v9dms280clrfpcg4hy", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.82.0#stackable-operator@0.82.0": "0phasjwb64rxgn5hs8vks92icmx9255bd5v9dms280clrfpcg4hy", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.82.0#stackable-shared@0.0.1": "0phasjwb64rxgn5hs8vks92icmx9255bd5v9dms280clrfpcg4hy", "git+https://github.com/stackabletech/product-config.git?tag=0.7.0#product-config@0.7.0": "0gjsm80g6r75pm3824dcyiz4ysq1ka4c1if6k1mjm9cnd5ym0gny" } \ No newline at end of file diff --git a/rust/operator-binary/src/hbase_controller.rs b/rust/operator-binary/src/hbase_controller.rs index 5e62d57e..24c2700b 100644 --- a/rust/operator-binary/src/hbase_controller.rs +++ b/rust/operator-binary/src/hbase_controller.rs @@ -24,23 +24,23 @@ use stackable_operator::{ }, }, 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, ContainerPort, Probe, Service, ServicePort, - ServiceSpec, TCPSocketAction, Volume, + ConfigMap, ConfigMapVolumeSource, ContainerPort, Probe, Service, ServiceAccount, + ServicePort, ServiceSpec, TCPSocketAction, Volume, }, }, apimachinery::pkg::{apis::meta::v1::LabelSelector, util::intstr::IntOrString}, DeepMerge, }, - kube::core::{error_boundary, DeserializeGuard}, - kube::{runtime::controller::Action, Resource}, + kube::{ + core::{error_boundary, DeserializeGuard}, + runtime::controller::Action, + Resource, ResourceExt, + }, kvp::{Label, LabelError, Labels, ObjectLabels}, logging::controller::ReconcilerError, memory::{BinaryMultiple, MemoryQuantity}, @@ -407,7 +407,7 @@ pub async fn reconcile_hbase( ) .context(BuildRbacResourcesSnafu)?; cluster_resources - .add(client, rbac_sa) + .add(client, rbac_sa.clone()) .await .context(ApplyServiceAccountSnafu)?; cluster_resources @@ -452,6 +452,7 @@ pub async fn reconcile_hbase( rolegroup_config, &merged_config, &resolved_product_image, + &rbac_sa, )?; cluster_resources .add(client, rg_service) @@ -778,6 +779,7 @@ fn build_rolegroup_statefulset( rolegroup_config: &HashMap>, config: &HbaseConfig, resolved_product_image: &ResolvedProductImage, + service_account: &ServiceAccount, ) -> Result { let hbase_version = &resolved_product_image.app_version_label; @@ -943,7 +945,7 @@ fn build_rolegroup_statefulset( )), ) .context(AddVolumeSnafu)? - .service_account_name(service_account_name(APP_NAME)) + .service_account_name(service_account.name_any()) .security_context( PodSecurityContextBuilder::new() .run_as_user(HBASE_UID) From ea016be21f34ebed34c76e5c75be22b076d4d548 Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Tue, 26 Nov 2024 16:51:21 +0100 Subject: [PATCH 6/6] Update changelog --- CHANGELOG.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac35833a..e689be80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ ## [Unreleased] +### Fixed + +- 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]). + +[#594]: https://github.com/stackabletech/hbase-operator/pull/594 + ## [24.11.0] - 2024-11-18 ### Added @@ -21,7 +29,6 @@ - Implement `envOverrides` for HbaseCluster ([#550]). - Omid test: use 1.1.2, update default port number and raise test timeout ([#556]). - An invalid `HBaseCluster` doesn't cause the operator to stop functioning (#[575]). -- 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]). ### Removed @@ -33,7 +40,6 @@ [#558]: https://github.com/stackabletech/hbase-operator/pull/558 [#574]: https://github.com/stackabletech/hbase-operator/pull/574 [#584]: https://github.com/stackabletech/hbase-operator/pull/584 -[#594]: https://github.com/stackabletech/hbase-operator/pull/594 ## [24.7.0] - 2024-07-24