diff --git a/rust/operator-binary/src/superset_controller.rs b/rust/operator-binary/src/superset_controller.rs index 1f3abcb0..cee0d7e8 100644 --- a/rust/operator-binary/src/superset_controller.rs +++ b/rust/operator-binary/src/superset_controller.rs @@ -467,6 +467,10 @@ pub async fn reconcile_superset( .with_context(|_| ApplyRoleGroupConfigSnafu { rolegroup: rolegroup.clone(), })?; + + // Note: The StatefulSet needs to be applied after all ConfigMaps and Secrets it mounts + // to prevent unnecessary Pod restarts. + // See https://github.com/stackabletech/commons-operator/issues/111 for details. ss_cond_builder.add( cluster_resources .add(client, rg_statefulset.clone()) diff --git a/tests/templates/kuttl/smoke/30-assert.yaml b/tests/templates/kuttl/smoke/30-assert.yaml index 003e009a..e86d19ff 100644 --- a/tests/templates/kuttl/smoke/30-assert.yaml +++ b/tests/templates/kuttl/smoke/30-assert.yaml @@ -11,6 +11,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: name: superset-node-default + generation: 1 # There should be no unneeded Pod restarts spec: template: spec: