Skip to content

Commit 4c11b02

Browse files
authored
docs: Document StatefulSet should be applied last (#694)
* docs: Document StatefulSet should be applied last * Improve message * Add generation assertion to smoke test
1 parent e994bbc commit 4c11b02

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

rust/operator-binary/src/superset_controller.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,10 @@ pub async fn reconcile_superset(
467467
.with_context(|_| ApplyRoleGroupConfigSnafu {
468468
rolegroup: rolegroup.clone(),
469469
})?;
470+
471+
// Note: The StatefulSet needs to be applied after all ConfigMaps and Secrets it mounts
472+
// to prevent unnecessary Pod restarts.
473+
// See https://github.com/stackabletech/commons-operator/issues/111 for details.
470474
ss_cond_builder.add(
471475
cluster_resources
472476
.add(client, rg_statefulset.clone())

tests/templates/kuttl/smoke/30-assert.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ apiVersion: apps/v1
1111
kind: StatefulSet
1212
metadata:
1313
name: superset-node-default
14+
generation: 1 # There should be no unneeded Pod restarts
1415
spec:
1516
template:
1617
spec:

0 commit comments

Comments
 (0)