@@ -480,6 +480,44 @@ func (r *HostedClusterReconciler) reconcile(ctx context.Context, req ctrl.Reques
480
480
meta .SetStatusCondition (& hcluster .Status .Conditions , * condition )
481
481
}
482
482
483
+ // Copy the EtcdAvailable condition on the hostedcontrolplane.
484
+ {
485
+ condition := & metav1.Condition {
486
+ Type : string (hyperv1 .EtcdAvailable ),
487
+ Status : metav1 .ConditionUnknown ,
488
+ Reason : hyperv1 .StatusUnknownReason ,
489
+ Message : "The hosted control plane is not found" ,
490
+ ObservedGeneration : hcluster .Generation ,
491
+ }
492
+ if hcp != nil {
493
+ etcdCondition := meta .FindStatusCondition (hcp .Status .Conditions , string (hyperv1 .EtcdAvailable ))
494
+ if etcdCondition != nil {
495
+ condition = etcdCondition
496
+ }
497
+ }
498
+ condition .ObservedGeneration = hcluster .Generation
499
+ meta .SetStatusCondition (& hcluster .Status .Conditions , * condition )
500
+ }
501
+
502
+ // Copy the KubeAPIServerAvailable condition on the hostedcontrolplane.
503
+ {
504
+ condition := & metav1.Condition {
505
+ Type : string (hyperv1 .KubeAPIServerAvailable ),
506
+ Status : metav1 .ConditionUnknown ,
507
+ Reason : hyperv1 .StatusUnknownReason ,
508
+ Message : "The hosted control plane is not found" ,
509
+ ObservedGeneration : hcluster .Generation ,
510
+ }
511
+ if hcp != nil {
512
+ etcdCondition := meta .FindStatusCondition (hcp .Status .Conditions , string (hyperv1 .KubeAPIServerAvailable ))
513
+ if etcdCondition != nil {
514
+ condition = etcdCondition
515
+ }
516
+ }
517
+ condition .ObservedGeneration = hcluster .Generation
518
+ meta .SetStatusCondition (& hcluster .Status .Conditions , * condition )
519
+ }
520
+
483
521
// Copy the InfrastructureReady condition on the hostedcontrolplane.
484
522
{
485
523
condition := & metav1.Condition {
0 commit comments