Skip to content

Commit 4cfc08d

Browse files
authored
fix: Bump stackable-operator for delayed controller functionality (#759)
* fix: Delay controller startup to avoid 404 in initial list * chore: Add changelog entry
1 parent c00cb01 commit 4cfc08d

8 files changed

Lines changed: 54 additions & 51 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212

1313
### Changed
1414

15-
- Bump stackable-operator to 0.106.2, strum to 0.28, and rand to 0.10 ([#752]).
15+
- Bump stackable-operator to 0.108.0, strum to 0.28, and rand to 0.10 ([#752], [#759]).
1616
- Gracefully shutdown all concurrent tasks by forwarding the SIGTERM signal ([#741]).
1717
- Bump testing-tools to `0.3.0-stackable0.0.0-dev` ([#733]).
1818

1919
### Fixed
2020

21-
- Fix "404 page not found" error for the initial object list ([#756]).
21+
- Fix "404 page not found" error for the initial object list ([#756], [#759]).
2222
- Default `API_WORKERS` to 1 (instead of letting Airflow default to 4) to prevent crashloop and update/correct docs to reflect this ([#727]).
2323
- Prevent unnecessary Pod restarts when initially creating an AirflowCluster.
2424
This is achieved by applying the StatefulSet after all ConfigMaps and Secrets that it mounts ([#734]).
@@ -32,6 +32,7 @@
3232
[#742]: https://github.com/stackabletech/airflow-operator/pull/742
3333
[#752]: https://github.com/stackabletech/airflow-operator/pull/752
3434
[#756]: https://github.com/stackabletech/airflow-operator/pull/756
35+
[#759]: https://github.com/stackabletech/airflow-operator/pull/759
3536

3637
## [25.11.0] - 2025-11-07
3738

Cargo.lock

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

Cargo.nix

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/stackabletech/airflow-operator"
1111

1212
[workspace.dependencies]
1313
product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.8.0" }
14-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = ["telemetry", "versioned", "webhook"], tag = "stackable-operator-0.106.2" }
14+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = ["crds", "webhook"], tag = "stackable-operator-0.108.0" }
1515

1616
anyhow = "1.0"
1717
base64 = "0.22"

crate-hashes.json

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

deploy/helm/airflow-operator/templates/roles.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ rules:
9696
{{- if .Values.maintenance.customResourceDefinitions.maintain }}
9797
- create
9898
- patch
99+
# Required for startup condition
100+
- list
101+
- watch
99102
{{- end }}
100103
- apiGroups:
101104
- listeners.stackable.tech

rust/operator-binary/src/main.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use stackable_operator::{
1717
core::v1::{ConfigMap, Service},
1818
},
1919
kube::{
20-
ResourceExt,
20+
CustomResourceExt, ResourceExt,
2121
core::DeserializeGuard,
2222
runtime::{
2323
Controller,
@@ -29,12 +29,12 @@ use stackable_operator::{
2929
logging::controller::report_controller_reconciled,
3030
shared::yaml::SerializeOptions,
3131
telemetry::Tracing,
32-
utils::signal::SignalWatcher,
32+
utils::signal::{self, SignalWatcher},
3333
};
3434

3535
use crate::{
3636
airflow_controller::AIRFLOW_FULL_CONTROLLER_NAME,
37-
crd::{AirflowCluster, AirflowClusterVersion, OPERATOR_NAME, v1alpha2},
37+
crd::{AirflowCluster, AirflowClusterVersion, OPERATOR_NAME, v1alpha1, v1alpha2},
3838
webhooks::conversion::create_webhook_server,
3939
};
4040

@@ -192,7 +192,7 @@ async fn main() -> anyhow::Result<()> {
192192
)
193193
.map(anyhow::Ok);
194194

195-
let (webhook_server, initial_reconcile_rx) = create_webhook_server(
195+
let webhook_server = create_webhook_server(
196196
&operator_environment,
197197
maintenance.disable_crd_maintenance,
198198
client.as_kube_client(),
@@ -204,7 +204,8 @@ async fn main() -> anyhow::Result<()> {
204204
.map_err(|err| anyhow!(err).context("failed to run webhook server"));
205205

206206
let delayed_airflow_controller = async {
207-
let _ = initial_reconcile_rx.await;
207+
signal::crd_established(&client, v1alpha1::AirflowCluster::crd_name(), None)
208+
.await?;
208209
airflow_controller.await
209210
};
210211

rust/operator-binary/src/webhooks/conversion.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use stackable_operator::{
77
webhooks::{ConversionWebhook, ConversionWebhookOptions},
88
},
99
};
10-
use tokio::sync::oneshot;
1110

1211
use crate::crd::{AirflowCluster, AirflowClusterVersion, FIELD_MANAGER};
1312

@@ -27,7 +26,7 @@ pub async fn create_webhook_server(
2726
operator_environment: &OperatorEnvironmentOptions,
2827
disable_crd_maintenance: bool,
2928
client: Client,
30-
) -> Result<(WebhookServer, oneshot::Receiver<()>), Error> {
29+
) -> Result<WebhookServer, Error> {
3130
let crds_and_handlers = vec![(
3231
AirflowCluster::merged_crd(AirflowClusterVersion::V1Alpha2).context(MergeCrdSnafu)?,
3332
AirflowCluster::try_convert,
@@ -38,7 +37,7 @@ pub async fn create_webhook_server(
3837
field_manager: FIELD_MANAGER.to_owned(),
3938
};
4039

41-
let (conversion_webhook, initial_reconcile_rx) =
40+
let (conversion_webhook, _initial_reconcile_rx) =
4241
ConversionWebhook::new(crds_and_handlers, client, conversion_webhook_options);
4342

4443
let webhook_server_options = WebhookServerOptions {
@@ -52,5 +51,5 @@ pub async fn create_webhook_server(
5251
.await
5352
.context(CreateWebhookSnafu)?;
5453

55-
Ok((webhook_server, initial_reconcile_rx))
54+
Ok(webhook_server)
5655
}

0 commit comments

Comments
 (0)