@@ -42,48 +42,56 @@ func (s *Service) ReconcileNetwork() (err error) {
4242 conditions .MarkFalse (s .scope .InfraCluster (), infrav1 .SecondaryCidrsReadyCondition , infrav1 .SecondaryCidrReconciliationFailedReason , infrautilconditions .ErrorConditionAfterInit (s .scope .ClusterObj ()), "%s" , err .Error ())
4343 return err
4444 }
45+ conditions .MarkTrue (s .scope .InfraCluster (), infrav1 .SecondaryCidrsReadyCondition )
4546
4647 // Subnets.
4748 if err := s .reconcileSubnets (); err != nil {
4849 conditions .MarkFalse (s .scope .InfraCluster (), infrav1 .SubnetsReadyCondition , infrav1 .SubnetsReconciliationFailedReason , infrautilconditions .ErrorConditionAfterInit (s .scope .ClusterObj ()), "%s" , err .Error ())
4950 return err
5051 }
52+ conditions .MarkTrue (s .scope .InfraCluster (), infrav1 .SubnetsReadyCondition )
5153
5254 // Internet Gateways.
5355 if err := s .reconcileInternetGateways (); err != nil {
5456 conditions .MarkFalse (s .scope .InfraCluster (), infrav1 .InternetGatewayReadyCondition , infrav1 .InternetGatewayFailedReason , infrautilconditions .ErrorConditionAfterInit (s .scope .ClusterObj ()), "%s" , err .Error ())
5557 return err
5658 }
59+ conditions .MarkTrue (s .scope .InfraCluster (), infrav1 .InternetGatewayReadyCondition )
5760
5861 // Carrier Gateway.
5962 if err := s .reconcileCarrierGateway (); err != nil {
6063 conditions .MarkFalse (s .scope .InfraCluster (), infrav1 .CarrierGatewayReadyCondition , infrav1 .CarrierGatewayFailedReason , infrautilconditions .ErrorConditionAfterInit (s .scope .ClusterObj ()), "%s" , err .Error ())
6164 return err
6265 }
66+ conditions .MarkTrue (s .scope .InfraCluster (), infrav1 .CarrierGatewayReadyCondition )
6367
6468 // Egress Only Internet Gateways.
6569 if err := s .reconcileEgressOnlyInternetGateways (); err != nil {
6670 conditions .MarkFalse (s .scope .InfraCluster (), infrav1 .EgressOnlyInternetGatewayReadyCondition , infrav1 .EgressOnlyInternetGatewayFailedReason , infrautilconditions .ErrorConditionAfterInit (s .scope .ClusterObj ()), "%s" , err .Error ())
6771 return err
6872 }
73+ conditions .MarkTrue (s .scope .InfraCluster (), infrav1 .EgressOnlyInternetGatewayReadyCondition )
6974
7075 // NAT Gateways.
7176 if err := s .reconcileNatGateways (); err != nil {
7277 conditions .MarkFalse (s .scope .InfraCluster (), infrav1 .NatGatewaysReadyCondition , infrav1 .NatGatewaysReconciliationFailedReason , infrautilconditions .ErrorConditionAfterInit (s .scope .ClusterObj ()), "%s" , err .Error ())
7378 return err
7479 }
80+ conditions .MarkTrue (s .scope .InfraCluster (), infrav1 .NatGatewaysReadyCondition )
7581
7682 // Routing tables.
7783 if err := s .reconcileRouteTables (); err != nil {
7884 conditions .MarkFalse (s .scope .InfraCluster (), infrav1 .RouteTablesReadyCondition , infrav1 .RouteTableReconciliationFailedReason , infrautilconditions .ErrorConditionAfterInit (s .scope .ClusterObj ()), "%s" , err .Error ())
7985 return err
8086 }
87+ conditions .MarkTrue (s .scope .InfraCluster (), infrav1 .RouteTablesReadyCondition )
8188
8289 // VPC Endpoints.
8390 if err := s .reconcileVPCEndpoints (); err != nil {
8491 conditions .MarkFalse (s .scope .InfraCluster (), infrav1 .VpcEndpointsReadyCondition , infrav1 .VpcEndpointsReconciliationFailedReason , infrautilconditions .ErrorConditionAfterInit (s .scope .ClusterObj ()), "%s" , err .Error ())
8592 return err
8693 }
94+ conditions .MarkTrue (s .scope .InfraCluster (), infrav1 .VpcEndpointsReadyCondition )
8795
8896 s .scope .Debug ("Reconcile network completed successfully" )
8997 return nil
0 commit comments