Skip to content

Commit 384ffcc

Browse files
committed
docker file
1 parent 271f841 commit 384ffcc

File tree

7 files changed

+89
-17
lines changed

7 files changed

+89
-17
lines changed

Diff for: Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM --platform=$BUILDPLATFORM golang:1.23.0 as builder
15+
FROM --platform=linux golang:1.23.0 as builder
1616

1717
ARG STAGINGVERSION
1818
ARG TARGETPLATFORM
1919

2020
WORKDIR /go/src/sigs.k8s.io/gcp-compute-persistent-disk-csi-driver
2121
ADD . .
22-
RUN GOARCH=$(echo $TARGETPLATFORM | cut -f2 -d '/') GCE_PD_CSI_STAGING_VERSION=$STAGINGVERSION make gce-pd-driver
22+
RUN GOARCH=$(echo $TARGETPLATFORM | cut -f2 -d '/') GCE_PD_CSI_STAGING_VERSION=test-e2e-v1 make gce-pd-driver TARGETPLATFORM=linux/amd64
2323

2424
# Start from Kubernetes Debian base.
2525

Diff for: Makefile

+22-6
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,18 @@ else
4747
$(warning gcp-pd-driver-windows only supports amd64.)
4848
endif
4949

50+
# build-container: require-GCE_PD_CSI_STAGING_IMAGE require-GCE_PD_CSI_STAGING_VERSION init-buildx
51+
# $(DOCKER) buildx build --platform=linux --progress=plain \
52+
# -t $(STAGINGIMAGE):$(STAGINGVERSION) \
53+
# --build-arg BUILDPLATFORM=linux \
54+
# --build-arg STAGINGVERSION=$(STAGINGVERSION)
55+
# --push .
56+
5057
build-container: require-GCE_PD_CSI_STAGING_IMAGE require-GCE_PD_CSI_STAGING_VERSION init-buildx
51-
$(DOCKER) buildx build --platform=linux --progress=plain \
58+
$(DOCKER) build --load --platform=linux --progress=plain \
5259
-t $(STAGINGIMAGE):$(STAGINGVERSION) \
5360
--build-arg BUILDPLATFORM=linux \
54-
--build-arg STAGINGVERSION=$(STAGINGVERSION) \
61+
--build-arg STAGINGVERSION=$(STAGINGVERSION)
5562
--push .
5663

5764
build-and-push-windows-container-ltsc2019: require-GCE_PD_CSI_STAGING_IMAGE init-buildx
@@ -88,11 +95,20 @@ validate-container-linux-arm64: init-buildx
8895
--build-arg BUILDPLATFORM=linux \
8996
--build-arg STAGINGVERSION=$(STAGINGVERSION) .
9097

98+
# build-and-push-container-linux-amd64: require-GCE_PD_CSI_STAGING_IMAGE init-buildx
99+
# $(DOCKER) buildx build --platform=linux/amd64 \
100+
# -t $(STAGINGIMAGE):$(STAGINGVERSION)_linux_amd64 \
101+
# --build-arg BUILDPLATFORM=linux \
102+
# --build-arg STAGINGVERSION=$(STAGINGVERSION) --push .
103+
104+
91105
build-and-push-container-linux-amd64: require-GCE_PD_CSI_STAGING_IMAGE init-buildx
92-
$(DOCKER) buildx build --platform=linux/amd64 \
93-
-t $(STAGINGIMAGE):$(STAGINGVERSION)_linux_amd64 \
94-
--build-arg BUILDPLATFORM=linux \
95-
--build-arg STAGINGVERSION=$(STAGINGVERSION) --push .
106+
$(DOCKER) build -f .
107+
108+
# --platform=linux/amd64 \
109+
# -t $(STAGINGIMAGE):$(STAGINGVERSION)_linux_amd64 \
110+
# --build-arg BUILDPLATFORM=linux \
111+
# --build-arg STAGINGVERSION=$(STAGINGVERSION) --push .
96112

97113
build-and-push-container-linux-arm64: require-GCE_PD_CSI_STAGING_IMAGE init-buildx
98114
$(DOCKER) buildx build --file=Dockerfile --platform=linux/arm64 \

Diff for: deploy/kubernetes/images/stable-master/image.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ kind: ImageTagTransformer
3030
metadata:
3131
name: imagetag-csi-snapshotter
3232
imageTag:
33-
name: registry.k8s.io/sig-storage/csi-snapshotter
34-
newTag: "v6.3.3"
33+
name: us-central1-docker.pkg.dev/amacaskill-gke-dev/external-snapshotter/logging-image:latest
34+
newTag: "latest"
3535
---
3636

3737
apiVersion: builtin
@@ -51,6 +51,6 @@ imageTag:
5151
name: gke.gcr.io/gcp-compute-persistent-disk-csi-driver
5252
# Don't change stable image without changing pdImagePlaceholder in
5353
# test/k8s-integration/main.go
54-
newName: registry.k8s.io/cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver
55-
newTag: "v1.15.0"
54+
newName: us-central1-docker.pkg.dev/amacaskill-gke-dev/gcp-compute-persistent-disk-csi-driver/logging-image:latest
55+
newTag: "latest"
5656
---

Diff for: some-dir

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 78ecea5a708046ee2d4e71be5dc73393b8d7d7cc

Diff for: test-config.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
StorageClass:
2+
FromFile: /usr/local/google/home/amacaskill/go/src/sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/test/k8s-integration/config/sc-standard.yaml
3+
4+
SnapshotClass:
5+
FromFile: /usr/local/google/home/amacaskill/go/src/sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/test/k8s-integration/config/pd-volumesnapshotclass.yaml
6+
7+
8+
Timeouts:
9+
DataSourceProvision: 480s
10+
11+
12+
DriverInfo:
13+
Name: csi-gcepd-sc-standard--pd-volumesnapshotclass
14+
SupportedFsType:
15+
ext2:
16+
ext3:
17+
ext4:
18+
xfs:
19+
20+
Capabilities:
21+
persistence: true
22+
block: true
23+
fsGroup: true
24+
exec: true
25+
multipods: true
26+
topology: true
27+
controllerExpansion: true
28+
nodeExpansion: true
29+
snapshotDataSource: true
30+
pvcDataSource: true
31+
32+
StressTestOptions:
33+
NumPods: 10
34+
NumRestarts: 10
35+
SupportedMountOption:
36+
debug:
37+
noatime:
38+
SupportedSizeRange:
39+
Min: 5Gi
40+
Max: 64Ti
41+
TopologyKeys:
42+
- topology.gke.io/zone
43+
NumAllowedTopologies: 1

Diff for: test/k8s-integration/main.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func main() {
133133
}
134134

135135
if *useGKEManagedDriver {
136-
ensureVariableVal(deploymentStrat, "gke", "deployment strategy must be GKE for using managed driver")
136+
// ensureVariableVal(deploymentStrat, "gke", "deployment strategy must be GKE for using managed driver")
137137
ensureFlag(doDriverBuild, false, "'do-driver-build' must be false when using GKE managed driver")
138138
ensureFlag(teardownDriver, false, "'teardown-driver' must be false when using GKE managed driver")
139139
ensureVariable(stagingImage, false, "'staging-image' must not be set when using GKE managed driver")
@@ -904,6 +904,7 @@ func runTestsWithConfig(testParams *testParameters, testConfigArg, reportPrefix
904904
kubeTestArgs := []string{
905905
"--test",
906906
"--ginkgo-parallel",
907+
"--provider=gce",
907908
"--check-version-skew=false",
908909
fmt.Sprintf("--test_args=%s", testArgs),
909910
}

Diff for: test/run-k8s-integration-local.sh

+15-4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ make -C "${PKGDIR}" test-k8s-integration
3232
# --deployment-strategy=gce --kube-version=${kube_version} \
3333
# --test-version=${test_version} --num-nodes=3
3434

35+
${PKGDIR}/bin/k8s-integration-test --run-in-prow=false \
36+
--test-focus="External.Storage.*VolumeSnapshotDataSource" \
37+
--local-k8s-dir=$KTOP --storageclass-files=sc-standard.yaml \
38+
--snapshotclass-files=pd-volumesnapshotclass.yaml \
39+
--do-driver-build=false --teardown-driver=false \
40+
--gce-zone="us-central1-c" --num-nodes=${NUM_NODES:-3} \
41+
--use-gke-managed-driver=true \
42+
--deployment-strategy="gke" \
43+
--teardown-cluster=false --bringup-cluster=false \
44+
--gke-cluster-version="1.31" --gke-cluster-name="amacaskill-cluster"
45+
3546

3647
# This version of the command creates a regional GKE cluster. It will test with
3748
# the latest GKE version and the master test version
@@ -94,10 +105,10 @@ make -C "${PKGDIR}" test-k8s-integration
94105
#
95106
# As with all other methods local credentials must be set by running
96107
# gcloud auth application-default login
97-
"${PKGDIR}/bin/k8s-integration-test" --run-in-prow=false \
98-
--deploy-overlay-name=noauth --bringup-cluster=false --teardown-cluster=false --local-k8s-dir="$KTOP" \
99-
--storageclass-files=sc-standard.yaml --do-driver-build=false --test-focus='External.Storage' \
100-
--gce-zone="us-central1-b" --num-nodes="${NUM_NODES:-3}"
108+
# "${PKGDIR}/bin/k8s-integration-test" --run-in-prow=false \
109+
# --deploy-overlay-name=noauth --bringup-cluster=false --teardown-cluster=false --local-k8s-dir="$KTOP" \
110+
# --storageclass-files=sc-standard.yaml --do-driver-build=false --test-focus='External.Storage' \
111+
# --gce-zone="us-central1-b" --num-nodes="${NUM_NODES:-3}"
101112

102113

103114
# This version of the command does not build the driver or K8s, points to a

0 commit comments

Comments
 (0)