@@ -139,7 +139,7 @@ func (r *OscClusterReconciler) reconcile(ctx context.Context, clusterScope *scop
139139 }
140140 conditions .MarkTrue (osccluster , infrastructurev1beta2 .SubnetsReadyCondition )
141141
142- if ! clusterScope .IsInternetDisabled () {
142+ if ! clusterScope .GetSpec (). Disable . Internet {
143143 _ , err = r .reconcileInternetService (ctx , clusterScope )
144144 if err != nil {
145145 conditions .MarkFalse (osccluster , infrastructurev1beta2 .InternetServicesReadyCondition , infrastructurev1beta2 .InternetServicesFailedReason , clusterv1 .ConditionSeverityWarning , "%s" , err .Error ())
@@ -201,7 +201,7 @@ func (r *OscClusterReconciler) reconcile(ctx context.Context, clusterScope *scop
201201 }
202202 conditions .MarkTrue (osccluster , infrastructurev1beta2 .SecurityGroupReadyCondition )
203203
204- if ! clusterScope .IsLBDisabled () {
204+ if ! clusterScope .GetSpec (). Disable . Loadbalancer {
205205 _ , err = r .reconcileLoadBalancer (ctx , clusterScope )
206206 if err != nil {
207207 conditions .MarkFalse (osccluster , infrastructurev1beta2 .LoadBalancerReadyCondition , infrastructurev1beta2 .LoadBalancerFailedReason , clusterv1 .ConditionSeverityWarning , "%s" , err .Error ())
@@ -253,14 +253,14 @@ func (r *OscClusterReconciler) reconcileDelete(ctx context.Context, clusterScope
253253 }
254254 }
255255
256- if ! clusterScope .IsLBDisabled () {
256+ if ! clusterScope .GetSpec (). Disable . Loadbalancer {
257257 _ , err = r .reconcileDeleteLoadBalancer (ctx , clusterScope )
258258 if err != nil {
259259 return reconcile.Result {}, fmt .Errorf ("reconcile delete loadBalancer: %w" , err )
260260 }
261261 }
262262
263- if ! clusterScope .IsInternetDisabled () {
263+ if ! clusterScope .GetSpec (). Disable . Internet {
264264 _ , err = r .reconcileDeleteNatService (ctx , clusterScope )
265265 if err != nil {
266266 return reconcile.Result {}, fmt .Errorf ("reconcile delete natServices: %w" , err )
@@ -295,7 +295,7 @@ func (r *OscClusterReconciler) reconcileDelete(ctx context.Context, clusterScope
295295 if err != nil {
296296 return reconcile.Result {}, fmt .Errorf ("reconcile delete securityGroups: %w" , err )
297297 }
298- if ! clusterScope .IsInternetDisabled () {
298+ if ! clusterScope .GetSpec (). Disable . Internet {
299299 _ , err = r .reconcileDeleteInternetService (ctx , clusterScope )
300300 if err != nil {
301301 return reconcile.Result {}, fmt .Errorf ("reconcile delete internetServices: %w" , err )
0 commit comments