Skip to content

Commit f4ecd43

Browse files
committed
allow config map endpoints to be removed if cluster is stopped
1 parent 8ae3303 commit f4ecd43

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

rust/operator-binary/src/airflow_controller.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,11 @@ pub async fn reconcile_airflow(
575575
listener_refs
576576
);
577577

578-
if !listener_refs.is_empty() {
578+
// if paused or stopped the podrefs have not been collected (see comment
579+
// above): the config map should remain unchanged if paused, but the
580+
// refs removed from it if the cluster is stopped as replicas will
581+
// have been set to 0.
582+
if !airflow.spec.cluster_operation.reconciliation_paused {
579583
let endpoint_cm =
580584
build_discovery_configmap(airflow, &resolved_product_image, &listener_refs)
581585
.context(BuildDiscoveryConfigMapSnafu)?;

0 commit comments

Comments
 (0)