Skip to content

Commit fdde67f

Browse files
Merge pull request #10 from rkojedzinszky/master
Update dependencies to work with k8s 1.20+
2 parents cc2551e + 597fa3e commit fdde67f

File tree

8 files changed

+618
-352
lines changed

8 files changed

+618
-352
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ RUN apk update && \
55
rm -rf /var/cache/apk/* && \
66
update-ca-certificates
77

8-
COPY bin_release/freenas-iscsi-provisioner_linux-amd64 /freenas-iscsi-provisioner
8+
COPY bin/freenas-iscsi-provisioner /freenas-iscsi-provisioner
9+
910
ENTRYPOINT ["/freenas-iscsi-provisioner"]

Makefile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,13 @@ fmt:
88
tmp:
99
mkdir -p tmp/
1010

11-
vendor:
12-
glide install -v --strip-vcs
13-
14-
$(BIN)/freenas-provisioner build: vendor $(BIN) $(shell find . -name "*.go")
11+
$(BIN)/freenas-provisioner build: $(BIN) $(shell find . -name "*.go")
1512
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags '-extldflags "-static"' -o $(BIN)/freenas-iscsi-provisioner .
1613

17-
darwin: vendor $(BIN) $(shell find . -name "*.go")
14+
darwin: $(BIN) $(shell find . -name "*.go")
1815
env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -a -ldflags '-extldflags "-static"' -o $(BIN)/freenas-iscsi-provisioner-darwin .
1916

20-
freebsd: vendor $(BIN) $(shell find . -name "*.go")
17+
freebsd: $(BIN) $(shell find . -name "*.go")
2118
env CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -a -ldflags '-extldflags "-static"' -o $(BIN)/freenas-iscsi-provisioner-freebsd .
2219

2320
clean:

cli/command.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package cli
22

33
import (
4+
"context"
45
"flag"
56
"fmt"
67
"os"
@@ -9,12 +10,11 @@ import (
910

1011
"github.com/golang/glog"
1112
cli "github.com/jawher/mow.cli"
12-
"github.com/kubernetes-incubator/external-storage/lib/controller"
1313
freenasProvisioner "github.com/travisghansen/freenas-iscsi-provisioner/provisioner"
14-
"k8s.io/apimachinery/pkg/util/wait"
1514
"k8s.io/client-go/kubernetes"
1615
"k8s.io/client-go/rest"
1716
"k8s.io/client-go/tools/clientcmd"
17+
"sigs.k8s.io/sig-storage-lib-external-provisioner/v6/controller"
1818
)
1919

2020
const (
@@ -23,7 +23,6 @@ const (
2323
leasePeriod = controller.DefaultLeaseDuration
2424
retryPeriod = controller.DefaultRetryPeriod
2525
renewDeadline = controller.DefaultRenewDeadline
26-
termLimit = controller.DefaultTermLimit
2726
)
2827

2928
var (
@@ -180,9 +179,8 @@ func execute() {
180179
controller.LeaseDuration(time.Duration(*controllerLeaseDuration)*time.Second),
181180
controller.RenewDeadline(time.Duration(*controllerRenewDeadline)*time.Second),
182181
controller.RetryPeriod(time.Duration(*controllerRetryPeriod)*time.Second),
183-
controller.TermLimit(time.Duration(*controllerLeaseDuration)*time.Second),
184182
controller.MetricsPort(int32(*controllerMetricsPort)),
185183
)
186184

187-
pc.Run(wait.NeverStop)
185+
pc.Run(context.Background())
188186
}

glide.lock

Lines changed: 0 additions & 299 deletions
This file was deleted.

glide.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

go.mod

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module github.com/travisghansen/freenas-iscsi-provisioner
2+
3+
go 1.15
4+
5+
require (
6+
github.com/dghubble/sling v1.3.0
7+
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
8+
github.com/jawher/mow.cli v1.2.0
9+
k8s.io/api v0.20.2
10+
k8s.io/apimachinery v0.20.2
11+
k8s.io/client-go v0.20.2
12+
sigs.k8s.io/sig-storage-lib-external-provisioner/v6 v6.2.0
13+
)

0 commit comments

Comments
 (0)