From 7fb11d9a4b1fba183f9ca9640596b7279c7ad240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Liebau?= Date: Fri, 22 Nov 2024 11:17:15 +0100 Subject: [PATCH 1/5] Use patched version of op-rs that hopefully addresses SUP-148. --- Cargo.lock | 8 ++++---- Cargo.toml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 93a4edb9..acc8f9e6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2112,8 +2112,8 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[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.81.0" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#154ce7e8de746aa43e120cb839f9494089c620ef" dependencies = [ "chrono", "clap", @@ -2151,7 +2151,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?branch=fix%2FSUP-148#154ce7e8de746aa43e120cb839f9494089c620ef" dependencies = [ "darling", "proc-macro2", @@ -2162,7 +2162,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?branch=fix%2FSUP-148#154ce7e8de746aa43e120cb839f9494089c620ef" dependencies = [ "kube", "semver", diff --git a/Cargo.toml b/Cargo.toml index 51f0e683..dafbb3f1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,5 +26,5 @@ 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 = "main" } +[patch."https://github.com/stackabletech/operator-rs.git"] +stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "fix/SUP-148" } \ No newline at end of file From 3f21a5496b928090c2a40855d484b91f03905877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Liebau?= Date: Fri, 22 Nov 2024 11:48:18 +0100 Subject: [PATCH 2/5] Update PR revision --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index acc8f9e6..b1aa7939 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2113,7 +2113,7 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "stackable-operator" version = "0.81.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#154ce7e8de746aa43e120cb839f9494089c620ef" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#d04b987c75beecd5bc65d40a07084d9e991babf2" dependencies = [ "chrono", "clap", @@ -2151,7 +2151,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#154ce7e8de746aa43e120cb839f9494089c620ef" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#d04b987c75beecd5bc65d40a07084d9e991babf2" dependencies = [ "darling", "proc-macro2", @@ -2162,7 +2162,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.0.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#154ce7e8de746aa43e120cb839f9494089c620ef" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#d04b987c75beecd5bc65d40a07084d9e991babf2" dependencies = [ "kube", "semver", From c1ffd0dfe3b128eeaf111c2557fd72de35fe8c1a Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Fri, 22 Nov 2024 17:40:20 +0100 Subject: [PATCH 3/5] Extend assertions in the DruidConnection test --- Cargo.lock | 6 +++--- Cargo.nix | 20 +++++++++--------- Cargo.toml | 2 +- crate-hashes.json | 6 +++--- .../kuttl/druid-connection/20-assert.yaml | 21 ++++++++++++++++++- .../20-install-superset.yaml.j2 | 2 +- .../kuttl/druid-connection/30-assert.yaml | 17 +++++++++++++++ .../30-install-druid-connection.yaml | 2 +- 8 files changed, 56 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b1aa7939..cd22809c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2113,7 +2113,7 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "stackable-operator" version = "0.81.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#d04b987c75beecd5bc65d40a07084d9e991babf2" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#c219c2a0fd63ffac17738f9c869239f5772681cf" dependencies = [ "chrono", "clap", @@ -2151,7 +2151,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#d04b987c75beecd5bc65d40a07084d9e991babf2" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#c219c2a0fd63ffac17738f9c869239f5772681cf" dependencies = [ "darling", "proc-macro2", @@ -2162,7 +2162,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.0.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#d04b987c75beecd5bc65d40a07084d9e991babf2" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#c219c2a0fd63ffac17738f9c869239f5772681cf" dependencies = [ "kube", "semver", diff --git a/Cargo.nix b/Cargo.nix index c20595ce..05e6d07e 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -6520,13 +6520,13 @@ rec { }; "stackable-operator" = rec { crateName = "stackable-operator"; - version = "0.80.0"; + version = "0.81.0"; edition = "2021"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "6fbe32300b60f95e0baa2ab0ff2daf961b06531c"; - sha256 = "16jrq3wdwz63210jgmqbx3snrr15wxw6l1smqhzv7b7jpq8qvya3"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "c219c2a0fd63ffac17738f9c869239f5772681cf"; + sha256 = "0djimy0n07xsbf5kgz6ic6rvw9v7d47wfzliz26xb0x8zc47lpm3"; }; libName = "stackable_operator"; authors = [ @@ -6682,9 +6682,9 @@ rec { edition = "2021"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "6fbe32300b60f95e0baa2ab0ff2daf961b06531c"; - sha256 = "16jrq3wdwz63210jgmqbx3snrr15wxw6l1smqhzv7b7jpq8qvya3"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "c219c2a0fd63ffac17738f9c869239f5772681cf"; + sha256 = "0djimy0n07xsbf5kgz6ic6rvw9v7d47wfzliz26xb0x8zc47lpm3"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -6717,9 +6717,9 @@ rec { edition = "2021"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "6fbe32300b60f95e0baa2ab0ff2daf961b06531c"; - sha256 = "16jrq3wdwz63210jgmqbx3snrr15wxw6l1smqhzv7b7jpq8qvya3"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "c219c2a0fd63ffac17738f9c869239f5772681cf"; + sha256 = "0djimy0n07xsbf5kgz6ic6rvw9v7d47wfzliz26xb0x8zc47lpm3"; }; libName = "stackable_shared"; authors = [ diff --git a/Cargo.toml b/Cargo.toml index dafbb3f1..dd75ee88 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,4 +27,4 @@ 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" } \ No newline at end of file +stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "fix/SUP-148" } diff --git a/crate-hashes.json b/crate-hashes.json index 562fb18b..3000f993 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?branch=fix%2FSUP-148#stackable-operator-derive@0.3.1": "0djimy0n07xsbf5kgz6ic6rvw9v7d47wfzliz26xb0x8zc47lpm3", + "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#stackable-operator@0.81.0": "0djimy0n07xsbf5kgz6ic6rvw9v7d47wfzliz26xb0x8zc47lpm3", + "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#stackable-shared@0.0.1": "0djimy0n07xsbf5kgz6ic6rvw9v7d47wfzliz26xb0x8zc47lpm3", "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/tests/templates/kuttl/druid-connection/20-assert.yaml b/tests/templates/kuttl/druid-connection/20-assert.yaml index b563e422..2fd2044c 100644 --- a/tests/templates/kuttl/druid-connection/20-assert.yaml +++ b/tests/templates/kuttl/druid-connection/20-assert.yaml @@ -8,7 +8,26 @@ timeout: 300 apiVersion: apps/v1 kind: StatefulSet metadata: - name: superset-node-default + name: test-superset-node-default status: readyReplicas: 1 replicas: 1 +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: test-superset-serviceaccount +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: test-superset-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: superset-clusterrole +subjects: +- kind: ServiceAccount + name: test-superset-serviceaccount +- kind: ServiceAccount + name: superset-serviceaccount diff --git a/tests/templates/kuttl/druid-connection/20-install-superset.yaml.j2 b/tests/templates/kuttl/druid-connection/20-install-superset.yaml.j2 index 7d6a166c..925dcdbd 100644 --- a/tests/templates/kuttl/druid-connection/20-install-superset.yaml.j2 +++ b/tests/templates/kuttl/druid-connection/20-install-superset.yaml.j2 @@ -22,7 +22,7 @@ stringData: apiVersion: superset.stackable.tech/v1alpha1 kind: SupersetCluster metadata: - name: superset + name: test-superset spec: image: productVersion: "{{ test_scenario['values']['superset'] }}" diff --git a/tests/templates/kuttl/druid-connection/30-assert.yaml b/tests/templates/kuttl/druid-connection/30-assert.yaml index 65804087..f37f6817 100644 --- a/tests/templates/kuttl/druid-connection/30-assert.yaml +++ b/tests/templates/kuttl/druid-connection/30-assert.yaml @@ -11,3 +11,20 @@ metadata: name: superset-druid-connection status: condition: Pending +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: superset-sa +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: superset-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: superset-clusterrole +subjects: +- kind: ServiceAccount + name: superset-sa diff --git a/tests/templates/kuttl/druid-connection/30-install-druid-connection.yaml b/tests/templates/kuttl/druid-connection/30-install-druid-connection.yaml index 3beafebe..41f44bba 100644 --- a/tests/templates/kuttl/druid-connection/30-install-druid-connection.yaml +++ b/tests/templates/kuttl/druid-connection/30-install-druid-connection.yaml @@ -11,6 +11,6 @@ metadata: name: superset-druid-connection spec: superset: - name: superset + name: test-superset druid: name: derby-druid From fab657f2f411f81a7c77e456d0ea41c32c4ead75 Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Sat, 23 Nov 2024 11:54:44 +0100 Subject: [PATCH 4/5] Upgrade stackable-operator to version 0.82.0 --- Cargo.lock | 8 ++++---- Cargo.nix | 20 ++++++++++---------- Cargo.toml | 6 +++--- crate-hashes.json | 6 +++--- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cd22809c..4fc801d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2112,8 +2112,8 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "stackable-operator" -version = "0.81.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#c219c2a0fd63ffac17738f9c869239f5772681cf" +version = "0.82.0" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.82.0#415bbd031bd52e9c0c5392060235030e9930b46b" dependencies = [ "chrono", "clap", @@ -2151,7 +2151,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#c219c2a0fd63ffac17738f9c869239f5772681cf" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.82.0#415bbd031bd52e9c0c5392060235030e9930b46b" dependencies = [ "darling", "proc-macro2", @@ -2162,7 +2162,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.0.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#c219c2a0fd63ffac17738f9c869239f5772681cf" +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 05e6d07e..ca9a0e33 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -6520,13 +6520,13 @@ rec { }; "stackable-operator" = rec { crateName = "stackable-operator"; - version = "0.81.0"; + version = "0.82.0"; edition = "2021"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech//operator-rs.git"; - rev = "c219c2a0fd63ffac17738f9c869239f5772681cf"; - sha256 = "0djimy0n07xsbf5kgz6ic6rvw9v7d47wfzliz26xb0x8zc47lpm3"; + url = "https://github.com/stackabletech/operator-rs.git"; + rev = "415bbd031bd52e9c0c5392060235030e9930b46b"; + sha256 = "0phasjwb64rxgn5hs8vks92icmx9255bd5v9dms280clrfpcg4hy"; }; libName = "stackable_operator"; authors = [ @@ -6682,9 +6682,9 @@ rec { edition = "2021"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech//operator-rs.git"; - rev = "c219c2a0fd63ffac17738f9c869239f5772681cf"; - sha256 = "0djimy0n07xsbf5kgz6ic6rvw9v7d47wfzliz26xb0x8zc47lpm3"; + url = "https://github.com/stackabletech/operator-rs.git"; + rev = "415bbd031bd52e9c0c5392060235030e9930b46b"; + sha256 = "0phasjwb64rxgn5hs8vks92icmx9255bd5v9dms280clrfpcg4hy"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -6717,9 +6717,9 @@ rec { edition = "2021"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech//operator-rs.git"; - rev = "c219c2a0fd63ffac17738f9c869239f5772681cf"; - sha256 = "0djimy0n07xsbf5kgz6ic6rvw9v7d47wfzliz26xb0x8zc47lpm3"; + url = "https://github.com/stackabletech/operator-rs.git"; + rev = "415bbd031bd52e9c0c5392060235030e9930b46b"; + sha256 = "0phasjwb64rxgn5hs8vks92icmx9255bd5v9dms280clrfpcg4hy"; }; libName = "stackable_shared"; authors = [ diff --git a/Cargo.toml b/Cargo.toml index dd75ee88..564d1da6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,10 +21,10 @@ 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" } 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" } diff --git a/crate-hashes.json b/crate-hashes.json index 3000f993..0ca37e6e 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -1,6 +1,6 @@ { - "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#stackable-operator-derive@0.3.1": "0djimy0n07xsbf5kgz6ic6rvw9v7d47wfzliz26xb0x8zc47lpm3", - "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#stackable-operator@0.81.0": "0djimy0n07xsbf5kgz6ic6rvw9v7d47wfzliz26xb0x8zc47lpm3", - "git+https://github.com/stackabletech//operator-rs.git?branch=fix%2FSUP-148#stackable-shared@0.0.1": "0djimy0n07xsbf5kgz6ic6rvw9v7d47wfzliz26xb0x8zc47lpm3", + "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 From e353de4998d1dae4aa0b2b2067858afbd880c1a9 Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Sat, 23 Nov 2024 12:20:02 +0100 Subject: [PATCH 5/5] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0740bb5..78dfa1b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,11 +19,15 @@ ### Fixed - Invalid `SupersetCluster`, `DruidConnection` or `AuthenticationClass` objects don't stop the operator from reconciling ([#551]). +- 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 ([#568]). [#528]: https://github.com/stackabletech/superset-operator/pull/528 [#530]: https://github.com/stackabletech/superset-operator/pull/530 [#549]: https://github.com/stackabletech/superset-operator/pull/549 [#551]: https://github.com/stackabletech/superset-operator/pull/551 +[#568]: https://github.com/stackabletech/superset-operator/pull/568 ## [24.7.0] - 2024-07-24