Skip to content

Commit 92b6602

Browse files
authored
Merge pull request #1208 from kubernetes-sigs/dependabot/go_modules/all-72f97f42f6
build(deps): Bump the all group with 4 updates
2 parents 1aa928b + 28734e5 commit 92b6602

File tree

15 files changed

+80
-58
lines changed

15 files changed

+80
-58
lines changed

cloud/services/compute/firewalls/reconcile.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"context"
2121

2222
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta"
23+
2324
"sigs.k8s.io/cluster-api-provider-gcp/cloud/gcperrors"
2425
"sigs.k8s.io/controller-runtime/pkg/log"
2526
)

cloud/services/compute/firewalls/service.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,18 @@ package firewalls
1919
import (
2020
"context"
2121

22+
k8scloud "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud"
2223
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta"
2324
"google.golang.org/api/compute/v1"
25+
2426
"sigs.k8s.io/cluster-api-provider-gcp/cloud"
2527
)
2628

2729
type firewallsInterface interface {
28-
Get(ctx context.Context, key *meta.Key) (*compute.Firewall, error)
29-
Insert(ctx context.Context, key *meta.Key, obj *compute.Firewall) error
30-
Update(ctx context.Context, key *meta.Key, obj *compute.Firewall) error
31-
Delete(ctx context.Context, key *meta.Key) error
30+
Get(ctx context.Context, key *meta.Key, options ...k8scloud.Option) (*compute.Firewall, error)
31+
Insert(ctx context.Context, key *meta.Key, obj *compute.Firewall, options ...k8scloud.Option) error
32+
Update(ctx context.Context, key *meta.Key, obj *compute.Firewall, options ...k8scloud.Option) error
33+
Delete(ctx context.Context, key *meta.Key, options ...k8scloud.Option) error
3234
}
3335

3436
// Scope is an interfaces that hold used methods.

cloud/services/compute/instances/reconcile.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@ import (
2020
"context"
2121
"fmt"
2222

23+
"github.com/pkg/errors"
24+
2325
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter"
2426
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta"
25-
"github.com/pkg/errors"
2627
"google.golang.org/api/compute/v1"
28+
2729
corev1 "k8s.io/api/core/v1"
2830
"k8s.io/apimachinery/pkg/util/sets"
2931
"k8s.io/utils/ptr"
3032
infrav1 "sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1"
33+
3134
"sigs.k8s.io/cluster-api-provider-gcp/cloud/gcperrors"
3235
"sigs.k8s.io/controller-runtime/pkg/log"
3336
)

cloud/services/compute/instances/reconcile_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ import (
2727
"github.com/google/go-cmp/cmp"
2828
"google.golang.org/api/compute/v1"
2929
"google.golang.org/api/googleapi"
30+
3031
corev1 "k8s.io/api/core/v1"
3132
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3233
"k8s.io/client-go/kubernetes/scheme"
3334
"k8s.io/utils/ptr"
35+
3436
infrav1 "sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1"
3537
"sigs.k8s.io/cluster-api-provider-gcp/cloud/scope"
3638
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
@@ -211,7 +213,7 @@ func TestService_createOrGetInstance(t *testing.T) {
211213
mockInstance: &cloud.MockInstances{
212214
ProjectRouter: &cloud.SingleProjectRouter{ID: "proj-id"},
213215
Objects: map[meta.Key]*cloud.MockInstancesObj{},
214-
GetHook: func(_ context.Context, _ *meta.Key, _ *cloud.MockInstances) (bool, *compute.Instance, error) {
216+
GetHook: func(_ context.Context, _ *meta.Key, _ *cloud.MockInstances, _ ...cloud.Option) (bool, *compute.Instance, error) {
215217
return true, &compute.Instance{}, &googleapi.Error{Code: http.StatusBadRequest}
216218
},
217219
},

cloud/services/compute/instances/service.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,24 @@ import (
2121

2222
"github.com/go-logr/logr"
2323

24+
k8scloud "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud"
2425
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter"
2526
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta"
2627
"google.golang.org/api/compute/v1"
28+
2729
"sigs.k8s.io/cluster-api-provider-gcp/cloud"
2830
)
2931

3032
type instancesInterface interface {
31-
Get(ctx context.Context, key *meta.Key) (*compute.Instance, error)
32-
Insert(ctx context.Context, key *meta.Key, obj *compute.Instance) error
33-
Delete(ctx context.Context, key *meta.Key) error
33+
Get(ctx context.Context, key *meta.Key, options ...k8scloud.Option) (*compute.Instance, error)
34+
Insert(ctx context.Context, key *meta.Key, obj *compute.Instance, options ...k8scloud.Option) error
35+
Delete(ctx context.Context, key *meta.Key, options ...k8scloud.Option) error
3436
}
3537

3638
type instancegroupsInterface interface {
37-
AddInstances(ctx context.Context, key *meta.Key, req *compute.InstanceGroupsAddInstancesRequest) error
38-
ListInstances(ctx context.Context, key *meta.Key, req *compute.InstanceGroupsListInstancesRequest, fl *filter.F) ([]*compute.InstanceWithNamedPorts, error)
39-
RemoveInstances(ctx context.Context, key *meta.Key, req *compute.InstanceGroupsRemoveInstancesRequest) error
39+
AddInstances(ctx context.Context, key *meta.Key, req *compute.InstanceGroupsAddInstancesRequest, options ...k8scloud.Option) error
40+
ListInstances(ctx context.Context, key *meta.Key, req *compute.InstanceGroupsListInstancesRequest, fl *filter.F, options ...k8scloud.Option) ([]*compute.InstanceWithNamedPorts, error)
41+
RemoveInstances(ctx context.Context, key *meta.Key, req *compute.InstanceGroupsRemoveInstancesRequest, options ...k8scloud.Option) error
4042
}
4143

4244
// Scope is an interfaces that hold used methods.

cloud/services/compute/loadbalancers/reconcile.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121

2222
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta"
2323
"google.golang.org/api/compute/v1"
24+
2425
"k8s.io/utils/ptr"
2526
"sigs.k8s.io/cluster-api-provider-gcp/cloud/gcperrors"
2627
"sigs.k8s.io/controller-runtime/pkg/log"

cloud/services/compute/loadbalancers/reconcile_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func TestService_createOrGetInstanceGroup(t *testing.T) {
9696
mockInstanceGroup: &cloud.MockInstanceGroups{
9797
ProjectRouter: &cloud.SingleProjectRouter{ID: "proj-id"},
9898
Objects: map[meta.Key]*cloud.MockInstanceGroupsObj{},
99-
GetHook: func(_ context.Context, _ *meta.Key, _ *cloud.MockInstanceGroups) (bool, *compute.InstanceGroup, error) {
99+
GetHook: func(_ context.Context, _ *meta.Key, _ *cloud.MockInstanceGroups, _ ...cloud.Option) (bool, *compute.InstanceGroup, error) {
100100
return true, &compute.InstanceGroup{}, &googleapi.Error{Code: http.StatusBadRequest}
101101
},
102102
},

cloud/services/compute/loadbalancers/service.go

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,48 +19,50 @@ package loadbalancers
1919
import (
2020
"context"
2121

22+
k8scloud "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud"
2223
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter"
2324
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta"
2425
"google.golang.org/api/compute/v1"
26+
2527
"sigs.k8s.io/cluster-api-provider-gcp/cloud"
2628
)
2729

2830
type addressesInterface interface {
29-
Get(ctx context.Context, key *meta.Key) (*compute.Address, error)
30-
Insert(ctx context.Context, key *meta.Key, obj *compute.Address) error
31-
Delete(ctx context.Context, key *meta.Key) error
31+
Get(ctx context.Context, key *meta.Key, options ...k8scloud.Option) (*compute.Address, error)
32+
Insert(ctx context.Context, key *meta.Key, obj *compute.Address, options ...k8scloud.Option) error
33+
Delete(ctx context.Context, key *meta.Key, options ...k8scloud.Option) error
3234
}
3335

3436
type backendservicesInterface interface {
35-
Get(ctx context.Context, key *meta.Key) (*compute.BackendService, error)
36-
Insert(ctx context.Context, key *meta.Key, obj *compute.BackendService) error
37-
Update(context.Context, *meta.Key, *compute.BackendService) error
38-
Delete(ctx context.Context, key *meta.Key) error
37+
Get(ctx context.Context, key *meta.Key, options ...k8scloud.Option) (*compute.BackendService, error)
38+
Insert(ctx context.Context, key *meta.Key, obj *compute.BackendService, options ...k8scloud.Option) error
39+
Update(ctx context.Context, key *meta.Key, obj *compute.BackendService, options ...k8scloud.Option) error
40+
Delete(ctx context.Context, key *meta.Key, options ...k8scloud.Option) error
3941
}
4042

4143
type forwardingrulesInterface interface {
42-
Get(ctx context.Context, key *meta.Key) (*compute.ForwardingRule, error)
43-
Insert(ctx context.Context, key *meta.Key, obj *compute.ForwardingRule) error
44-
Delete(ctx context.Context, key *meta.Key) error
44+
Get(ctx context.Context, key *meta.Key, options ...k8scloud.Option) (*compute.ForwardingRule, error)
45+
Insert(ctx context.Context, key *meta.Key, obj *compute.ForwardingRule, options ...k8scloud.Option) error
46+
Delete(ctx context.Context, key *meta.Key, options ...k8scloud.Option) error
4547
}
4648

4749
type healthchecksInterface interface {
48-
Get(ctx context.Context, key *meta.Key) (*compute.HealthCheck, error)
49-
Insert(ctx context.Context, key *meta.Key, obj *compute.HealthCheck) error
50-
Delete(ctx context.Context, key *meta.Key) error
50+
Get(ctx context.Context, key *meta.Key, options ...k8scloud.Option) (*compute.HealthCheck, error)
51+
Insert(ctx context.Context, key *meta.Key, obj *compute.HealthCheck, options ...k8scloud.Option) error
52+
Delete(ctx context.Context, key *meta.Key, options ...k8scloud.Option) error
5153
}
5254

5355
type instancegroupsInterface interface {
54-
Get(ctx context.Context, key *meta.Key) (*compute.InstanceGroup, error)
55-
List(ctx context.Context, zone string, fl *filter.F) ([]*compute.InstanceGroup, error)
56-
Insert(ctx context.Context, key *meta.Key, obj *compute.InstanceGroup) error
57-
Delete(ctx context.Context, key *meta.Key) error
56+
Get(ctx context.Context, key *meta.Key, options ...k8scloud.Option) (*compute.InstanceGroup, error)
57+
List(ctx context.Context, zone string, fl *filter.F, options ...k8scloud.Option) ([]*compute.InstanceGroup, error)
58+
Insert(ctx context.Context, key *meta.Key, obj *compute.InstanceGroup, options ...k8scloud.Option) error
59+
Delete(ctx context.Context, key *meta.Key, options ...k8scloud.Option) error
5860
}
5961

6062
type targettcpproxiesInterface interface {
61-
Get(ctx context.Context, key *meta.Key) (*compute.TargetTcpProxy, error)
62-
Insert(ctx context.Context, key *meta.Key, obj *compute.TargetTcpProxy) error
63-
Delete(ctx context.Context, key *meta.Key) error
63+
Get(ctx context.Context, key *meta.Key, options ...k8scloud.Option) (*compute.TargetTcpProxy, error)
64+
Insert(ctx context.Context, key *meta.Key, obj *compute.TargetTcpProxy, options ...k8scloud.Option) error
65+
Delete(ctx context.Context, key *meta.Key, options ...k8scloud.Option) error
6466
}
6567

6668
// Scope is an interfaces that hold used methods.

cloud/services/compute/networks/reconcile.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ import (
2121

2222
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta"
2323
"google.golang.org/api/compute/v1"
24+
2425
"k8s.io/utils/ptr"
26+
2527
infrav1 "sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1"
2628
"sigs.k8s.io/cluster-api-provider-gcp/cloud/gcperrors"
2729
"sigs.k8s.io/controller-runtime/pkg/log"

cloud/services/compute/networks/service.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,23 @@ package networks
1919
import (
2020
"context"
2121

22+
k8scloud "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud"
2223
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta"
2324
"google.golang.org/api/compute/v1"
25+
2426
"sigs.k8s.io/cluster-api-provider-gcp/cloud"
2527
)
2628

2729
type networksInterface interface {
28-
Get(ctx context.Context, key *meta.Key) (*compute.Network, error)
29-
Insert(ctx context.Context, key *meta.Key, obj *compute.Network) error
30-
Delete(ctx context.Context, key *meta.Key) error
30+
Get(ctx context.Context, key *meta.Key, options ...k8scloud.Option) (*compute.Network, error)
31+
Insert(ctx context.Context, key *meta.Key, obj *compute.Network, options ...k8scloud.Option) error
32+
Delete(ctx context.Context, key *meta.Key, options ...k8scloud.Option) error
3133
}
3234

3335
type routersInterface interface {
34-
Get(ctx context.Context, key *meta.Key) (*compute.Router, error)
35-
Insert(ctx context.Context, key *meta.Key, obj *compute.Router) error
36-
Delete(ctx context.Context, key *meta.Key) error
36+
Get(ctx context.Context, key *meta.Key, options ...k8scloud.Option) (*compute.Router, error)
37+
Insert(ctx context.Context, key *meta.Key, obj *compute.Router, options ...k8scloud.Option) error
38+
Delete(ctx context.Context, key *meta.Key, options ...k8scloud.Option) error
3739
}
3840

3941
// Scope is an interfaces that hold used methods.

0 commit comments

Comments
 (0)