Skip to content

Commit

Permalink
Merge pull request #105 from unmarshall/sdk
Browse files Browse the repository at this point in the history
Upgrade to latest Azure Go SDK
  • Loading branch information
unmarshall authored Nov 17, 2023
2 parents 0fd6109 + b316051 commit 02e0c9f
Show file tree
Hide file tree
Showing 1,992 changed files with 358,035 additions and 262,129 deletions.
4 changes: 2 additions & 2 deletions .ci/pipeline_definitions
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ machine-controller-manager-provider-azure:
steps_template: &steps_anchor
steps:
check:
image: 'golang:1.20.5'
image: 'golang:1.21.4'
build:
image: 'golang:1.20.5'
image: 'golang:1.21.4'
output_dir: 'binary'
test:
image: 'eu.gcr.io/gardener-project/gardener/testmachinery/base-step:stable'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/.kube-secrets
/tmp/*
/dev
.env

.vscode
.idea
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0

############# builder #############
FROM golang:1.20.5 AS builder
FROM golang:1.21.4 AS builder

WORKDIR /go/src/github.com/gardener/machine-controller-manager-provider-azure
COPY . .
Expand Down
17 changes: 8 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,17 @@
#
# SPDX-License-Identifier: Apache-2.0

-include .env

BINARY_PATH := bin/
COVERPROFILE := test/output/coverprofile.out
IMAGE_REPOSITORY := eu.gcr.io/gardener-project/gardener/machine-controller-manager-provider-azure
IMAGE_TAG := $(shell cat VERSION)
PROVIDER_NAME := Azure
PROJECT_NAME := gardener
CONTROL_NAMESPACE := default
CONTROL_KUBECONFIG := dev/control-kubeconfig.yaml
TARGET_KUBECONFIG := dev/target-kubeconfig.yaml


# Below ones are used in tests
MACHINECLASS_V1 := dev/machineclassv1.yaml
MACHINECLASS_V2 :=
MCM_IMAGE :=
MC_IMAGE :=
# MCM_IMAGE := eu.gcr.io/gardener-project/gardener/machine-controller-manager:v0.46.0
# MC_IMAGE := $(IMAGE_REPOSITORY):v0.8.0
LEADER_ELECT := "true"

# If Integration Test Suite is to be run locally against clusters then export the below variable
Expand All @@ -34,6 +27,8 @@ MACHINE_CONTROLLER_MANAGER_DEPLOYMENT_NAME := machine-controller-manager
rename-project:
@./hack/rename-project ${PROJECT_NAME} ${PROVIDER_NAME}



#########################################
# Rules for starting machine-controller locally
#########################################
Expand Down Expand Up @@ -134,3 +129,7 @@ clean:
@rm -rf bin/
@rm -f *linux-amd64
@rm -f *darwin-amd64

.PHONY: add-license-headers
add-license-headers: $(GO_ADD_LICENSE)
@./hack/add_license_headers.sh
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.11.0
v0.12.0-dev
12 changes: 5 additions & 7 deletions cmd/machine-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
"fmt"
"os"

cp "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure"
"github.com/gardener/machine-controller-manager-provider-azure/pkg/spi"
_ "github.com/gardener/machine-controller-manager/pkg/util/client/metrics/prometheus" // for client metric registration
"github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/access"
"github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/provider"
_ "github.com/gardener/machine-controller-manager/pkg/util/client/metrics/prometheus" // for access metric registration
"github.com/gardener/machine-controller-manager/pkg/util/provider/app"
"github.com/gardener/machine-controller-manager/pkg/util/provider/app/options"
_ "github.com/gardener/machine-controller-manager/pkg/util/reflector/prometheus" // for reflector metric registration
Expand All @@ -37,11 +37,9 @@ func main() {
logs.InitLogs()
defer logs.FlushLogs()

driver := cp.NewAzureDriver(&spi.PluginSPIImpl{})

driver := provider.NewDefaultDriver(access.NewDefaultAccessFactory())
if err := app.Run(s, driver); err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err)
_, _ = fmt.Fprintf(os.Stderr, "%v\n", err)
os.Exit(1)
}

}
78 changes: 40 additions & 38 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,84 +1,87 @@
module github.com/gardener/machine-controller-manager-provider-azure

go 1.20
go 1.21

require (
github.com/Azure/azure-sdk-for-go v62.3.0+incompatible
github.com/Azure/go-autorest/autorest v0.11.18
github.com/Azure/go-autorest/autorest/adal v0.9.13
github.com/Azure/go-autorest/autorest/to v0.3.0
github.com/gardener/machine-controller-manager v0.49.1
github.com/golang/mock v1.4.4
github.com/onsi/ginkgo v1.16.2
github.com/onsi/gomega v1.23.0
github.com/prometheus/client_golang v1.14.0
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.0-beta.2
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.3.0-beta.2
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering v1.2.0-beta.3
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0-beta.1
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.8.2
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0-beta.3
github.com/gardener/machine-controller-manager v0.50.1
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.27.4
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/spf13/pflag v1.0.5
golang.org/x/crypto v0.6.0
k8s.io/api v0.26.2
k8s.io/apimachinery v0.26.2
k8s.io/component-base v0.26.2
k8s.io/klog/v2 v2.80.1
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448
golang.org/x/crypto v0.14.0
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
k8s.io/api v0.27.2
k8s.io/apimachinery v0.27.2
k8s.io/client-go v0.27.2 // indirect
k8s.io/component-base v0.27.2
k8s.io/klog/v2 v2.90.1
k8s.io/utils v0.0.0-20230209194617-a36077c30491
)

require (
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/autorest/validation v0.2.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Microsoft/go-winio v0.4.16 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-git/go-billy/v5 v5.3.1 // indirect
github.com/go-git/go-git/v5 v5.4.2 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/swag v0.19.14 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.1 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v5 v5.0.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/spf13/cobra v1.6.1 // indirect
github.com/xanzy/ssh-agent v0.3.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
Expand All @@ -87,12 +90,11 @@ require (
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.26.2 // indirect
k8s.io/apiserver v0.26.2 // indirect
k8s.io/client-go v0.26.2 // indirect
k8s.io/cluster-bootstrap v0.26.2 // indirect
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
k8s.io/apiextensions-apiserver v0.27.2 // indirect
k8s.io/apiserver v0.27.2 // indirect
k8s.io/cluster-bootstrap v0.27.2 // indirect
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading

0 comments on commit 02e0c9f

Please sign in to comment.