Skip to content

Commit 8f26422

Browse files
committed
fix: Add startupProbe to prevent Superset startup problems
1 parent c8c33d8 commit 8f26422

File tree

2 files changed

+35
-15
lines changed

2 files changed

+35
-15
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## [Unreleased]
44

5+
### Fixed
6+
7+
- Fix container not starting because Superset was starting too slow and was killed because a failing liveness probe.
8+
We now add a proper startup probe, which allows Superset to take longer to start up ([#XXX]).
9+
510
## [25.7.0] - 2025-07-23
611

712
## [25.7.0-rc1] - 2025-07-18

rust/operator-binary/src/superset_controller.rs

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -786,21 +786,7 @@ fn build_server_rolegroup_statefulset(
786786
create_vector_shutdown_file_command(STACKABLE_LOG_DIR),
787787
}])
788788
.resources(merged_config.resources.clone().into());
789-
let probe = Probe {
790-
http_get: Some(HTTPGetAction {
791-
port: IntOrString::Int(APP_PORT.into()),
792-
path: Some("/health".to_string()),
793-
..HTTPGetAction::default()
794-
}),
795-
initial_delay_seconds: Some(15),
796-
period_seconds: Some(15),
797-
timeout_seconds: Some(1),
798-
failure_threshold: Some(3),
799-
success_threshold: Some(1),
800-
..Probe::default()
801-
};
802-
superset_cb.readiness_probe(probe.clone());
803-
superset_cb.liveness_probe(probe);
789+
add_superset_container_probes(&mut superset_cb);
804790

805791
// listener endpoints will use persistent volumes
806792
// so that load balancers can hard-code the target addresses and
@@ -932,6 +918,35 @@ fn build_server_rolegroup_statefulset(
932918
})
933919
}
934920

921+
fn add_superset_container_probes(superset_cb: &mut ContainerBuilder) {
922+
let probe_action = HTTPGetAction {
923+
port: IntOrString::Int(APP_PORT.into()),
924+
path: Some("/health".to_string()),
925+
..HTTPGetAction::default()
926+
};
927+
let common_probe = Probe {
928+
http_get: Some(probe_action),
929+
period_seconds: Some(5),
930+
timeout_seconds: Some(5),
931+
success_threshold: Some(1),
932+
..Probe::default()
933+
};
934+
superset_cb.startup_probe(Probe {
935+
failure_threshold: Some(10 /* minutes */ * 60 / 5),
936+
..common_probe.clone()
937+
});
938+
// Remove it from the Service immediately
939+
superset_cb.readiness_probe(Probe {
940+
failure_threshold: Some(1),
941+
..common_probe.clone()
942+
});
943+
// But only restart it after 3 failures
944+
superset_cb.readiness_probe(Probe {
945+
failure_threshold: Some(3),
946+
..common_probe
947+
});
948+
}
949+
935950
fn add_authentication_volumes_and_volume_mounts(
936951
auth_config: &SupersetClientAuthenticationDetailsResolved,
937952
cb: &mut ContainerBuilder,

0 commit comments

Comments
 (0)