Skip to content

Commit 5f52b22

Browse files
authored
Merge pull request #829 from mattcary/update-101
Update base image to buster-v1.9.0
2 parents 81235c1 + 4317d51 commit 5f52b22

13 files changed

+23
-20
lines changed

Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414

1515

1616

17-
FROM golang:1.13.4 as builder
17+
FROM golang:1.13.15 as builder
1818
WORKDIR /go/src/sigs.k8s.io/gcp-compute-persistent-disk-csi-driver
1919
ADD . .
2020
RUN make
2121

2222
# MAD HACKS: Build a version first so we can take the scsi_id bin and put it somewhere else in our real build
23-
FROM k8s.gcr.io/build-image/debian-base-amd64:v2.1.3 as base
23+
FROM k8s.gcr.io/build-image/debian-base-amd64:buster-v1.9.0 as base
2424
RUN clean-install udev
2525

2626
# Start from Kubernetes Debian base
27-
FROM k8s.gcr.io/build-image/debian-base-amd64:v2.1.3
27+
FROM k8s.gcr.io/build-image/debian-base-amd64:buster-v1.9.0
2828
COPY --from=builder /go/src/sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/bin/gce-pd-csi-driver /gce-pd-csi-driver
2929
# Install necessary dependencies
3030
RUN clean-install util-linux e2fsprogs mount ca-certificates udev xfsprogs

deploy/kubernetes/install-kustomize.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ if [ -f "kustomize" ]; then
1717
rm kustomize
1818
fi
1919
echo "installing latest version of kustomize"
20-
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
20+
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash -x
2121
mv kustomize ${INSTALL_DIR}

pkg/gce-pd-csi-driver/utils_linux.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build !windows
1+
//go:build !windows
22

33
/*
44
Copyright 2020 The Kubernetes Authors.

pkg/gce-pd-csi-driver/utils_windows.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build windows
1+
//go:build windows
22

33
/*
44
Copyright 2020 The Kubernetes Authors.

pkg/mount-manager/safe-mounter_linux.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build linux
1+
//go:build linux
22

33
/*
44
Copyright 2018 The Kubernetes Authors.

pkg/mount-manager/safe-mounter_windows.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build windows
1+
//go:build windows
22

33
/*
44
Copyright 2020 The Kubernetes Authors.

pkg/mount-manager/statter_windows.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// +build windows
1+
//go:build windows
2+
23
/*
34
Copyright 2019 The Kubernetes Authors.
45

pkg/resizefs/resizefs_linux.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build linux
12
// +build linux
23

34
/*

pkg/resizefs/resizefs_unsupported.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build !linux
12
// +build !linux
23

34
/*
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
KUBE_GIT_COMMIT='somefakecommit'
22
KUBE_GIT_TREE_STATE='dirty'
3-
KUBE_GIT_VERSION='v888.888.888-fake-testing-master.version'
4-
KUBE_GIT_MAJOR='888'
5-
KUBE_GIT_MINOR='888+'
3+
KUBE_GIT_VERSION='v1.23.888-fake-testing-master.version'
4+
KUBE_GIT_MAJOR='1'
5+
KUBE_GIT_MINOR='23+'

test/k8s-integration/cluster.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ func getNormalizedVersion(kubeVersion, gkeVersion string) (string, error) {
312312

313313
}
314314

315-
func getKubeClusterVersion() (string, error) {
316-
out, err := exec.Command("kubectl", "version", "-o=json").CombinedOutput()
315+
func getKubeClusterVersion(k8sDir string) (string, error) {
316+
out, err := exec.Command(filepath.Join(k8sDir, "cluster", "kubectl.sh"), "version", "-o=json").CombinedOutput()
317317
if err != nil {
318318
return "", fmt.Errorf("failed to obtain cluster version, error: %v", err)
319319
}
@@ -325,14 +325,14 @@ func getKubeClusterVersion() (string, error) {
325325
var v version
326326
err = json.Unmarshal(out, &v)
327327
if err != nil {
328-
return "", fmt.Errorf("Failed to parse kubectl version output, error: %v", err)
328+
return "", fmt.Errorf("Failed to parse kubectl version output, error: %v: %s", err, out)
329329
}
330330

331331
return v.ServerVersion.GitVersion, nil
332332
}
333333

334-
func mustGetKubeClusterVersion() string {
335-
ver, err := getKubeClusterVersion()
334+
func mustGetKubeClusterVersion(k8sDir string) string {
335+
ver, err := getKubeClusterVersion(k8sDir)
336336
if err != nil {
337337
klog.Fatalf("Error: %v", err)
338338
}

test/k8s-integration/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ func handle() error {
355355
// Kubernetes version of GKE deployments are expected to be of the pattern x.y.z-gke.k,
356356
// hence we use the main.Version utils to parse and compare GKE managed cluster versions.
357357
// For clusters deployed on GCE, use the apimachinery version utils (which supports non-gke based semantic versioning).
358-
clusterVersion := mustGetKubeClusterVersion()
358+
clusterVersion := mustGetKubeClusterVersion(k8sDir)
359359
var testSkip string
360360
switch *deploymentStrat {
361361
case "gce":

test/run-k8s-integration.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ readonly boskos_resource_type="${GCE_PD_BOSKOS_RESOURCE_TYPE:-gce-project}"
1515
readonly do_driver_build="${GCE_PD_DO_DRIVER_BUILD:-true}"
1616
readonly deployment_strategy=${DEPLOYMENT_STRATEGY:-gce}
1717
readonly gke_cluster_version=${GKE_CLUSTER_VERSION:-latest}
18-
readonly kube_version=${GCE_PD_KUBE_VERSION:-master}
19-
readonly test_version=${TEST_VERSION:-master}
18+
readonly kube_version=${GCE_PD_KUBE_VERSION:-1.18.20}
19+
readonly test_version=${TEST_VERSION:-1.18.20}
2020
readonly gce_zone=${GCE_CLUSTER_ZONE:-us-central1-b}
2121
readonly gce_region=${GCE_CLUSTER_REGION:-}
2222
readonly image_type=${IMAGE_TYPE:-cos}

0 commit comments

Comments
 (0)