Skip to content

Commit 9abf63f

Browse files
committed
deploy: move test driver definition into driver repo
This will enable the removal of hostpath specific code from csi-release-tools. The deploy script (now using the name "deploy.sh" because that can be the same for all CSI drivers) is asked to create a test driver configuration in addition to installing the driver. The script could do that dynamically. But in the CSI driver hostpath repo we simply keep one test-driver.yaml per deployment, which works based on the assumption that the E2E test suite that corresponds to the Kubernetes version is used for testing, which is the case nowadays. These three test-driver.yaml are indeed different because the name of capabilities changed over time. prow.sh used to have a union of all those names. Now each file really only uses the name that is applicable. "topology" support hadn't been enabled in prow.sh. This looks like an oversight, so it gets added now.
1 parent 66005a9 commit 9abf63f

File tree

7 files changed

+63
-0
lines changed

7 files changed

+63
-0
lines changed

deploy/kubernetes-1.15/deploy.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../util/deploy-hostpath.sh
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file describes how to test this deployment of the CSI hostpath driver
2+
# using the Kubernetes 1.15 E2E test suite. For details see:
3+
# https://github.com/kubernetes/kubernetes/tree/v1.15.0/test/e2e/storage/external
4+
5+
StorageClass:
6+
FromName: true
7+
SnapshotClass:
8+
FromName: true
9+
DriverInfo:
10+
Name: hostpath.csi.k8s.io
11+
Capabilities:
12+
block: true
13+
exec: true
14+
dataSource: true
15+
multipods: true
16+
persistence: true

deploy/kubernetes-1.16/deploy.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../util/deploy-hostpath.sh
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# This file describes how to test this deployment of the CSI hostpath driver
2+
# using the Kubernetes 1.16 E2E test suite. For details see:
3+
# https://github.com/kubernetes/kubernetes/tree/v1.16.0/test/e2e/storage/external
4+
5+
StorageClass:
6+
FromName: true
7+
SnapshotClass:
8+
FromName: true
9+
DriverInfo:
10+
Name: hostpath.csi.k8s.io
11+
Capabilities:
12+
block: true
13+
controllerExpansion: true
14+
exec: true
15+
multipods: true
16+
nodeExpansion: true
17+
persistence: true
18+
snapshotDataSource: true

deploy/kubernetes-1.17/deploy.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../util/deploy-hostpath.sh
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This file describes how to test this deployment of the CSI hostpath driver
2+
# using the Kubernetes 1.17 E2E test suite. For details see:
3+
# https://github.com/kubernetes/kubernetes/tree/v1.17.0/test/e2e/storage/external
4+
5+
StorageClass:
6+
FromName: true
7+
SnapshotClass:
8+
FromName: true
9+
DriverInfo:
10+
Name: hostpath.csi.k8s.io
11+
Capabilities:
12+
block: true
13+
controllerExpansion: true
14+
exec: true
15+
multipods: true
16+
nodeExpansion: true
17+
persistence: true
18+
singleNodeVolume: true
19+
snapshotDataSource: true
20+
topology: true

deploy/util/deploy-hostpath.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,9 @@ driver_version="$(basename "${BASE_DIR}")"
225225
if version_gt "$driver_version" "1.16"; then
226226
kubectl apply -f "https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${snapshotter_version}/examples/kubernetes/snapshotclass.yaml"
227227
fi
228+
229+
# Create a test driver configuration in the place where the prow job
230+
# expects it?
231+
if [ "${CSI_PROW_TEST_DRIVER}" ]; then
232+
cp "${BASE_DIR}/test-driver.yaml" "${CSI_PROW_TEST_DRIVER}"
233+
fi

0 commit comments

Comments
 (0)