Skip to content

Commit 011bc76

Browse files
authored
fix: Set correct schema in startup probe (#717)
* fix: Set correct schema in startup probe * changelog
1 parent ec92551 commit 011bc76

File tree

3 files changed

+17
-39
lines changed

3 files changed

+17
-39
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@ All notable changes to this project will be documented in this file.
2121
### Fixed
2222

2323
- Add a startupProbe, which checks via `/v1/info` that the coordinator/worker have finished starting.
24-
Also migrate the other probes from `tcpSocket` to `httpGet` on `/v1/info` ([#715]).
24+
Also migrate the other probes from `tcpSocket` to `httpGet` on `/v1/info` ([#715], [#717]).
2525

2626
[#676]: https://github.com/stackabletech/trino-operator/pull/676
2727
[#677]: https://github.com/stackabletech/trino-operator/pull/677
2828
[#687]: https://github.com/stackabletech/trino-operator/pull/687
2929
[#694]: https://github.com/stackabletech/trino-operator/pull/694
3030
[#695]: https://github.com/stackabletech/trino-operator/pull/695
3131
[#715]: https://github.com/stackabletech/trino-operator/pull/715
32+
[#717]: https://github.com/stackabletech/trino-operator/pull/717
3233

3334
## [24.11.1] - 2025-01-10
3435

Cargo.nix

Lines changed: 8 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/operator-binary/src/controller.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1545,14 +1545,20 @@ fn http_get_probe(trino: &v1alpha1::TrinoCluster) -> HTTPGetAction {
15451545
/// This probe works on coordinators and workers.
15461546
fn finished_starting_probe(trino: &v1alpha1::TrinoCluster) -> ExecAction {
15471547
let port = trino.exposed_port();
1548+
let schema = if trino.expose_https_port() {
1549+
"https"
1550+
} else {
1551+
"http"
1552+
};
1553+
15481554
ExecAction {
15491555
command: Some(vec![
15501556
"/bin/bash".to_string(),
15511557
"-x".to_string(),
15521558
"-euo".to_string(),
15531559
"pipefail".to_string(),
15541560
"-c".to_string(),
1555-
format!("curl --fail --insecure https://127.0.0.1:{port}/v1/info | grep --silent '\\\"starting\\\":false'"),
1561+
format!("curl --fail --insecure {schema}://127.0.0.1:{port}/v1/info | grep --silent '\\\"starting\\\":false'"),
15561562
]),
15571563
}
15581564
}

0 commit comments

Comments
 (0)