@@ -42,48 +42,56 @@ func (s *Service) ReconcileNetwork() (err error) {
42
42
conditions .MarkFalse (s .scope .InfraCluster (), infrav1 .SecondaryCidrsReadyCondition , infrav1 .SecondaryCidrReconciliationFailedReason , infrautilconditions .ErrorConditionAfterInit (s .scope .ClusterObj ()), "%s" , err .Error ())
43
43
return err
44
44
}
45
+ conditions .MarkTrue (s .scope .InfraCluster (), infrav1 .SecondaryCidrsReadyCondition )
45
46
46
47
// Subnets.
47
48
if err := s .reconcileSubnets (); err != nil {
48
49
conditions .MarkFalse (s .scope .InfraCluster (), infrav1 .SubnetsReadyCondition , infrav1 .SubnetsReconciliationFailedReason , infrautilconditions .ErrorConditionAfterInit (s .scope .ClusterObj ()), "%s" , err .Error ())
49
50
return err
50
51
}
52
+ conditions .MarkTrue (s .scope .InfraCluster (), infrav1 .SubnetsReadyCondition )
51
53
52
54
// Internet Gateways.
53
55
if err := s .reconcileInternetGateways (); err != nil {
54
56
conditions .MarkFalse (s .scope .InfraCluster (), infrav1 .InternetGatewayReadyCondition , infrav1 .InternetGatewayFailedReason , infrautilconditions .ErrorConditionAfterInit (s .scope .ClusterObj ()), "%s" , err .Error ())
55
57
return err
56
58
}
59
+ conditions .MarkTrue (s .scope .InfraCluster (), infrav1 .InternetGatewayReadyCondition )
57
60
58
61
// Carrier Gateway.
59
62
if err := s .reconcileCarrierGateway (); err != nil {
60
63
conditions .MarkFalse (s .scope .InfraCluster (), infrav1 .CarrierGatewayReadyCondition , infrav1 .CarrierGatewayFailedReason , infrautilconditions .ErrorConditionAfterInit (s .scope .ClusterObj ()), "%s" , err .Error ())
61
64
return err
62
65
}
66
+ conditions .MarkTrue (s .scope .InfraCluster (), infrav1 .CarrierGatewayReadyCondition )
63
67
64
68
// Egress Only Internet Gateways.
65
69
if err := s .reconcileEgressOnlyInternetGateways (); err != nil {
66
70
conditions .MarkFalse (s .scope .InfraCluster (), infrav1 .EgressOnlyInternetGatewayReadyCondition , infrav1 .EgressOnlyInternetGatewayFailedReason , infrautilconditions .ErrorConditionAfterInit (s .scope .ClusterObj ()), "%s" , err .Error ())
67
71
return err
68
72
}
73
+ conditions .MarkTrue (s .scope .InfraCluster (), infrav1 .EgressOnlyInternetGatewayReadyCondition )
69
74
70
75
// NAT Gateways.
71
76
if err := s .reconcileNatGateways (); err != nil {
72
77
conditions .MarkFalse (s .scope .InfraCluster (), infrav1 .NatGatewaysReadyCondition , infrav1 .NatGatewaysReconciliationFailedReason , infrautilconditions .ErrorConditionAfterInit (s .scope .ClusterObj ()), "%s" , err .Error ())
73
78
return err
74
79
}
80
+ conditions .MarkTrue (s .scope .InfraCluster (), infrav1 .NatGatewaysReadyCondition )
75
81
76
82
// Routing tables.
77
83
if err := s .reconcileRouteTables (); err != nil {
78
84
conditions .MarkFalse (s .scope .InfraCluster (), infrav1 .RouteTablesReadyCondition , infrav1 .RouteTableReconciliationFailedReason , infrautilconditions .ErrorConditionAfterInit (s .scope .ClusterObj ()), "%s" , err .Error ())
79
85
return err
80
86
}
87
+ conditions .MarkTrue (s .scope .InfraCluster (), infrav1 .RouteTablesReadyCondition )
81
88
82
89
// VPC Endpoints.
83
90
if err := s .reconcileVPCEndpoints (); err != nil {
84
91
conditions .MarkFalse (s .scope .InfraCluster (), infrav1 .VpcEndpointsReadyCondition , infrav1 .VpcEndpointsReconciliationFailedReason , infrautilconditions .ErrorConditionAfterInit (s .scope .ClusterObj ()), "%s" , err .Error ())
85
92
return err
86
93
}
94
+ conditions .MarkTrue (s .scope .InfraCluster (), infrav1 .VpcEndpointsReadyCondition )
87
95
88
96
s .scope .Debug ("Reconcile network completed successfully" )
89
97
return nil
0 commit comments