Skip to content

Commit

Permalink
Update dependencies (4/15/19) (#184)
Browse files Browse the repository at this point in the history
Gopkg.toml
- Azure/azure-sdk-for-go: 26.6.0 -> 27.1.0

WORKSPACE
- rules_go: 0.18.1 -> 0.18.3
- bazel-gazelle: 0.16.0 -> 0.17.0
- golang: 1.11.5 -> 1.12.4
- golangci-lint: v1.15.0 -> v1.16.0
- kind: 91d92c86cfa4143143841aad7f9b6d0c35e109ea -> 161151a26faf0dbe962ac9f323cc0cdebac79ba8
- Kubernetes: v1.13.5 -> v1.14.1

Packages
- containerd: 1.2.4 -> 1.2.6 (set constants in config package)
- Azure/compute: 2018-10-01/compute -> 2019-03-01/compute

Signed-off-by: Stephen Augustus <[email protected]>
  • Loading branch information
justaugustus authored and k8s-ci-robot committed Apr 15, 2019
1 parent 3acfcd4 commit 0345fdf
Show file tree
Hide file tree
Showing 69 changed files with 419 additions and 236 deletions.
10 changes: 5 additions & 5 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ required = [

[[constraint]]
name = "github.com/Azure/azure-sdk-for-go"
version = "26.6.0"
version = "27.1.0"

[[constraint]]
name = "github.com/Azure/go-autorest"
Expand Down
16 changes: 8 additions & 8 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

http_archive(
name = "io_bazel_rules_go",
sha256 = "77dfd303492f2634de7a660445ee2d3de2960cbd52f97d8c0dffa9362d3ddef9",
urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.18.1/rules_go-0.18.1.tar.gz"],
sha256 = "86ae934bd4c43b99893fc64be9d9fc684b81461581df7ea8fc291c816f5ee8c5",
urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.18.3/rules_go-0.18.3.tar.gz"],
)

http_archive(
Expand All @@ -30,8 +30,8 @@ http_archive(

http_archive(
name = "bazel_gazelle",
sha256 = "7949fc6cc17b5b191103e97481cf8889217263acf52e00b560683413af204fcb",
urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.16.0/bazel-gazelle-0.16.0.tar.gz"],
sha256 = "3c681998538231a2d24d0c07ed5a7658cb72bfb5fd4bf9911157c0e9ac6a2687",
urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.17.0/bazel-gazelle-0.17.0.tar.gz"],
)

http_archive(
Expand All @@ -46,7 +46,7 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_depe
go_rules_dependencies()

go_register_toolchains(
go_version = "1.11.5",
go_version = "1.12.4",
)

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
Expand Down Expand Up @@ -86,7 +86,7 @@ go_repository(
name = "com_github_golangci_golangci-lint",
build_file_generation = "on",
importpath = "github.com/golangci/golangci-lint",
tag = "v1.15.0",
tag = "v1.16.0",
)

go_repository(
Expand All @@ -98,7 +98,7 @@ go_repository(

go_repository(
name = "io_k8s_sigs_kind",
commit = "91d92c86cfa4143143841aad7f9b6d0c35e109ea",
commit = "161151a26faf0dbe962ac9f323cc0cdebac79ba8",
importpath = "sigs.k8s.io/kind",
)

Expand All @@ -111,7 +111,7 @@ go_repository(
go_repository(
name = "io_k8s_kubernetes",
importpath = "k8s.io/kubernetes",
tag = "v1.13.5",
tag = "v1.14.1",
)

go_repository(
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/examples/azure/generate-yaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ export CLUSTER_NAME="${CLUSTER_NAME:-test1}"
export VNET_NAME="${VNET_NAME:-}"

# Machine settings.
export KUBERNETES_VERSION="${KUBERNETES_VERSION:-1.14.1}"
export CONTROL_PLANE_MACHINE_TYPE="${CONTROL_PLANE_MACHINE_TYPE:-Standard_B2ms}"
export NODE_MACHINE_TYPE="${NODE_MACHINE_TYPE:-Standard_B2ms}"
export KUBERNETES_VERSION="${KUBERNETES_VERSION:-1.13.5}"

# Credentials.
SSH_KEY_FILE=${OUTPUT_DIR}/sshkey
Expand Down
4 changes: 2 additions & 2 deletions pkg/cloud/azure/actuators/machine/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ go_library(
"//pkg/cloud/azure/services/virtualmachineextensions:go_default_library",
"//pkg/cloud/azure/services/virtualmachines:go_default_library",
"//pkg/deployer:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute:go_default_library",
"//vendor/github.com/pkg/errors:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
Expand All @@ -44,7 +44,7 @@ go_test(
"//pkg/cloud/azure:go_default_library",
"//pkg/cloud/azure/actuators:go_default_library",
"//pkg/cloud/azure/services/virtualmachines:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library",
"//vendor/github.com/ghodss/yaml:go_default_library",
"//vendor/github.com/pkg/errors:go_default_library",
Expand Down
16 changes: 16 additions & 0 deletions pkg/cloud/azure/actuators/machine/actuator.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ func NewActuator(params ActuatorParams) *Actuator {

// Create creates a machine and is invoked by the machine controller.
func (a *Actuator) Create(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) error {
if cluster == nil {
return errors.Errorf("missing cluster for machine %s/%s", machine.Namespace, machine.Name)
}

klog.Infof("Creating machine %v for cluster %v", machine.Name, cluster.Name)

scope, err := actuators.NewMachineScope(actuators.MachineScopeParams{Machine: machine, Cluster: cluster, Client: a.client})
Expand All @@ -77,6 +81,10 @@ func (a *Actuator) Create(ctx context.Context, cluster *clusterv1.Cluster, machi

// Delete deletes a machine and is invoked by the Machine Controller.
func (a *Actuator) Delete(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) error {
if cluster == nil {
return errors.Errorf("missing cluster for machine %s/%s", machine.Namespace, machine.Name)
}

klog.Infof("Deleting machine %v for cluster %v.", machine.Name, cluster.Name)

scope, err := actuators.NewMachineScope(actuators.MachineScopeParams{Machine: machine, Cluster: cluster, Client: a.client})
Expand All @@ -101,6 +109,10 @@ func (a *Actuator) Delete(ctx context.Context, cluster *clusterv1.Cluster, machi
// If the Update attempts to mutate any immutable state, the method will error
// and no updates will be performed.
func (a *Actuator) Update(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) error {
if cluster == nil {
return errors.Errorf("missing cluster for machine %s/%s", machine.Namespace, machine.Name)
}

klog.Infof("Updating machine %v for cluster %v.", machine.Name, cluster.Name)

scope, err := actuators.NewMachineScope(actuators.MachineScopeParams{Machine: machine, Cluster: cluster, Client: a.client})
Expand All @@ -123,6 +135,10 @@ func (a *Actuator) Update(ctx context.Context, cluster *clusterv1.Cluster, machi

// Exists test for the existence of a machine and is invoked by the Machine Controller
func (a *Actuator) Exists(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) (bool, error) {
if cluster == nil {
return false, errors.Errorf("missing cluster for machine %s/%s", machine.Namespace, machine.Name)
}

klog.Infof("Checking if machine %v for cluster %v exists", machine.Name, cluster.Name)

scope, err := actuators.NewMachineScope(actuators.MachineScopeParams{Machine: machine, Cluster: cluster, Client: a.client})
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 @@ -21,7 +21,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-03-01/compute"
"github.com/Azure/go-autorest/autorest/to"
"github.com/ghodss/yaml"
"github.com/pkg/errors"
Expand Down
7 changes: 4 additions & 3 deletions pkg/cloud/azure/actuators/machine/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strings"
"time"

"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-03-01/compute"
"github.com/pkg/errors"
apicorev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -379,9 +379,10 @@ func getNodeReference(scope *actuators.MachineScope) (*apicorev1.ObjectReference
// TODO(vincepri): Improve this comparison without relying on substrings.
if strings.Contains(node.Spec.ProviderID, instanceID) {
return &apicorev1.ObjectReference{
Kind: node.Kind,
APIVersion: node.APIVersion,
Kind: "Node",
APIVersion: apicorev1.SchemeGroupVersion.String(),
Name: node.Name,
UID: node.UID,
}, nil
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/azure/converters/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/azureprovider/v1alpha1:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute:go_default_library",
],
)
2 changes: 1 addition & 1 deletion pkg/cloud/azure/converters/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package converters

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-03-01/compute"
"sigs.k8s.io/cluster-api-provider-azure/pkg/apis/azureprovider/v1alpha1"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/azure/services/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/azureprovider/v1alpha1:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/azure/services/availabilityzones/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ go_library(
deps = [
"//pkg/cloud/azure:go_default_library",
"//pkg/cloud/azure/actuators:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest:go_default_library",
"//vendor/github.com/pkg/errors:go_default_library",
],
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-03-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
12 changes: 8 additions & 4 deletions pkg/cloud/azure/services/config/controlplane.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ apt-get install -y libseccomp2
# Install containerd
# Export required environment variables.
export CONTAINERD_VERSION="1.2.4"
export CONTAINERD_SHA256="3391758c62d17a56807ddac98b05487d9e78e5beb614a0602caab747b0eda9e0"
export CONTAINERD_VERSION="{{.ContainerdVersion}}"
export CONTAINERD_SHA256="{{.ContainerdSHA256}}"
# Download containerd tar.
wget https://storage.googleapis.com/cri-containerd-release/cri-containerd-${CONTAINERD_VERSION}.linux-amd64.tar.gz
Expand Down Expand Up @@ -210,8 +210,8 @@ apt-get install -y libseccomp2
# Install containerd
# Export required environment variables.
export CONTAINERD_VERSION="1.2.4"
export CONTAINERD_SHA256="3391758c62d17a56807ddac98b05487d9e78e5beb614a0602caab747b0eda9e0"
export CONTAINERD_VERSION="{{.ContainerdVersion}}"
export CONTAINERD_SHA256="{{.ContainerdSHA256}}"
# Download containerd tar.
wget https://storage.googleapis.com/cri-containerd-release/cri-containerd-${CONTAINERD_VERSION}.linux-amd64.tar.gz
Expand Down Expand Up @@ -264,6 +264,8 @@ type ControlPlaneInput struct {
ServiceSubnet string
KubernetesVersion string
CloudProviderConfig string
ContainerdVersion string
ContainerdSHA256 string
}

// ContolPlaneJoinInput defines context to generate controlplane instance user data for controlplane node join.
Expand All @@ -283,6 +285,8 @@ type ContolPlaneJoinInput struct {
LBAddress string
KubernetesVersion string
CloudProviderConfig string
ContainerdVersion string
ContainerdSHA256 string
}

func (cpi *ControlPlaneInput) validateCertificates() error {
Expand Down
6 changes: 4 additions & 2 deletions pkg/cloud/azure/services/config/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ apt-get install -y libseccomp2
# Install containerd
# Export required environment variables.
export CONTAINERD_VERSION="1.2.4"
export CONTAINERD_SHA256="3391758c62d17a56807ddac98b05487d9e78e5beb614a0602caab747b0eda9e0"
export CONTAINERD_VERSION="{{.ContainerdVersion}}"
export CONTAINERD_SHA256="{{.ContainerdSHA256}}"
# Download containerd tar.
wget https://storage.googleapis.com/cri-containerd-release/cri-containerd-${CONTAINERD_VERSION}.linux-amd64.tar.gz
Expand Down Expand Up @@ -107,6 +107,8 @@ type NodeInput struct {
InternalLBAddress string
KubernetesVersion string
CloudProviderConfig string
ContainerdVersion string
ContainerdSHA256 string
}

// NewNode returns the user data string to be used on a node instance.
Expand Down
11 changes: 11 additions & 0 deletions pkg/cloud/azure/services/config/startupscript.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ import (
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure/actuators"
)

const (
ContainerdVersion = "1.2.6"
ContainerdSHA256 = "3c23bc34c7c0cb2e45fe469f5fcfdb3829aab8e51a425b1efb702f00f215c4c6"
)

// GetVMStartupScript returns startup script based on role
func GetVMStartupScript(machine *actuators.MachineScope, bootstrapToken string) (string, error) {
var startupScript string
Expand Down Expand Up @@ -76,6 +81,8 @@ func GetVMStartupScript(machine *actuators.MachineScope, bootstrapToken string)
LBAddress: dnsName,
KubernetesVersion: trimKubernetesVersion(machine.Machine.Spec.Versions.ControlPlane),
CloudProviderConfig: getAzureCloudProviderConfig(machine),
ContainerdVersion: ContainerdVersion,
ContainerdSHA256: ContainerdSHA256,
})
if err != nil {
return "", err
Expand Down Expand Up @@ -103,6 +110,8 @@ func GetVMStartupScript(machine *actuators.MachineScope, bootstrapToken string)
ServiceDomain: machine.Scope.Cluster.Spec.ClusterNetwork.ServiceDomain,
KubernetesVersion: trimKubernetesVersion(machine.Machine.Spec.Versions.ControlPlane),
CloudProviderConfig: getAzureCloudProviderConfig(machine),
ContainerdVersion: ContainerdVersion,
ContainerdSHA256: ContainerdSHA256,
})

if err != nil {
Expand All @@ -119,6 +128,8 @@ func GetVMStartupScript(machine *actuators.MachineScope, bootstrapToken string)
InternalLBAddress: azure.DefaultInternalLBIPAddress,
KubernetesVersion: trimKubernetesVersion(machine.Machine.Spec.Versions.Kubelet),
CloudProviderConfig: getAzureCloudProviderConfig(machine),
ContainerdVersion: ContainerdVersion,
ContainerdSHA256: ContainerdSHA256,
})

if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/azure/services/mock_interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package services

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-03-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network"
"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources"
"github.com/Azure/go-autorest/autorest"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/azure/services/mock_interfaces_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"
"net/http"

"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-03-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network"
"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources"
"github.com/Azure/go-autorest/autorest"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ go_library(
deps = [
"//pkg/cloud/azure:go_default_library",
"//pkg/cloud/azure/actuators:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library",
"//vendor/github.com/pkg/errors:go_default_library",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package virtualmachineextensions

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-03-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 @@ -19,7 +19,7 @@ package virtualmachineextensions
import (
"context"

"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-03-01/compute"
"github.com/Azure/go-autorest/autorest/to"
"github.com/pkg/errors"
"k8s.io/klog"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/azure/services/virtualmachines/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ go_library(
"//pkg/cloud/azure:go_default_library",
"//pkg/cloud/azure/actuators:go_default_library",
"//pkg/cloud/azure/services/networkinterfaces:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library",
Expand Down
Loading

0 comments on commit 0345fdf

Please sign in to comment.