Skip to content

Commit

Permalink
cloud-provider-interface introduced new functions, implement them (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 authored May 12, 2021
1 parent 1bb92db commit f752738
Show file tree
Hide file tree
Showing 10 changed files with 390 additions and 429 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ jobs:
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.32.2
args: --timeout=3m
args: -p bugs -p unused --timeout=3m

- name: Build the Docker images
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ jobs:
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.32.2
args: --timeout=3m
args: -p bugs -p unused --timeout=3m

- name: Build
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ jobs:
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.32.2
args: --timeout=3m
args: -p bugs -p unused --timeout=3m

- name: Build the Docker images
run: |
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM golang:1.15-buster as builder
FROM golang:1.16-buster as builder
WORKDIR /work
COPY . .
RUN make all

FROM alpine:3.12
FROM alpine:3.13
RUN apk --update add ca-certificates

COPY --from=builder /work/bin/metal-cloud-controller-manager .
Expand Down
5 changes: 5 additions & 0 deletions cmd/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ func (c *cloud) Instances() (cloudprovider.Instances, bool) {
return c.instances, true
}

// Instances returns an machines interface. Also returns true if the interface is supported, false otherwise.
func (c *cloud) InstancesV2() (cloudprovider.InstancesV2, bool) {
return c.instances, true
}

// Zones returns a zones interface. Also returns true if the interface is supported, false otherwise.
func (c *cloud) Zones() (cloudprovider.Zones, bool) {
return c.zones, true
Expand Down
62 changes: 31 additions & 31 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
module github.com/metal-stack/metal-ccm

go 1.15
go 1.16

require (
github.com/NYTimes/gziphandler v1.0.1 // indirect
github.com/ghodss/yaml v1.0.0
github.com/google/uuid v1.2.0
github.com/googleapis/gnostic v0.2.0 // indirect
github.com/metal-stack/metal-go v0.12.2
github.com/metal-stack/metal-lib v0.6.9
github.com/metal-stack/metal-go v0.14.0
github.com/metal-stack/metal-lib v0.8.0
github.com/metal-stack/v v1.0.3
github.com/pkg/errors v0.9.1
github.com/spf13/pflag v1.0.5
k8s.io/api v0.18.16
k8s.io/apimachinery v0.18.16
k8s.io/client-go v0.18.16
k8s.io/cloud-provider v0.18.16
k8s.io/component-base v0.18.16
k8s.io/kubernetes v1.18.8
k8s.io/api v0.19.10
k8s.io/apimachinery v0.19.10
k8s.io/client-go v0.19.10
k8s.io/cloud-provider v0.19.10
k8s.io/component-base v0.19.10
k8s.io/kubernetes v1.19.10
)

replace (
// specify a lower transitive dependency to grpc otherwise
// endpoint.go:114:78: undefined: resolver.BuildOption
google.golang.org/grpc => google.golang.org/grpc v1.26.0
k8s.io/api => k8s.io/api v0.18.16
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.18.16
k8s.io/apimachinery => k8s.io/apimachinery v0.18.16
k8s.io/apiserver => k8s.io/apiserver v0.18.16
k8s.io/cli-runtime => k8s.io/cli-runtime v0.18.16
k8s.io/client-go => k8s.io/client-go v0.18.16
k8s.io/cloud-provider => k8s.io/cloud-provider v0.18.16
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.18.16
k8s.io/code-generator => k8s.io/code-generator v0.18.16
k8s.io/component-base => k8s.io/component-base v0.18.16
k8s.io/cri-api => k8s.io/cri-api v0.18.16
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.18.16
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.18.16
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.18.16
k8s.io/kube-proxy => k8s.io/kube-proxy v0.18.16
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.18.16
k8s.io/kubectl => k8s.io/kubectl v0.18.16
k8s.io/kubelet => k8s.io/kubelet v0.18.16
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.18.16
k8s.io/metrics => k8s.io/metrics v0.18.16
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.18.16
gopkg.in/square/go-jose.v2 => gopkg.in/square/go-jose.v2 v2.2.2
k8s.io/api => k8s.io/api v0.19.10
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.19.10
k8s.io/apimachinery => k8s.io/apimachinery v0.19.10
k8s.io/apiserver => k8s.io/apiserver v0.19.10
k8s.io/cli-runtime => k8s.io/cli-runtime v0.19.10
k8s.io/client-go => k8s.io/client-go v0.19.10
k8s.io/cloud-provider => k8s.io/cloud-provider v0.19.10
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.19.10
k8s.io/code-generator => k8s.io/code-generator v0.19.10
k8s.io/component-base => k8s.io/component-base v0.19.10
k8s.io/cri-api => k8s.io/cri-api v0.19.10
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.19.10
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.19.10
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.19.10
k8s.io/kube-proxy => k8s.io/kube-proxy v0.19.10
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.19.10
k8s.io/kubectl => k8s.io/kubectl v0.19.10
k8s.io/kubelet => k8s.io/kubelet v0.19.10
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.19.10
k8s.io/metrics => k8s.io/metrics v0.19.10
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.19.10
)
Loading

0 comments on commit f752738

Please sign in to comment.