Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for spot instances #143

Merged
merged 2 commits into from
Jun 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module sigs.k8s.io/cluster-api-provider-azure
go 1.13

require (
github.com/Azure/azure-sdk-for-go v32.5.0+incompatible
github.com/Azure/go-autorest/autorest v0.9.2
github.com/Azure/go-autorest/autorest/adal v0.7.0
github.com/Azure/azure-sdk-for-go v42.0.0+incompatible
github.com/Azure/go-autorest/autorest v0.10.0
github.com/Azure/go-autorest/autorest/adal v0.8.2
github.com/Azure/go-autorest/autorest/to v0.3.0
github.com/Azure/go-autorest/autorest/validation v0.2.0 // indirect
github.com/ghodss/yaml v1.0.0
Expand All @@ -24,11 +24,12 @@ require (
k8s.io/client-go v0.18.2
k8s.io/code-generator v0.18.2
k8s.io/klog v1.0.0
k8s.io/kubectl v0.18.0-rc.1
k8s.io/utils v0.0.0-20200327001022-6496210b90e8
sigs.k8s.io/controller-runtime v0.6.0
sigs.k8s.io/controller-tools v0.3.0
sigs.k8s.io/yaml v1.2.0
)

replace sigs.k8s.io/cluster-api-provider-aws => github.com/openshift/cluster-api-provider-aws v0.2.1-0.20200612013036-1a97c62077cb

replace github.com/Azure/go-autorest => github.com/Azure/go-autorest v14.0.1+incompatible
15 changes: 7 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
github.com/Azure/azure-sdk-for-go v32.5.0+incompatible h1:Hn/DsObfmw0M7dMGS/c0MlVrJuGFzHzOpBWL89acR68=
github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v42.0.0+incompatible h1:yz6sFf5bHZ+gEOQVuK5JhPqTTAmv+OvSLSaqgzqaCwY=
github.com/Azure/azure-sdk-for-go v42.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
github.com/Azure/go-autorest/autorest v0.9.2 h1:6AWuh3uWrsZJcNoCHrCF/+g4aKPCU39kaMO6/qrnK/4=
github.com/Azure/go-autorest/autorest v0.9.2/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
github.com/Azure/go-autorest/autorest v0.10.0 h1:mvdtztBqcL8se7MdrUweNieTNi4kfNG6GOJuurQJpuY=
github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630=
github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
github.com/Azure/go-autorest/autorest/adal v0.7.0 h1:PUMxSVw3tEImG0JTRqbxjXLKCSoPk7DartDELqlOuiI=
github.com/Azure/go-autorest/autorest/adal v0.7.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
github.com/Azure/go-autorest/autorest/adal v0.8.2 h1:O1X4oexUxnZCaEUGsvMnr8ZGj8HI37tNezwY4npRqA0=
github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q=
github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM=
github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=
Expand Down Expand Up @@ -266,7 +266,6 @@ github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22
github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok=
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
Expand Down Expand Up @@ -456,6 +455,7 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo=
golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
Expand Down Expand Up @@ -520,7 +520,6 @@ golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e h1:N7DeIrjYszNmSW409R3frPPwglRwMkXSBzwVbkOjLLA=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/azure/actuators/machine/actuator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"strings"
"testing"

"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/to"
"github.com/ghodss/yaml"
Expand Down
50 changes: 40 additions & 10 deletions pkg/cloud/azure/actuators/machine/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ import (
"errors"
"fmt"
"path"
"strconv"
"strings"
"time"

"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-12-01/network"
"github.com/Azure/go-autorest/autorest/to"
machinev1 "github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1"
machinecontroller "github.com/openshift/machine-api-operator/pkg/controller/machine"
Expand Down Expand Up @@ -513,6 +514,11 @@ func (s *Reconciler) createVirtualMachine(ctx context.Context, nicName string) e
return fmt.Errorf("failed to decode ssh public key: %w", err)
}

priority, evictionPolicy, billingProfile, err := getSpotVMOptions(s.scope.MachineConfig.SpotVMOptions)
if err != nil {
return fmt.Errorf("failed to get Spot VM options %w", err)
}

vmSpec := &virtualmachines.Spec{
Name: s.scope.Machine.Name,
}
Expand All @@ -529,14 +535,17 @@ func (s *Reconciler) createVirtualMachine(ctx context.Context, nicName string) e
}

vmSpec = &virtualmachines.Spec{
Name: s.scope.Machine.Name,
NICName: nicName,
SSHKeyData: string(decoded),
Size: s.scope.MachineConfig.VMSize,
OSDisk: s.scope.MachineConfig.OSDisk,
Image: s.scope.MachineConfig.Image,
Zone: zone,
Tags: s.scope.MachineConfig.Tags,
Name: s.scope.Machine.Name,
NICName: nicName,
SSHKeyData: string(decoded),
Size: s.scope.MachineConfig.VMSize,
OSDisk: s.scope.MachineConfig.OSDisk,
Image: s.scope.MachineConfig.Image,
Zone: zone,
Tags: s.scope.MachineConfig.Tags,
Priority: priority,
EvictionPolicy: evictionPolicy,
BillingProfile: billingProfile,
}

if s.scope.MachineConfig.ManagedIdentity != "" {
Expand Down Expand Up @@ -610,3 +619,24 @@ func (s *Reconciler) getCustomUserData() (string, error) {

return base64.StdEncoding.EncodeToString(data), nil
}

func getSpotVMOptions(spotVMOptions *v1beta1.SpotVMOptions) (compute.VirtualMachinePriorityTypes, compute.VirtualMachineEvictionPolicyTypes, *compute.BillingProfile, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a unit test for this function?

// Spot VM not requested, return zero values to apply defaults
if spotVMOptions == nil {
return compute.VirtualMachinePriorityTypes(""), compute.VirtualMachineEvictionPolicyTypes(""), nil, nil
}
var billingProfile *compute.BillingProfile
if spotVMOptions.MaxPrice != nil {
maxPrice, err := strconv.ParseFloat(*spotVMOptions.MaxPrice, 64)
if err != nil {
return compute.VirtualMachinePriorityTypes(""), compute.VirtualMachineEvictionPolicyTypes(""), nil, err
}
billingProfile = &compute.BillingProfile{
MaxPrice: &maxPrice,
}
}

// We should use deallocate eviction policy it's - "the only supported eviction policy for Single Instance Spot VMs"
// https://github.com/openshift/enhancements/blob/master/enhancements/machine-api/spot-instances.md#eviction-policies
return compute.Spot, compute.Deallocate, billingProfile, nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a comment elaborating why you chose Deallocate?

}
65 changes: 65 additions & 0 deletions pkg/cloud/azure/actuators/machine/reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package machine

import (
"context"
"strconv"
"testing"

"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute"
"sigs.k8s.io/cluster-api-provider-azure/pkg/apis/azureprovider/v1beta1"
)

Expand Down Expand Up @@ -49,3 +51,66 @@ func TestExists(t *testing.T) {
}
}
}

func TestGetSpotVMOptions(t *testing.T) {
maxPriceString := "100"
maxPriceFloat, err := strconv.ParseFloat(maxPriceString, 64)
if err != nil {
t.Fatal(err)
}

testCases := []struct {
name string
spotVMOptions *v1beta1.SpotVMOptions
priority compute.VirtualMachinePriorityTypes
evictionPolicy compute.VirtualMachineEvictionPolicyTypes
billingProfile *compute.BillingProfile
}{
{
name: "get spot vm option succefully",
spotVMOptions: &v1beta1.SpotVMOptions{
MaxPrice: &maxPriceString,
},
priority: compute.Spot,
evictionPolicy: compute.Deallocate,
billingProfile: &compute.BillingProfile{
MaxPrice: &maxPriceFloat,
},
},
{
name: "return empty values on missing options",
spotVMOptions: nil,
priority: "",
evictionPolicy: "",
billingProfile: nil,
},
}

for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
priority, evictionPolicy, billingProfile, err := getSpotVMOptions(tc.spotVMOptions)
if err != nil {
t.Fatal(err)
}

if priority != tc.priority {
t.Fatalf("Expected priority %s, got: %s", priority, tc.priority)
}

if evictionPolicy != tc.evictionPolicy {
t.Fatalf("Expected eviction policy %s, got: %s", evictionPolicy, tc.evictionPolicy)
}

// only check billing profile when spotVMOptions object is not nil
if tc.spotVMOptions != nil {
if *billingProfile.MaxPrice != *tc.billingProfile.MaxPrice {
t.Fatalf("Expected billing profile max price %d, got: %d", billingProfile, tc.billingProfile)
}
} else {
if billingProfile != nil {
t.Fatal("Expected billing profile to be nil")
}
}
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"errors"
"fmt"

"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-12-01/network"
"github.com/Azure/go-autorest/autorest/to"
"k8s.io/klog"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package applicationsecuritygroups

import (
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-12-01/network"
"github.com/Azure/go-autorest/autorest"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure/actuators"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package availabilityzones
import (
"context"
"errors"
"fmt"
"strings"

"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure"
Expand All @@ -36,7 +37,9 @@ func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error)
if !ok {
return zones, errors.New("invalid availability zones specification")
}
res, err := s.Client.List(ctx)

filter := fmt.Sprintf("location eq '%s'", s.Scope.Location())
res, err := s.Client.List(ctx, filter)
if err != nil {
return zones, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/azure/services/availabilityzones/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package availabilityzones

import (
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute"
"github.com/Azure/go-autorest/autorest"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure/actuators"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/azure/services/disks/disks.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"errors"
"fmt"

"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute"
"k8s.io/klog"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/azure/services/disks/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package disks

import (
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute"
"github.com/Azure/go-autorest/autorest"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure/actuators"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"errors"
"fmt"

"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-12-01/network"
"github.com/Azure/go-autorest/autorest/to"
"k8s.io/klog"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/azure/services/internalloadbalancers/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package internalloadbalancers

import (
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-12-01/network"
"github.com/Azure/go-autorest/autorest"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure/actuators"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"fmt"
"net"

"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-12-01/network"
"github.com/Azure/go-autorest/autorest/to"
"k8s.io/klog"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/azure/services/networkinterfaces/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package networkinterfaces

import (
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-12-01/network"
"github.com/Azure/go-autorest/autorest"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure/actuators"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/azure/services/publicips/publicips.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"fmt"
"strings"

"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-12-01/network"
"github.com/Azure/go-autorest/autorest/to"
"k8s.io/klog"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/azure/services/publicips/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package publicips

import (
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-12-01/network"
"github.com/Azure/go-autorest/autorest"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure/actuators"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"errors"
"fmt"

"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-12-01/network"
"github.com/Azure/go-autorest/autorest/to"
"k8s.io/klog"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/azure/services/publicloadbalancers/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package publicloadbalancers

import (
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-12-01/network"
"github.com/Azure/go-autorest/autorest"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure/actuators"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/azure/services/routetables/routetables.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"errors"
"fmt"

"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-12-01/network"
"github.com/Azure/go-autorest/autorest/to"
"k8s.io/klog"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/azure/services/routetables/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package routetables

import (
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-12-01/network"
"github.com/Azure/go-autorest/autorest"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure"
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure/actuators"
Expand Down
Loading