Skip to content

Commit 90c8e3a

Browse files
committed
fix: remove image resolve from znode cleanup
1 parent e877572 commit 90c8e3a

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

rust/operator-binary/src/znode_controller.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ pub async fn reconcile_znode(
252252
)
253253
.await
254254
}
255-
finalizer::Event::Cleanup(znode) => {
255+
finalizer::Event::Cleanup(_znode) => {
256256
let dereferenced = match dereferenced_objects {
257257
Ok(d) => d,
258258
Err(dereference::Error::ZkDoesNotExist { zk, .. }) => {
@@ -261,10 +261,13 @@ pub async fn reconcile_znode(
261261
}
262262
Err(e) => return Err(e).context(DereferenceSnafu),
263263
};
264-
let validate::ValidatedInputs {
265-
zookeeper_security, ..
266-
} = validate::validate(&znode, &dereferenced, &ctx.operator_environment)
267-
.context(ValidateClusterSnafu)?;
264+
// Cleanup only needs ZookeeperSecurity to talk to the cluster; skip the
265+
// apply-time image resolution in `validate` so a bad image spec can't
266+
// block finalizer removal.
267+
let zookeeper_security = ZookeeperSecurity::new(
268+
&dereferenced.zk,
269+
dereferenced.resolved_authentication_classes.clone(),
270+
);
268271
reconcile_cleanup(client, dereferenced.zk, &zookeeper_security, &znode_path)
269272
.await
270273
}

0 commit comments

Comments
 (0)