Skip to content

Commit

Permalink
deploy: move test driver definition into driver repo
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pohly committed Feb 10, 2020
1 parent 37d9b57 commit 1147874
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 0 deletions.
1 change: 1 addition & 0 deletions deploy/kubernetes-1.15/deploy.sh
15 changes: 15 additions & 0 deletions deploy/kubernetes-1.15/test-driver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This file describes how to test this deployment of the CSI hostpath driver
# using the Kubernetes 1.15 E2E test suite. For details see:
# https://github.com/kubernetes/kubernetes/tree/v1.15.0/test/e2e/storage/external

StorageClass:
FromName: true
SnapshotClass:
FromName: true
DriverInfo:
Name: hostpath.csi.k8s.io
Capabilities:
block: true
dataSource: true
multipods: true
persistence: true
1 change: 1 addition & 0 deletions deploy/kubernetes-1.16/deploy.sh
17 changes: 17 additions & 0 deletions deploy/kubernetes-1.16/test-driver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This file describes how to test this deployment of the CSI hostpath driver
# using the Kubernetes 1.16 E2E test suite. For details see:
# https://github.com/kubernetes/kubernetes/tree/v1.16.0/test/e2e/storage/external

StorageClass:
FromName: true
SnapshotClass:
FromName: true
DriverInfo:
Name: hostpath.csi.k8s.io
Capabilities:
block: true
dataSource: true
multipods: true
persistence: true
singleNodeVolume: true
topology: true
1 change: 1 addition & 0 deletions deploy/kubernetes-1.17/deploy.sh
20 changes: 20 additions & 0 deletions deploy/kubernetes-1.17/test-driver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file describes how to test this deployment of the CSI hostpath driver
# using the Kubernetes 1.17 E2E test suite. For details see:
# https://github.com/kubernetes/kubernetes/tree/v1.17.0/test/e2e/storage/external

StorageClass:
FromName: true
SnapshotClass:
FromName: true
DriverInfo:
Name: hostpath.csi.k8s.io
Capabilities:
block: true
controllerExpansion: true
exec: true
multipods: true
nodeExpansion: true
persistence: true
singleNodeVolume: true
snapshotDataSource: true
topology: true
6 changes: 6 additions & 0 deletions deploy/util/deploy-hostpath.sh
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,9 @@ driver_version="$(basename "${BASE_DIR}")"
if version_gt "$driver_version" "1.16"; then
kubectl apply -f "https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${snapshotter_version}/examples/kubernetes/snapshotclass.yaml"
fi
# Create a test driver configuration in the place where the prow job
# expects it?
if [ "${CSI_PROW_TEST_DRIVER}" ]; then
cp "${BASE_DIR}/test-driver.yaml" "${CSI_PROW_TEST_DRIVER}"
fi

0 comments on commit 1147874

Please sign in to comment.