@@ -86,7 +86,7 @@ configvar CSI_PROW_BUILD_PLATFORMS "linux amd64 amd64; linux ppc64le ppc64le -pp
86
86
# which is disabled with GOFLAGS=-mod=vendor).
87
87
configvar GOFLAGS_VENDOR " $( [ -d vendor ] && echo ' -mod=vendor' ) " " Go flags for using the vendor directory"
88
88
89
- configvar CSI_PROW_GO_VERSION_BUILD " 1.18 " " Go version for building the component" # depends on component's source code
89
+ configvar CSI_PROW_GO_VERSION_BUILD " 1.19 " " Go version for building the component" # depends on component's source code
90
90
configvar CSI_PROW_GO_VERSION_E2E " " " override Go version for building the Kubernetes E2E test suite" # normally doesn't need to be set, see install_e2e
91
91
configvar CSI_PROW_GO_VERSION_SANITY " ${CSI_PROW_GO_VERSION_BUILD} " " Go version for building the csi-sanity test suite" # depends on CSI_PROW_SANITY settings below
92
92
configvar CSI_PROW_GO_VERSION_KIND " ${CSI_PROW_GO_VERSION_BUILD} " " Go version for building 'kind'" # depends on CSI_PROW_KIND_VERSION below
@@ -196,7 +196,7 @@ kindest/node:v1.18.20@sha256:738cdc23ed4be6cc0b7ea277a2ebcc454c8373d7d8fb991a7fc
196
196
# If the deployment script is called with CSI_PROW_TEST_DRIVER=<file name> as
197
197
# environment variable, then it must write a suitable test driver configuration
198
198
# into that file in addition to installing the driver.
199
- configvar CSI_PROW_DRIVER_VERSION " v1.8 .0" " CSI driver version"
199
+ configvar CSI_PROW_DRIVER_VERSION " v1.11 .0" " CSI driver version"
200
200
configvar CSI_PROW_DRIVER_REPO https://github.com/kubernetes-csi/csi-driver-host-path " CSI driver repo"
201
201
configvar CSI_PROW_DEPLOYMENT " " " deployment"
202
202
configvar CSI_PROW_DEPLOYMENT_SUFFIX " " " additional suffix in kubernetes-x.yy[suffix].yaml files"
@@ -228,6 +228,9 @@ configvar CSI_PROW_E2E_VERSION "$(version_to_git "${CSI_PROW_KUBERNETES_VERSION}
228
228
configvar CSI_PROW_E2E_REPO " https://github.com/kubernetes/kubernetes" " E2E repo"
229
229
configvar CSI_PROW_E2E_IMPORT_PATH " k8s.io/kubernetes" " E2E package"
230
230
231
+ # Local path for e2e tests. Set to "none" to disable.
232
+ configvar CSI_PROW_SIDECAR_E2E_IMPORT_PATH " none" " CSI Sidecar E2E package"
233
+
231
234
# csi-sanity testing from the csi-test repo can be run against the installed
232
235
# CSI driver. For this to work, deploying the driver must expose the Unix domain
233
236
# csi.sock as a TCP service for use by the csi-sanity command, which runs outside
@@ -282,13 +285,18 @@ tests_enabled () {
282
285
sanity_enabled () {
283
286
[ " ${CSI_PROW_TESTS_SANITY} " = " sanity" ] && tests_enabled " sanity"
284
287
}
288
+
289
+ sidecar_tests_enabled () {
290
+ [ " ${CSI_PROW_SIDECAR_E2E_IMPORT_PATH} " != " none" ]
291
+ }
292
+
285
293
tests_need_kind () {
286
294
tests_enabled " parallel" " serial" " serial-alpha" " parallel-alpha" ||
287
- sanity_enabled
295
+ sanity_enabled || sidecar_tests_enabled
288
296
}
289
297
tests_need_non_alpha_cluster () {
290
298
tests_enabled " parallel" " serial" ||
291
- sanity_enabled
299
+ sanity_enabled || sidecar_tests_enabled
292
300
}
293
301
tests_need_alpha_cluster () {
294
302
tests_enabled " parallel-alpha" " serial-alpha"
@@ -352,6 +360,11 @@ configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_
352
360
configvar CSI_PROW_E2E_GATES_LATEST ' ' " non alpha feature gates for latest Kubernetes"
353
361
configvar CSI_PROW_E2E_GATES " $( get_versioned_variable CSI_PROW_E2E_GATES " ${csi_prow_kubernetes_version_suffix} " ) " " non alpha E2E feature gates"
354
362
363
+ # Focus for local tests run in the sidecar E2E repo. Only used if CSI_PROW_SIDECAR_E2E_IMPORT_PATH
364
+ # is not set to "none". If empty, all tests in the sidecar repo will be run.
365
+ configvar CSI_PROW_SIDECAR_E2E_FOCUS ' ' " tags for local E2E tests"
366
+ configvar CSI_PROW_SIDECAR_E2E_SKIP ' ' " local tests that need to be skipped"
367
+
355
368
# Which external-snapshotter tag to use for the snapshotter CRD and snapshot-controller deployment
356
369
default_csi_snapshotter_version () {
357
370
if [ " ${CSI_PROW_KUBERNETES_VERSION} " = " latest" ] || [ " ${CSI_PROW_DRIVER_CANARY} " = " canary" ]; then
@@ -368,7 +381,7 @@ configvar CSI_SNAPSHOTTER_VERSION "$(default_csi_snapshotter_version)" "external
368
381
# whether they can run with the current cluster provider, but until
369
382
# they are, we filter them out by name. Like the other test selection
370
383
# variables, this is again a space separated list of regular expressions.
371
- configvar CSI_PROW_E2E_SKIP ' Disruptive' " tests that need to be skipped"
384
+ configvar CSI_PROW_E2E_SKIP ' \[ Disruptive\]|\[Feature:SELinux\] ' " tests that need to be skipped"
372
385
373
386
# This creates directories that are required for testing.
374
387
ensure_paths () {
@@ -942,6 +955,9 @@ install_e2e () {
942
955
return
943
956
fi
944
957
958
+ if sidecar_tests_enabled; then
959
+ run_with_go " ${CSI_PROW_GO_VERSION_BUILD} " go test -c -o " ${CSI_PROW_WORK} /e2e-local.test" " ${CSI_PROW_SIDECAR_E2E_IMPORT_PATH} "
960
+ fi
945
961
git_checkout " ${CSI_PROW_E2E_REPO} " " ${GOPATH} /src/${CSI_PROW_E2E_IMPORT_PATH} " " ${CSI_PROW_E2E_VERSION} " --depth=1 &&
946
962
if [ " ${CSI_PROW_E2E_IMPORT_PATH} " = " k8s.io/kubernetes" ]; then
947
963
patch_kubernetes " ${GOPATH} /src/${CSI_PROW_E2E_IMPORT_PATH} " " ${CSI_PROW_WORK} " &&
@@ -992,13 +1008,21 @@ run_e2e () (
992
1008
# the full Kubernetes E2E testsuite while only running a few tests.
993
1009
move_junit () {
994
1010
if ls " ${ARTIFACTS} " /junit_[0-9]* .xml 2> /dev/null > /dev/null; then
995
- run_filter_junit -t=" External.Storage|CSI.mock.volume" -o " ${ARTIFACTS} /junit_${name} .xml" " ${ARTIFACTS} " /junit_[0-9]* .xml && rm -f " ${ARTIFACTS} " /junit_[0-9]* .xml
1011
+ mkdir -p " ${ARTIFACTS} /junit/${name} " &&
1012
+ mkdir -p " ${ARTIFACTS} /junit/steps" &&
1013
+ run_filter_junit -t=" External.Storage|CSI.mock.volume" -o " ${ARTIFACTS} /junit/steps/junit_${name} .xml" " ${ARTIFACTS} " /junit_[0-9]* .xml &&
1014
+ mv " ${ARTIFACTS} " /junit_[0-9]* .xml " ${ARTIFACTS} /junit/${name} /"
996
1015
fi
997
1016
}
998
1017
trap move_junit EXIT
999
1018
1000
- cd " ${GOPATH} /src/${CSI_PROW_E2E_IMPORT_PATH} " &&
1001
- run_with_loggers env KUBECONFIG=" $KUBECONFIG " KUBE_TEST_REPO_LIST=" $( if [ -e " ${CSI_PROW_WORK} /e2e-repo-list" ]; then echo " ${CSI_PROW_WORK} /e2e-repo-list" ; fi) " ginkgo -v " $@ " " ${CSI_PROW_WORK} /e2e.test" -- -report-dir " ${ARTIFACTS} " -storage.testdriver=" ${CSI_PROW_WORK} /test-driver.yaml"
1019
+ if [ " ${name} " == " local" ]; then
1020
+ cd " ${GOPATH} /src/${CSI_PROW_SIDECAR_E2E_IMPORT_PATH} " &&
1021
+ run_with_loggers env KUBECONFIG=" $KUBECONFIG " KUBE_TEST_REPO_LIST=" $( if [ -e " ${CSI_PROW_WORK} /e2e-repo-list" ]; then echo " ${CSI_PROW_WORK} /e2e-repo-list" ; fi) " ginkgo -v " $@ " " ${CSI_PROW_WORK} /e2e-local.test" -- -report-dir " ${ARTIFACTS} " -report-prefix local
1022
+ else
1023
+ cd " ${GOPATH} /src/${CSI_PROW_E2E_IMPORT_PATH} " &&
1024
+ run_with_loggers env KUBECONFIG=" $KUBECONFIG " KUBE_TEST_REPO_LIST=" $( if [ -e " ${CSI_PROW_WORK} /e2e-repo-list" ]; then echo " ${CSI_PROW_WORK} /e2e-repo-list" ; fi) " ginkgo -v " $@ " " ${CSI_PROW_WORK} /e2e.test" -- -report-dir " ${ARTIFACTS} " -storage.testdriver=" ${CSI_PROW_WORK} /test-driver.yaml"
1025
+ fi
1002
1026
)
1003
1027
1004
1028
# Run csi-sanity against installed CSI driver.
@@ -1064,13 +1088,14 @@ kubectl exec "$pod" -c "${CSI_PROW_SANITY_CONTAINER}" -- /bin/sh -c "\${CHECK_PA
1064
1088
EOF
1065
1089
1066
1090
chmod u+x " ${CSI_PROW_WORK} " /* dir_in_pod.sh
1091
+ mkdir -p " ${ARTIFACTS} /junit/steps"
1067
1092
1068
1093
# This cannot run in parallel, because -csi.junitfile output
1069
1094
# from different Ginkgo nodes would go to the same file. Also the
1070
1095
# staging and target directories are the same.
1071
1096
run_with_loggers " ${CSI_PROW_WORK} /csi-sanity" \
1072
1097
-ginkgo.v \
1073
- -csi.junitfile " ${ARTIFACTS} /junit_sanity.xml" \
1098
+ -csi.junitfile " ${ARTIFACTS} /junit/steps/ junit_sanity.xml" \
1074
1099
-csi.endpoint " dns:///$( docker inspect -f ' {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' csi-prow-control-plane) :$( kubectl get " services/${CSI_PROW_SANITY_SERVICE} " -o " jsonpath={..nodePort}" ) " \
1075
1100
-csi.stagingdir " /tmp/staging" \
1076
1101
-csi.mountdir " /tmp/mount" \
@@ -1100,7 +1125,8 @@ make_test_to_junit () {
1100
1125
# Plain make-test.xml was not delivered as text/xml by the web
1101
1126
# server and ignored by spyglass. It seems that the name has to
1102
1127
# match junit*.xml.
1103
- out=" ${ARTIFACTS} /junit_make_test.xml"
1128
+ out=" ${ARTIFACTS} /junit/steps/junit_make_test.xml"
1129
+ mkdir -p " $( dirname " $out " ) "
1104
1130
testname=
1105
1131
echo " <testsuite>" >> " $out "
1106
1132
@@ -1310,6 +1336,15 @@ main () {
1310
1336
ret=1
1311
1337
fi
1312
1338
fi
1339
+
1340
+ if sidecar_tests_enabled; then
1341
+ if ! run_e2e local \
1342
+ -focus=" ${CSI_PROW_SIDECAR_E2E_FOCUS} " \
1343
+ -skip=" $( regex_join " ${CSI_PROW_E2E_SERIAL} " ) " ; then
1344
+ warn " E2E sidecar failed"
1345
+ ret=1
1346
+ fi
1347
+ fi
1313
1348
fi
1314
1349
delete_cluster_inside_prow_job non-alpha
1315
1350
fi
@@ -1355,8 +1390,8 @@ main () {
1355
1390
fi
1356
1391
1357
1392
# Merge all junit files into one. This gets rid of duplicated "skipped" tests.
1358
- if ls " ${ARTIFACTS} " /junit_* .xml 2> /dev/null >&2 ; then
1359
- run_filter_junit -o " ${CSI_PROW_WORK } /junit_final.xml" " ${ARTIFACTS} " /junit_ * .xml && rm " ${ARTIFACTS} " / junit_* .xml && mv " ${CSI_PROW_WORK} /junit_final.xml " " ${ARTIFACTS} "
1393
+ if ls " ${ARTIFACTS} " /junit/steps/ junit_* .xml 2> /dev/null >&2 ; then
1394
+ run_filter_junit -o " ${ARTIFACTS } /junit_final.xml" " ${ARTIFACTS} " /junit/steps/ junit_* .xml
1360
1395
fi
1361
1396
1362
1397
return " $ret "
0 commit comments