Skip to content

Commit c54c0fd

Browse files
committed
Use ControlPlaneInitialized to determine if cluster is ready to connect.
1 parent e5d9ec4 commit c54c0fd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/controllers/cluster.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ use super::controller::{
3434
};
3535
use super::{BundleResult, ClusterSyncError, ClusterSyncResult};
3636

37-
pub static CONTROLPLANE_READY_CONDITION: &str = "ControlPlaneReady";
37+
pub static CONTROLPLANE_INITIALIZED_CONDITION: &str = "ControlPlaneInitialized";
38+
pub static FLEET_WORKSPACE_ANNOTATION: &str = "field.cattle.io/allow-fleetworkspace-creation-for-existing-namespace";
3839

3940
pub struct FleetClusterBundle {
4041
namespace: Namespace,
@@ -293,7 +294,7 @@ impl Cluster {
293294
let status = self.status.clone()?;
294295
let cp_ready = status.control_plane_ready.filter(|&ready| ready);
295296
let ready_condition = status.conditions?.iter().find_map(|c| {
296-
(c.type_ == CONTROLPLANE_READY_CONDITION && c.status == "True").then_some(true)
297+
(c.type_ == CONTROLPLANE_INITIALIZED_CONDITION && c.status == "True").then_some(true)
297298
});
298299

299300
ready_condition.or(cp_ready).map(|_| self)

0 commit comments

Comments
 (0)