@@ -106,7 +106,7 @@ func (r *MachinePoolReconciler) reconcilePhase(mp *expv1.MachinePool) {
106
106
}
107
107
108
108
// reconcileExternal handles generic unstructured objects referenced by a MachinePool.
109
- func (r * MachinePoolReconciler ) reconcileExternal (ctx context.Context , cluster * clusterv1. Cluster , m * expv1.MachinePool , ref * corev1.ObjectReference ) (external.ReconcileOutput , error ) {
109
+ func (r * MachinePoolReconciler ) reconcileExternal (ctx context.Context , m * expv1.MachinePool , ref * corev1.ObjectReference ) (external.ReconcileOutput , error ) {
110
110
log := ctrl .LoggerFrom (ctx )
111
111
112
112
if err := utilconversion .UpdateReferenceAPIContract (ctx , r .Client , ref ); err != nil {
@@ -127,12 +127,6 @@ func (r *MachinePoolReconciler) reconcileExternal(ctx context.Context, cluster *
127
127
return external.ReconcileOutput {}, err
128
128
}
129
129
130
- // if external ref is paused, return error.
131
- if annotations .IsPaused (cluster , obj ) {
132
- log .V (3 ).Info ("External object referenced is paused" )
133
- return external.ReconcileOutput {Paused : true }, nil
134
- }
135
-
136
130
// Initialize the patch helper.
137
131
patchHelper , err := patch .NewHelper (obj , r .Client )
138
132
if err != nil {
@@ -179,19 +173,14 @@ func (r *MachinePoolReconciler) reconcileExternal(ctx context.Context, cluster *
179
173
// reconcileBootstrap reconciles the Spec.Bootstrap.ConfigRef object on a MachinePool.
180
174
func (r * MachinePoolReconciler ) reconcileBootstrap (ctx context.Context , s * scope ) (ctrl.Result , error ) {
181
175
log := ctrl .LoggerFrom (ctx )
182
- cluster := s .cluster
183
176
m := s .machinePool
184
177
// Call generic external reconciler if we have an external reference.
185
178
var bootstrapConfig * unstructured.Unstructured
186
179
if m .Spec .Template .Spec .Bootstrap .ConfigRef != nil {
187
- bootstrapReconcileResult , err := r .reconcileExternal (ctx , cluster , m , m .Spec .Template .Spec .Bootstrap .ConfigRef )
180
+ bootstrapReconcileResult , err := r .reconcileExternal (ctx , m , m .Spec .Template .Spec .Bootstrap .ConfigRef )
188
181
if err != nil {
189
182
return ctrl.Result {}, err
190
183
}
191
- // if the external object is paused, return without any further processing
192
- if bootstrapReconcileResult .Paused {
193
- return ctrl.Result {}, nil
194
- }
195
184
bootstrapConfig = bootstrapReconcileResult .Result
196
185
197
186
// If the bootstrap config is being deleted, return early.
@@ -247,7 +236,7 @@ func (r *MachinePoolReconciler) reconcileInfrastructure(ctx context.Context, s *
247
236
cluster := s .cluster
248
237
mp := s .machinePool
249
238
// Call generic external reconciler.
250
- infraReconcileResult , err := r .reconcileExternal (ctx , cluster , mp , & mp .Spec .Template .Spec .InfrastructureRef )
239
+ infraReconcileResult , err := r .reconcileExternal (ctx , mp , & mp .Spec .Template .Spec .InfrastructureRef )
251
240
if err != nil {
252
241
if apierrors .IsNotFound (errors .Cause (err )) {
253
242
log .Error (err , "infrastructure reference could not be found" )
@@ -262,10 +251,6 @@ func (r *MachinePoolReconciler) reconcileInfrastructure(ctx context.Context, s *
262
251
}
263
252
return ctrl.Result {}, err
264
253
}
265
- // if the external object is paused, return without any further processing
266
- if infraReconcileResult .Paused {
267
- return ctrl.Result {}, nil
268
- }
269
254
infraConfig := infraReconcileResult .Result
270
255
271
256
if ! infraConfig .GetDeletionTimestamp ().IsZero () {
0 commit comments