Skip to content

Commit 6dee98a

Browse files
authored
Merge pull request #843 from devigned/fix-unpause
🐛 fix group, version, kind not being passed into util.ClusterToObjectsMapper
2 parents d128777 + 58033d2 commit 6dee98a

24 files changed

+783
-290
lines changed

cloud/services/loadbalancers/loadbalancers_test.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,24 @@ import (
2222
"testing"
2323

2424
"github.com/Azure/go-autorest/autorest/to"
25+
2526
"sigs.k8s.io/cluster-api-provider-azure/cloud/services/subnets/mock_subnets"
2627
"sigs.k8s.io/cluster-api-provider-azure/cloud/services/virtualnetworks/mock_virtualnetworks"
27-
"sigs.k8s.io/cluster-api-provider-azure/internal/test/matchers"
28+
gomockinternal "sigs.k8s.io/cluster-api-provider-azure/internal/test/matchers/gomock"
2829

2930
"k8s.io/klog/klogr"
31+
3032
azure "sigs.k8s.io/cluster-api-provider-azure/cloud"
3133

3234
"github.com/Azure/go-autorest/autorest"
3335
"github.com/golang/mock/gomock"
3436
. "github.com/onsi/gomega"
37+
3538
"sigs.k8s.io/cluster-api-provider-azure/cloud/services/loadbalancers/mock_loadbalancers"
3639
"sigs.k8s.io/cluster-api-provider-azure/cloud/services/publicips/mock_publicips"
3740

3841
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network"
42+
3943
infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha3"
4044
)
4145

@@ -125,7 +129,7 @@ func TestReconcileLoadBalancer(t *testing.T) {
125129
s.AdditionalTags().AnyTimes().Return(infrav1.Tags{})
126130
gomock.InOrder(
127131
mPublicIP.Get(context.TODO(), "my-rg", "my-publicip").Return(network.PublicIPAddress{Name: to.StringPtr("my-publicip")}, nil),
128-
m.CreateOrUpdate(context.TODO(), "my-rg", "my-publiclb", matchers.DiffEq(network.LoadBalancer{
132+
m.CreateOrUpdate(context.TODO(), "my-rg", "my-publiclb", gomockinternal.DiffEq(network.LoadBalancer{
129133
Tags: map[string]*string{
130134
"sigs.k8s.io_cluster-api-provider-azure_cluster_my-cluster": to.StringPtr("owned"),
131135
"sigs.k8s.io_cluster-api-provider-azure_role": to.StringPtr(infrav1.APIServerRole),
@@ -221,7 +225,7 @@ func TestReconcileLoadBalancer(t *testing.T) {
221225
s.AdditionalTags().AnyTimes().Return(infrav1.Tags{})
222226
gomock.InOrder(
223227
mPublicIP.Get(context.TODO(), "my-rg", "outbound-publicip").Return(network.PublicIPAddress{Name: to.StringPtr("outbound-publicip")}, nil),
224-
m.CreateOrUpdate(context.TODO(), "my-rg", "cluster-name", matchers.DiffEq(network.LoadBalancer{
228+
m.CreateOrUpdate(context.TODO(), "my-rg", "cluster-name", gomockinternal.DiffEq(network.LoadBalancer{
225229
Tags: map[string]*string{
226230
"sigs.k8s.io_cluster-api-provider-azure_cluster_cluster-name": to.StringPtr("owned"),
227231
"sigs.k8s.io_cluster-api-provider-azure_role": to.StringPtr(infrav1.NodeOutboundRole),
@@ -355,7 +359,7 @@ func TestReconcileLoadBalancer(t *testing.T) {
355359
},
356360
}}}, nil)
357361
mSubnet.Get(context.TODO(), "my-rg", "my-vnet", "my-subnet").Return(network.Subnet{}, nil)
358-
m.CreateOrUpdate(context.TODO(), "my-rg", "my-lb", matchers.DiffEq(network.LoadBalancer{
362+
m.CreateOrUpdate(context.TODO(), "my-rg", "my-lb", gomockinternal.DiffEq(network.LoadBalancer{
359363
Sku: &network.LoadBalancerSku{Name: network.LoadBalancerSkuNameStandard},
360364
Location: to.StringPtr("testlocation"),
361365
Tags: map[string]*string{

cloud/services/networkinterfaces/networkinterfaces_test.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@ import (
2424

2525
infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha3"
2626
azure "sigs.k8s.io/cluster-api-provider-azure/cloud"
27-
"sigs.k8s.io/cluster-api-provider-azure/internal/test/matchers"
27+
gomockinternal "sigs.k8s.io/cluster-api-provider-azure/internal/test/matchers/gomock"
2828

2929
"github.com/Azure/go-autorest/autorest"
3030
"github.com/Azure/go-autorest/autorest/to"
3131
"github.com/golang/mock/gomock"
3232
"github.com/google/go-cmp/cmp"
3333
. "github.com/onsi/gomega"
34+
3435
"sigs.k8s.io/cluster-api-provider-azure/cloud/services/loadbalancers/mock_loadbalancers"
3536
"sigs.k8s.io/cluster-api-provider-azure/cloud/services/networkinterfaces/mock_networkinterfaces"
3637
"sigs.k8s.io/cluster-api-provider-azure/cloud/services/publicips/mock_publicips"
@@ -140,7 +141,7 @@ func TestReconcileNetworkInterface(t *testing.T) {
140141
gomock.InOrder(
141142
mSubnet.Get(context.TODO(), "my-rg", "my-vnet", "my-subnet").Return(network.Subnet{}, nil),
142143
mLoadBalancer.Get(context.TODO(), "my-rg", "my-public-lb").Return(getFakeNodeOutboundLoadBalancer(), nil),
143-
m.CreateOrUpdate(context.TODO(), "my-rg", "my-net-interface", matchers.DiffEq(network.Interface{
144+
m.CreateOrUpdate(context.TODO(), "my-rg", "my-net-interface", gomockinternal.DiffEq(network.Interface{
144145
Location: to.StringPtr("fake-location"),
145146
InterfacePropertiesFormat: &network.InterfacePropertiesFormat{
146147
EnableAcceleratedNetworking: to.BoolPtr(true),
@@ -187,7 +188,7 @@ func TestReconcileNetworkInterface(t *testing.T) {
187188
gomock.InOrder(
188189
mSubnet.Get(context.TODO(), "my-rg", "my-vnet", "my-subnet").Return(network.Subnet{}, nil),
189190
mLoadBalancer.Get(context.TODO(), "my-rg", "my-public-lb").Return(getFakeNodeOutboundLoadBalancer(), nil),
190-
m.CreateOrUpdate(context.TODO(), "my-rg", "my-net-interface", matchers.DiffEq(network.Interface{
191+
m.CreateOrUpdate(context.TODO(), "my-rg", "my-net-interface", gomockinternal.DiffEq(network.Interface{
191192
Location: to.StringPtr("fake-location"),
192193
InterfacePropertiesFormat: &network.InterfacePropertiesFormat{
193194
EnableAcceleratedNetworking: to.BoolPtr(true),
@@ -261,7 +262,7 @@ func TestReconcileNetworkInterface(t *testing.T) {
261262
},
262263
},
263264
}}, nil),
264-
m.CreateOrUpdate(context.TODO(), "my-rg", "my-net-interface", matchers.DiffEq(network.Interface{
265+
m.CreateOrUpdate(context.TODO(), "my-rg", "my-net-interface", gomockinternal.DiffEq(network.Interface{
265266
Location: to.StringPtr("fake-location"),
266267
InterfacePropertiesFormat: &network.InterfacePropertiesFormat{
267268
EnableAcceleratedNetworking: to.BoolPtr(true),
@@ -452,7 +453,7 @@ func TestReconcileNetworkInterface(t *testing.T) {
452453
gomock.InOrder(
453454
mSubnet.Get(context.TODO(), "my-rg", "my-vnet", "my-subnet").Return(network.Subnet{}, nil),
454455
mLoadBalancer.Get(context.TODO(), "my-rg", "my-public-lb").Return(getFakeNodeOutboundLoadBalancer(), nil),
455-
m.CreateOrUpdate(context.TODO(), "my-rg", "my-net-interface", matchers.DiffEq(network.Interface{
456+
m.CreateOrUpdate(context.TODO(), "my-rg", "my-net-interface", gomockinternal.DiffEq(network.Interface{
456457
Location: to.StringPtr("fake-location"),
457458
InterfacePropertiesFormat: &network.InterfacePropertiesFormat{
458459
EnableAcceleratedNetworking: to.BoolPtr(true),
@@ -501,7 +502,7 @@ func TestReconcileNetworkInterface(t *testing.T) {
501502
gomock.InOrder(
502503
mSubnet.Get(context.TODO(), "my-rg", "my-vnet", "my-subnet").Return(network.Subnet{}, nil),
503504
mLoadBalancer.Get(context.TODO(), "my-rg", "my-public-lb").Return(getFakeNodeOutboundLoadBalancer(), nil),
504-
m.CreateOrUpdate(context.TODO(), "my-rg", "my-net-interface", matchers.DiffEq(network.Interface{
505+
m.CreateOrUpdate(context.TODO(), "my-rg", "my-net-interface", gomockinternal.DiffEq(network.Interface{
505506
Location: to.StringPtr("fake-location"),
506507
InterfacePropertiesFormat: &network.InterfacePropertiesFormat{
507508
EnableAcceleratedNetworking: to.BoolPtr(false),

cloud/services/scalesets/vmss_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import (
4242
"sigs.k8s.io/cluster-api-provider-azure/cloud/services/resourceskus"
4343
"sigs.k8s.io/cluster-api-provider-azure/cloud/services/scalesets/mock_scalesets"
4444
infrav1exp "sigs.k8s.io/cluster-api-provider-azure/exp/api/v1alpha3"
45-
"sigs.k8s.io/cluster-api-provider-azure/internal/test/matchers"
45+
gomockinternal "sigs.k8s.io/cluster-api-provider-azure/internal/test/matchers/gomock"
4646
)
4747

4848
func init() {
@@ -394,7 +394,7 @@ func TestService_Reconcile(t *testing.T) {
394394

395395
lbMock.EXPECT().Get(gomock.Any(), scope.AzureCluster.Spec.ResourceGroup, spec.ClusterName).Return(getFakeNodeOutboundLoadBalancer(), nil)
396396
vmssMock.EXPECT().Get(gomock.Any(), scope.AzureCluster.Spec.ResourceGroup, spec.Name).Return(compute.VirtualMachineScaleSet{}, autorest.NewErrorWithResponse("", "", &http.Response{StatusCode: 404}, "Not found"))
397-
vmssMock.EXPECT().CreateOrUpdate(gomock.Any(), scope.AzureCluster.Spec.ResourceGroup, spec.Name, matchers.DiffEq(vmss)).Return(nil)
397+
vmssMock.EXPECT().CreateOrUpdate(gomock.Any(), scope.AzureCluster.Spec.ResourceGroup, spec.Name, gomockinternal.DiffEq(vmss)).Return(nil)
398398

399399
return mockCtrl
400400
},
@@ -529,7 +529,7 @@ func TestService_Reconcile(t *testing.T) {
529529

530530
lbMock.EXPECT().Get(gomock.Any(), scope.AzureCluster.Spec.ResourceGroup, spec.ClusterName).Return(getFakeNodeOutboundLoadBalancer(), nil)
531531
vmssMock.EXPECT().Get(gomock.Any(), scope.AzureCluster.Spec.ResourceGroup, spec.Name).Return(compute.VirtualMachineScaleSet{}, autorest.NewErrorWithResponse("", "", &http.Response{StatusCode: 404}, "Not found"))
532-
vmssMock.EXPECT().CreateOrUpdate(gomock.Any(), scope.AzureCluster.Spec.ResourceGroup, spec.Name, matchers.DiffEq(vmss)).Return(nil)
532+
vmssMock.EXPECT().CreateOrUpdate(gomock.Any(), scope.AzureCluster.Spec.ResourceGroup, spec.Name, gomockinternal.DiffEq(vmss)).Return(nil)
533533

534534
return mockCtrl
535535
},
@@ -715,7 +715,7 @@ func TestService_Reconcile(t *testing.T) {
715715

716716
lbMock.EXPECT().Get(gomock.Any(), scope.AzureCluster.Spec.ResourceGroup, spec.ClusterName).Return(getFakeNodeOutboundLoadBalancer(), nil)
717717
vmssMock.EXPECT().Get(gomock.Any(), scope.AzureCluster.Spec.ResourceGroup, spec.Name).Return(vmss, nil)
718-
vmssMock.EXPECT().Update(gomock.Any(), scope.AzureCluster.Spec.ResourceGroup, spec.Name, matchers.DiffEq(update)).Return(nil)
718+
vmssMock.EXPECT().Update(gomock.Any(), scope.AzureCluster.Spec.ResourceGroup, spec.Name, gomockinternal.DiffEq(update)).Return(nil)
719719

720720
return mockCtrl
721721
},

cloud/services/securitygroups/securitygroups_test.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,24 @@ package securitygroups
1818

1919
import (
2020
"context"
21+
"net/http"
22+
"testing"
23+
2124
"github.com/Azure/go-autorest/autorest/to"
2225
"k8s.io/klog/klogr"
23-
"net/http"
26+
2427
azure "sigs.k8s.io/cluster-api-provider-azure/cloud"
25-
"sigs.k8s.io/cluster-api-provider-azure/internal/test/matchers"
26-
"testing"
28+
gomockinternal "sigs.k8s.io/cluster-api-provider-azure/internal/test/matchers/gomock"
2729

2830
. "github.com/onsi/gomega"
31+
2932
"sigs.k8s.io/cluster-api-provider-azure/cloud/services/securitygroups/mock_securitygroups"
3033

3134
"github.com/Azure/go-autorest/autorest"
3235
"github.com/golang/mock/gomock"
3336

3437
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network"
38+
3539
infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha3"
3640
)
3741

@@ -79,7 +83,7 @@ func TestReconcileSecurityGroups(t *testing.T) {
7983
s.Location().AnyTimes().Return("test-location")
8084
s.V(gomock.AssignableToTypeOf(2)).AnyTimes().Return(klogr.New())
8185
m.Get(context.TODO(), "my-rg", "nsg-one").Return(network.SecurityGroup{}, autorest.NewErrorWithResponse("", "", &http.Response{StatusCode: 404}, "Not found"))
82-
m.CreateOrUpdate(context.TODO(), "my-rg", "nsg-one", matchers.DiffEq(network.SecurityGroup{
86+
m.CreateOrUpdate(context.TODO(), "my-rg", "nsg-one", gomockinternal.DiffEq(network.SecurityGroup{
8387
SecurityGroupPropertiesFormat: &network.SecurityGroupPropertiesFormat{
8488
SecurityRules: &[]network.SecurityRule{
8589
{
@@ -116,7 +120,7 @@ func TestReconcileSecurityGroups(t *testing.T) {
116120
Location: to.StringPtr("test-location"),
117121
}))
118122
m.Get(context.TODO(), "my-rg", "nsg-two").Return(network.SecurityGroup{}, autorest.NewErrorWithResponse("", "", &http.Response{StatusCode: 404}, "Not found"))
119-
m.CreateOrUpdate(context.TODO(), "my-rg", "nsg-two", matchers.DiffEq(network.SecurityGroup{
123+
m.CreateOrUpdate(context.TODO(), "my-rg", "nsg-two", gomockinternal.DiffEq(network.SecurityGroup{
120124
SecurityGroupPropertiesFormat: &network.SecurityGroupPropertiesFormat{
121125
SecurityRules: &[]network.SecurityRule{},
122126
},
@@ -176,7 +180,7 @@ func TestReconcileSecurityGroups(t *testing.T) {
176180
ID: to.StringPtr("fake/nsg/id"),
177181
Name: to.StringPtr("nsg-one"),
178182
}, nil)
179-
m.CreateOrUpdate(context.TODO(), "my-rg", "nsg-one", matchers.DiffEq(network.SecurityGroup{
183+
m.CreateOrUpdate(context.TODO(), "my-rg", "nsg-one", gomockinternal.DiffEq(network.SecurityGroup{
180184
SecurityGroupPropertiesFormat: &network.SecurityGroupPropertiesFormat{
181185
SecurityRules: &[]network.SecurityRule{
182186
{

cloud/services/virtualmachines/virtualmachines_test.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,18 @@ package virtualmachines
1818

1919
import (
2020
"context"
21+
"net/http"
22+
"testing"
23+
2124
corev1 "k8s.io/api/core/v1"
2225
"k8s.io/klog/klogr"
23-
"net/http"
26+
2427
infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha3"
2528
azure "sigs.k8s.io/cluster-api-provider-azure/cloud"
26-
"sigs.k8s.io/cluster-api-provider-azure/internal/test/matchers"
27-
"testing"
29+
gomockinternal "sigs.k8s.io/cluster-api-provider-azure/internal/test/matchers/gomock"
2830

2931
. "github.com/onsi/gomega"
32+
3033
"sigs.k8s.io/cluster-api-provider-azure/cloud/services/networkinterfaces/mock_networkinterfaces"
3134
"sigs.k8s.io/cluster-api-provider-azure/cloud/services/publicips/mock_publicips"
3235
"sigs.k8s.io/cluster-api-provider-azure/cloud/services/virtualmachines/mock_virtualmachines"
@@ -334,7 +337,7 @@ func TestReconcileVM(t *testing.T) {
334337
},
335338
}, nil)
336339
s.GetBootstrapData(context.TODO()).Return("fake-bootstrap-data", nil)
337-
m.CreateOrUpdate(context.TODO(), "my-rg", "my-vm", matchers.DiffEq(compute.VirtualMachine{
340+
m.CreateOrUpdate(context.TODO(), "my-rg", "my-vm", gomockinternal.DiffEq(compute.VirtualMachine{
338341
VirtualMachineProperties: &compute.VirtualMachineProperties{
339342
HardwareProfile: &compute.HardwareProfile{VMSize: "Standard_D2v3"},
340343
StorageProfile: &compute.StorageProfile{

controllers/azurecluster_controller.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@ type AzureClusterReconciler struct {
5151
}
5252

5353
func (r *AzureClusterReconciler) SetupWithManager(mgr ctrl.Manager, options controller.Options) error {
54+
log := r.Log.WithValues("controller", "AzureCluster")
5455
c, err := ctrl.NewControllerManagedBy(mgr).
5556
WithOptions(options).
5657
For(&infrav1.AzureCluster{}).
57-
WithEventFilter(predicates.ResourceNotPaused(r.Log)). // don't queue reconcile if resource is paused
58+
WithEventFilter(predicates.ResourceNotPaused(log)). // don't queue reconcile if resource is paused
5859
Build(r)
5960
if err != nil {
6061
return errors.Wrapf(err, "error creating controller")
@@ -66,7 +67,7 @@ func (r *AzureClusterReconciler) SetupWithManager(mgr ctrl.Manager, options cont
6667
&handler.EnqueueRequestsFromMapFunc{
6768
ToRequests: util.ClusterToInfrastructureMapFunc(infrav1.GroupVersion.WithKind("AzureCluster")),
6869
},
69-
predicates.ClusterUnpaused(r.Log),
70+
predicates.ClusterUnpaused(log),
7071
); err != nil {
7172
return errors.Wrapf(err, "failed adding a watch for ready clusters")
7273
}

controllers/azurecluster_controller_test.go

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import (
2525
. "github.com/onsi/ginkgo"
2626
. "github.com/onsi/gomega"
2727
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
28-
clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha3"
2928
ctrl "sigs.k8s.io/controller-runtime"
3029
"sigs.k8s.io/controller-runtime/pkg/client"
3130

@@ -97,66 +96,5 @@ var _ = Describe("AzureClusterReconciler", func() {
9796
Expect(err).To(HaveOccurred())
9897
Expect(err.Error()).To(Or(Equal("context deadline exceeded"), Equal("rate: Wait(n=1) would exceed context deadline")))
9998
})
100-
101-
It("should skip reconciliation if cluster is paused", func() {
102-
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
103-
defer cancel()
104-
105-
logListener := record.NewListener(testEnv.LogRecorder)
106-
del := logListener.Listen()
107-
defer del()
108-
109-
clusterName := test.RandomName("foo", 10)
110-
cluster := &clusterv1.Cluster{
111-
ObjectMeta: metav1.ObjectMeta{
112-
Name: clusterName,
113-
Namespace: "default",
114-
},
115-
Spec: clusterv1.ClusterSpec{
116-
Paused: true,
117-
},
118-
}
119-
Expect(testEnv.Create(ctx, cluster)).To(Succeed())
120-
defer func() {
121-
err := testEnv.Delete(ctx, cluster)
122-
Expect(err).NotTo(HaveOccurred())
123-
}()
124-
125-
azClusterName := test.RandomName("foo", 10)
126-
azCluster := &infrav1.AzureCluster{
127-
ObjectMeta: metav1.ObjectMeta{
128-
Name: azClusterName,
129-
Namespace: "default",
130-
OwnerReferences: []metav1.OwnerReference{
131-
{
132-
APIVersion: clusterv1.GroupVersion.String(),
133-
Kind: "Cluster",
134-
Name: cluster.Name,
135-
UID: cluster.GetUID(),
136-
},
137-
},
138-
},
139-
}
140-
Expect(testEnv.Create(ctx, azCluster)).To(Succeed())
141-
defer func() {
142-
err := testEnv.Delete(ctx, azCluster)
143-
Expect(err).NotTo(HaveOccurred())
144-
}()
145-
146-
Eventually(logListener.GetEntries).Should(ContainElement(
147-
record.LogEntry{
148-
LogFunc: "Info",
149-
Values: []interface{}{
150-
"namespace",
151-
cluster.Namespace,
152-
"AzureCluster",
153-
azCluster.Name,
154-
"cluster",
155-
cluster.Name,
156-
"msg",
157-
"AzureCluster or linked Cluster is marked as paused. Won't reconcile",
158-
},
159-
}))
160-
})
16199
})
162100
})

controllers/azuremachine_controller.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,17 @@ type AzureMachineReconciler struct {
5353
}
5454

5555
func (r *AzureMachineReconciler) SetupWithManager(mgr ctrl.Manager, options controller.Options) error {
56+
log := r.Log.WithValues("controller", "AzureMachine")
5657
// create mapper to transform incoming AzureClusters into AzureMachine requests
57-
azureClusterToAzureMachinesMapper, err := AzureClusterToAzureMachinesMapper(r.Client, mgr.GetScheme(), r.Log)
58+
azureClusterToAzureMachinesMapper, err := AzureClusterToAzureMachinesMapper(r.Client, mgr.GetScheme(), log)
5859
if err != nil {
5960
return errors.Wrapf(err, "failed to create AzureCluster to AzureMachines mapper")
6061
}
6162

6263
c, err := ctrl.NewControllerManagedBy(mgr).
6364
WithOptions(options).
6465
For(&infrav1.AzureMachine{}).
65-
WithEventFilter(predicates.ResourceNotPaused(r.Log)). // don't queue reconcile if resource is paused
66+
WithEventFilter(predicates.ResourceNotPaused(log)). // don't queue reconcile if resource is paused
6667
// watch for changes in CAPI Machine resources
6768
Watches(
6869
&source.Kind{Type: &clusterv1.Machine{}},
@@ -93,7 +94,7 @@ func (r *AzureMachineReconciler) SetupWithManager(mgr ctrl.Manager, options cont
9394
&handler.EnqueueRequestsFromMapFunc{
9495
ToRequests: azureMachineMapper,
9596
},
96-
predicates.ClusterUnpausedAndInfrastructureReady(r.Log),
97+
predicates.ClusterUnpausedAndInfrastructureReady(log),
9798
); err != nil {
9899
return errors.Wrapf(err, "failed adding a watch for ready clusters")
99100
}

0 commit comments

Comments
 (0)