Skip to content

Commit b35eedb

Browse files
committed
Squashed 'release-tools/' changes from c0a4fb1d..a6a1a797
kubernetes-csi/csi-release-tools@a6a1a797 Merge kubernetes-csi/csi-release-tools#176 from pohly/go-1.17.3 kubernetes-csi/csi-release-tools@0a2cf636 prow.sh: bump Go to 1.17.3 kubernetes-csi/csi-release-tools@fc29fdde Merge kubernetes-csi/csi-release-tools#141 from pohly/prune-replace-optional kubernetes-csi/csi-release-tools@5b9a1e06 Merge kubernetes-csi/csi-release-tools#175 from jimdaga/patch-1 kubernetes-csi/csi-release-tools@5eeb6029 images: use k8s-staging-test-infra/gcb-docker-gcloud kubernetes-csi/csi-release-tools@5489de6e Merge kubernetes-csi/csi-release-tools#174 from mauriciopoppe/bump-kind-version kubernetes-csi/csi-release-tools@0c675d4c Bump kind version to v0.11.1 kubernetes-csi/csi-release-tools@ef69a88d Merge kubernetes-csi/csi-release-tools#173 from nick5616/add-ws2022 kubernetes-csi/csi-release-tools@44c710c5 added WS2022 to build platforms kubernetes-csi/csi-release-tools@0883be4f Merge kubernetes-csi/csi-release-tools#171 from pohly/example-commands kubernetes-csi/csi-release-tools@02cda510 build.make: support binaries outside of cmd, with optional go.mod kubernetes-csi/csi-release-tools@65922ea2 Merge kubernetes-csi/csi-release-tools#170 from pohly/canary-snapshot-controller kubernetes-csi/csi-release-tools@c0bdfb3a prow.sh: deploy canary snapshot-controller in canary jobs kubernetes-csi/csi-release-tools@0438f15a Merge kubernetes-csi/csi-release-tools#167 from c0va23/feature/release-armv7-image kubernetes-csi/csi-release-tools@4786f4d0 Merge kubernetes-csi/csi-release-tools#168 from msau42/update-release-prereq kubernetes-csi/csi-release-tools@6a2dc64a Remove requirement to be top-level approver. Only maintainers membership is required to do a release kubernetes-csi/csi-release-tools@30a4f7bb Release armv7 image kubernetes-csi/csi-release-tools@ac8108f1 Merge kubernetes-csi/csi-release-tools#165 from consideRatio/pr/update-github-links-ref-to-master-to-HEAD kubernetes-csi/csi-release-tools@999b483d docs: make github links reference HEAD instead of main kubernetes-csi/csi-release-tools@fd670693 docs: make github links reference HEAD instead of master kubernetes-csi/csi-release-tools@b46691a4 go-get-kubernetes.sh: make replace statement pruning optional git-subtree-dir: release-tools git-subtree-split: a6a1a7979bf3ebc2bb10d0e33dd11ab281d6d39e
1 parent 26f1f1f commit b35eedb

7 files changed

+84
-44
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ images. Building from master creates the main `canary` image.
4242
Sharing and updating
4343
--------------------
4444

45-
[`git subtree`](https://github.com/git/git/blob/master/contrib/subtree/git-subtree.txt)
45+
[`git subtree`](https://github.com/git/git/blob/HEAD/contrib/subtree/git-subtree.txt)
4646
is the recommended way of maintaining a copy of the rules inside the
4747
`release-tools` directory of a project. This way, it is possible to make
4848
changes also locally, test them and then push them back to the shared
@@ -89,7 +89,7 @@ main
8989

9090
All Kubernetes-CSI repos are expected to switch to Prow. For details
9191
on what is enabled in Prow, see
92-
https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-csi
92+
https://github.com/kubernetes/test-infra/tree/HEAD/config/jobs/kubernetes-csi
9393

9494
Test results for periodic jobs are visible in
9595
https://testgrid.k8s.io/sig-storage-csi-ci

SECURITY_CONTACTS

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# to for triaging and handling of incoming issues.
55
#
66
# The below names agree to abide by the
7-
# [Embargo Policy](https://github.com/kubernetes/sig-release/blob/master/security-release-process-documentation/security-release-process.md#embargo-policy)
7+
# [Embargo Policy](https://github.com/kubernetes/sig-release/blob/HEAD/security-release-process-documentation/security-release-process.md#embargo-policy)
88
# and will be removed and replaced if they violate that agreement.
99
#
1010
# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE

SIDECAR_RELEASE_PROCESS.md

+11-16
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,8 @@ The release manager must:
99
* Be a member of the kubernetes-csi organization. Open an
1010
[issue](https://github.com/kubernetes/org/issues/new?assignees=&labels=area%2Fgithub-membership&template=membership.md&title=REQUEST%3A+New+membership+for+%3Cyour-GH-handle%3E) in
1111
kubernetes/org to request membership
12-
* Be a top level approver for the repository. To become a top level approver,
13-
the candidate must demonstrate ownership and deep knowledge of the repository
14-
through active maintenance, responding to and fixing issues, reviewing PRs,
15-
test triage.
16-
* Be part of the maintainers or admin group for the repository. admin is a
17-
superset of maintainers, only maintainers level is required for cutting a
18-
release. Membership can be requested by submitting a PR to kubernetes/org.
12+
* Be part of the maintainers group for the repository.
13+
Membership can be requested by submitting a PR to kubernetes/org.
1914
[Example](https://github.com/kubernetes/org/pull/1467)
2015

2116
## Updating CI Jobs
@@ -31,16 +26,16 @@ naming convention `<hostpath-deployment-version>-on-<kubernetes-version>`.
3126
1. "-on-master" jobs are the closest reflection to the new Kubernetes version.
3227
1. Fixes to our prow.sh CI script can be tested in the [CSI hostpath
3328
repo](https://github.com/kubernetes-csi/csi-driver-host-path) by modifying
34-
[prow.sh](https://github.com/kubernetes-csi/csi-driver-host-path/blob/master/release-tools/prow.sh)
29+
[prow.sh](https://github.com/kubernetes-csi/csi-driver-host-path/blob/HEAD/release-tools/prow.sh)
3530
along with any overrides in
36-
[.prow.sh](https://github.com/kubernetes-csi/csi-driver-host-path/blob/master/.prow.sh)
31+
[.prow.sh](https://github.com/kubernetes-csi/csi-driver-host-path/blob/HEAD/.prow.sh)
3732
to mirror the failing environment. Once e2e tests are passing (verify-unit tests
3833
will fail), then the prow.sh changes can be submitted to [csi-release-tools](https://github.com/kubernetes-csi/csi-release-tools).
3934
1. Changes can then be updated in all the sidecar repos and hostpath driver repo
4035
by following the [update
41-
instructions](https://github.com/kubernetes-csi/csi-release-tools/blob/master/README.md#sharing-and-updating).
36+
instructions](https://github.com/kubernetes-csi/csi-release-tools/blob/HEAD/README.md#sharing-and-updating).
4237
1. New pull and CI jobs are configured by adding new K8s versions to the top of
43-
[gen-jobs.sh](https://github.com/kubernetes/test-infra/blob/master/config/jobs/kubernetes-csi/gen-jobs.sh).
38+
[gen-jobs.sh](https://github.com/kubernetes/test-infra/blob/HEAD/config/jobs/kubernetes-csi/gen-jobs.sh).
4439
New pull jobs that have been unverified should be initially made optional by
4540
setting the new K8s version as
4641
[experimental](https://github.com/kubernetes/test-infra/blob/a1858f46d6014480b130789df58b230a49203a64/config/jobs/kubernetes-csi/gen-jobs.sh#L40).
@@ -52,7 +47,7 @@ naming convention `<hostpath-deployment-version>-on-<kubernetes-version>`.
5247
1. Identify all issues and ongoing PRs that should go into the release, and
5348
drive them to resolution.
5449
1. Download v2.8+ [K8s release notes
55-
generator](https://github.com/kubernetes/release/tree/master/cmd/release-notes)
50+
generator](https://github.com/kubernetes/release/tree/HEAD/cmd/release-notes)
5651
1. Generate release notes for the release. Replace arguments with the relevant
5752
information.
5853
* Clean up old cached information (also needed if you are generating release
@@ -95,15 +90,15 @@ naming convention `<hostpath-deployment-version>-on-<kubernetes-version>`.
9590
1. Check [image build status](https://k8s-testgrid.appspot.com/sig-storage-image-build).
9691
1. Promote images from k8s-staging-sig-storage to k8s.gcr.io/sig-storage. From
9792
the [k8s image
98-
repo](https://github.com/kubernetes/k8s.io/tree/main/k8s.gcr.io/images/k8s-staging-sig-storage),
93+
repo](https://github.com/kubernetes/k8s.io/tree/HEAD/k8s.gcr.io/images/k8s-staging-sig-storage),
9994
run `./generate.sh > images.yaml`, and send a PR with the updated images.
10095
Once merged, the image promoter will copy the images from staging to prod.
10196
1. Update [kubernetes-csi/docs](https://github.com/kubernetes-csi/docs) sidecar
10297
and feature pages with the new released version.
10398
1. After all the sidecars have been released, update
104-
CSI hostpath driver with the new sidecars in the [CSI repo](https://github.com/kubernetes-csi/csi-driver-host-path/tree/master/deploy)
99+
CSI hostpath driver with the new sidecars in the [CSI repo](https://github.com/kubernetes-csi/csi-driver-host-path/tree/HEAD/deploy)
105100
and [k/k
106-
in-tree](https://github.com/kubernetes/kubernetes/tree/master/test/e2e/testing-manifests/storage-csi/hostpath/hostpath)
101+
in-tree](https://github.com/kubernetes/kubernetes/tree/HEAD/test/e2e/testing-manifests/storage-csi/hostpath/hostpath)
107102

108103
## Adding support for a new Kubernetes release
109104

@@ -134,7 +129,7 @@ naming convention `<hostpath-deployment-version>-on-<kubernetes-version>`.
134129
1. Once all sidecars for the new Kubernetes release are released,
135130
either bump the version number of the images in the existing
136131
[csi-driver-host-path
137-
deployments](https://github.com/kubernetes-csi/csi-driver-host-path/tree/master/deploy)
132+
deployments](https://github.com/kubernetes-csi/csi-driver-host-path/tree/HEAD/deploy)
138133
and/or create a new deployment, depending on what Kubernetes
139134
release an updated sidecar is compatible with. If no new deployment
140135
is needed, then add a symlink to document that there intentionally

build.make

+9-5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ SHELL := /bin/bash
2121
# set in main Makefile of a repository.
2222
# CMDS=
2323

24+
# Normally, commands are expected in "cmd". That can be changed for a
25+
# repository to something else by setting CMDS_DIR before including build.make.
26+
CMDS_DIR ?= cmd
27+
2428
# This is the default. It can be overridden in the main Makefile after
2529
# including build.make.
2630
REGISTRY_NAME?=quay.io/k8scsi
@@ -90,15 +94,15 @@ $(CMDS:%=build-%): build-%: check-go-version-go
9094
if ! [ $${#os_arch_seen_pre} = $${#os_arch_seen} ]; then \
9195
continue; \
9296
fi; \
93-
if ! (set -x; CGO_ENABLED=0 GOOS="$$os" GOARCH="$$arch" go build $(GOFLAGS_VENDOR) -a -ldflags '$(FULL_LDFLAGS)' -o "./bin/$*$$suffix" ./cmd/$*); then \
97+
if ! (set -x; cd ./$(CMDS_DIR)/$* && CGO_ENABLED=0 GOOS="$$os" GOARCH="$$arch" go build $(GOFLAGS_VENDOR) -a -ldflags '$(FULL_LDFLAGS)' -o "$(abspath ./bin)/$*$$suffix" .); then \
9498
echo "Building $* for GOOS=$$os GOARCH=$$arch failed, see error(s) above."; \
9599
exit 1; \
96100
fi; \
97101
os_arch_seen+=";$$os-$$arch"; \
98102
done
99103

100104
$(CMDS:%=container-%): container-%: build-%
101-
docker build -t $*:latest -f $(shell if [ -e ./cmd/$*/Dockerfile ]; then echo ./cmd/$*/Dockerfile; else echo Dockerfile; fi) --label revision=$(REV) .
105+
docker build -t $*:latest -f $(shell if [ -e ./$(CMDS_DIR)/$*/Dockerfile ]; then echo ./$(CMDS_DIR)/$*/Dockerfile; else echo Dockerfile; fi) --label revision=$(REV) .
102106

103107
$(CMDS:%=push-%): push-%: container-%
104108
set -ex; \
@@ -133,7 +137,7 @@ DOCKER_BUILDX_CREATE_ARGS ?=
133137
# This target builds a multiarch image for one command using Moby BuildKit builder toolkit.
134138
# Docker Buildx is included in Docker 19.03.
135139
#
136-
# ./cmd/<command>/Dockerfile[.Windows] is used if found, otherwise Dockerfile[.Windows].
140+
# ./$(CMDS_DIR)/<command>/Dockerfile[.Windows] is used if found, otherwise Dockerfile[.Windows].
137141
# It is currently optional: if no such file exists, Windows images are not included,
138142
# even when Windows is listed in BUILD_PLATFORMS. That way, projects can test that
139143
# Windows binaries can be built before adding a Dockerfile for it.
@@ -146,8 +150,8 @@ $(CMDS:%=push-multiarch-%): push-multiarch-%: check-pull-base-ref build-%
146150
export DOCKER_CLI_EXPERIMENTAL=enabled; \
147151
docker buildx create $(DOCKER_BUILDX_CREATE_ARGS) --use --name multiarchimage-buildertest; \
148152
trap "docker buildx rm multiarchimage-buildertest" EXIT; \
149-
dockerfile_linux=$$(if [ -e ./cmd/$*/Dockerfile ]; then echo ./cmd/$*/Dockerfile; else echo Dockerfile; fi); \
150-
dockerfile_windows=$$(if [ -e ./cmd/$*/Dockerfile.Windows ]; then echo ./cmd/$*/Dockerfile.Windows; else echo Dockerfile.Windows; fi); \
153+
dockerfile_linux=$$(if [ -e ./$(CMDS_DIR)/$*/Dockerfile ]; then echo ./$(CMDS_DIR)/$*/Dockerfile; else echo Dockerfile; fi); \
154+
dockerfile_windows=$$(if [ -e ./$(CMDS_DIR)/$*/Dockerfile.Windows ]; then echo ./$(CMDS_DIR)/$*/Dockerfile.Windows; else echo Dockerfile.Windows; fi); \
151155
if [ '$(BUILD_PLATFORMS)' ]; then build_platforms='$(BUILD_PLATFORMS)'; else build_platforms="linux amd64"; fi; \
152156
if ! [ -f "$$dockerfile_windows" ]; then \
153157
build_platforms="$$(echo "$$build_platforms" | sed -e 's/windows *[^ ]* *.exe *[^ ]* *[^ ]*//g' -e 's/; *;/;/g' -e 's/;[ ]*$$//')"; \

cloudbuild.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
# because binaries will get built for different architectures and then
1111
# get copied from the built host into the container image
1212
#
13-
# See https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md
13+
# See https://github.com/kubernetes/test-infra/blob/HEAD/config/jobs/image-pushing/README.md
1414
# for more details on image pushing process in Kubernetes.
1515
#
16-
# To promote release images, see https://github.com/kubernetes/k8s.io/tree/main/k8s.gcr.io/images/k8s-staging-sig-storage.
16+
# To promote release images, see https://github.com/kubernetes/k8s.io/tree/HEAD/k8s.gcr.io/images/k8s-staging-sig-storage.
1717

1818
# This must be specified in seconds. If omitted, defaults to 600s (10 mins).
1919
# Building three images in external-snapshotter takes roughly half an hour,
@@ -27,7 +27,7 @@ steps:
2727
# The image must contain bash and curl. Ideally it should also contain
2828
# the desired version of Go (currently defined in release-tools/prow.sh),
2929
# but that just speeds up the build and is not required.
30-
- name: 'gcr.io/k8s-testimages/gcb-docker-gcloud:v20210331-c732583'
30+
- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20210917-12df099d55'
3131
entrypoint: ./.cloudbuild.sh
3232
env:
3333
- GIT_TAG=${_GIT_TAG}

go-get-kubernetes.sh

+32-3
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,43 @@ set -o pipefail
2626
cmd=$0
2727

2828
function help () {
29-
echo "$cmd <kubernetes version = x.y.z> - update all components from kubernetes/kubernetes to that version"
29+
cat <<EOF
30+
$cmd -p <kubernetes version = x.y.z>
31+
32+
Update all components from kubernetes/kubernetes to that version.
33+
34+
By default, replace statements are added for all Kubernetes packages,
35+
whether they are used or not. This is useful when preparing a
36+
repository for using k8s.io/kubernetes, because those replace
37+
statements are needed to avoid "unknown revision v0.0.0" errors
38+
(https://github.com/kubernetes/kubernetes/issues/79384).
39+
40+
With the optional -p flag, all unused replace statements are
41+
pruned. This makes go.mod smaller, but isn't required.
42+
43+
The replace statements are needed for "go get -u ./..." which
44+
otherwise ends up updating Kubernetes packages like client-go to
45+
incompatible versions (in that case, a very old 1.x release which
46+
happens to have a "higher" version number than the current
47+
0.<Kubernetes minor version>.<Kubernetes patch version> numbers.
48+
EOF
3049
}
3150

51+
prune=false
52+
53+
while getopts "ph" o; do
54+
case "$o" in
55+
h) help; exit 0;;
56+
p) prune=true;;
57+
*) help; exit 1;;
58+
esac
59+
done
60+
shift $((OPTIND-1))
61+
3262
if [ $# -ne 1 ]; then
3363
help
3464
exit 1
3565
fi
36-
case "$1" in -h|--help|help) help; exit 0;; esac
3766

3867
die () {
3968
echo >&2 "$@"
@@ -55,7 +84,7 @@ mods=$( (set -x; curl --silent --show-error --fail "https://raw.githubuserconten
5584
sed -n 's|.*k8s.io/\(.*\) => ./staging/src/k8s.io/.*|k8s.io/\1|p'
5685
) || die "failed to determine Kubernetes staging modules"
5786
for mod in $mods; do
58-
if ! (env GO111MODULE=on go mod graph) | grep "$mod@" > /dev/null; then
87+
if $prune && ! (env GO111MODULE=on go mod graph) | grep "$mod@" > /dev/null; then
5988
echo "Kubernetes module $mod is not used, skipping"
6089
# Remove the module from go.mod "replace" that was added by an older version of this script.
6190
(set -x; env GO111MODULE=on go mod edit "-dropreplace=$mod") || die "'go mod edit' failed"

prow.sh

+26-14
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ version_to_git () {
7878
# the list of windows versions was matched from:
7979
# - https://hub.docker.com/_/microsoft-windows-nanoserver
8080
# - https://hub.docker.com/_/microsoft-windows-servercore
81-
configvar CSI_PROW_BUILD_PLATFORMS "linux amd64; linux ppc64le -ppc64le; linux s390x -s390x; linux arm64 -arm64; windows amd64 .exe nanoserver:1809 servercore:ltsc2019; windows amd64 .exe nanoserver:1909 servercore:1909; windows amd64 .exe nanoserver:2004 servercore:2004; windows amd64 .exe nanoserver:20H2 servercore:20H2" "Go target platforms (= GOOS + GOARCH) and file suffix of the resulting binaries"
81+
configvar CSI_PROW_BUILD_PLATFORMS "linux amd64; linux ppc64le -ppc64le; linux s390x -s390x; linux arm -arm; linux arm64 -arm64; windows amd64 .exe nanoserver:1809 servercore:ltsc2019; windows amd64 .exe nanoserver:1909 servercore:1909; windows amd64 .exe nanoserver:2004 servercore:2004; windows amd64 .exe nanoserver:20H2 servercore:20H2; windows amd64 .exe nanoserver:ltsc2022 servercore:ltsc2022" "Go target platforms (= GOOS + GOARCH) and file suffix of the resulting binaries"
8282

8383
# If we have a vendor directory, then use it. We must be careful to only
8484
# use this for "make" invocations inside the project's repo itself because
8585
# setting it globally can break other go usages (like "go get <some command>"
8686
# which is disabled with GOFLAGS=-mod=vendor).
8787
configvar GOFLAGS_VENDOR "$( [ -d vendor ] && echo '-mod=vendor' )" "Go flags for using the vendor directory"
8888

89-
configvar CSI_PROW_GO_VERSION_BUILD "1.16" "Go version for building the component" # depends on component's source code
89+
configvar CSI_PROW_GO_VERSION_BUILD "1.17.3" "Go version for building the component" # depends on component's source code
9090
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
9191
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
9292
configvar CSI_PROW_GO_VERSION_KIND "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building 'kind'" # depends on CSI_PROW_KIND_VERSION below
@@ -138,7 +138,7 @@ kind_version_default () {
138138
latest|master)
139139
echo main;;
140140
*)
141-
echo v0.11.0;;
141+
echo v0.11.1;;
142142
esac
143143
}
144144

@@ -149,14 +149,15 @@ configvar CSI_PROW_KIND_VERSION "$(kind_version_default)" "kind"
149149

150150
# kind images to use. Must match the kind version.
151151
# The release notes of each kind release list the supported images.
152-
configvar CSI_PROW_KIND_IMAGES "kindest/node:v1.21.1@sha256:fae9a58f17f18f06aeac9772ca8b5ac680ebbed985e266f711d936e91d113bad
153-
kindest/node:v1.20.7@sha256:e645428988191fc824529fd0bb5c94244c12401cf5f5ea3bd875eb0a787f0fe9
154-
kindest/node:v1.19.11@sha256:7664f21f9cb6ba2264437de0eb3fe99f201db7a3ac72329547ec4373ba5f5911
155-
kindest/node:v1.18.19@sha256:530378628c7c518503ade70b1df698b5de5585dcdba4f349328d986b8849b1ee
156-
kindest/node:v1.17.17@sha256:c581fbf67f720f70aaabc74b44c2332cc753df262b6c0bca5d26338492470c17
157-
kindest/node:v1.16.15@sha256:430c03034cd856c1f1415d3e37faf35a3ea9c5aaa2812117b79e6903d1fc9651
158-
kindest/node:v1.15.12@sha256:8d575f056493c7778935dd855ded0e95c48cb2fab90825792e8fc9af61536bf9
159-
kindest/node:v1.14.10@sha256:6033e04bcfca7c5f2a9c4ce77551e1abf385bcd2709932ec2f6a9c8c0aff6d4f" "kind images"
152+
configvar CSI_PROW_KIND_IMAGES "kindest/node:v1.22.0@sha256:b8bda84bb3a190e6e028b1760d277454a72267a5454b57db34437c34a588d047
153+
kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
154+
kindest/node:v1.20.7@sha256:cbeaf907fc78ac97ce7b625e4bf0de16e3ea725daf6b04f930bd14c67c671ff9
155+
kindest/node:v1.19.11@sha256:07db187ae84b4b7de440a73886f008cf903fcf5764ba8106a9fd5243d6f32729
156+
kindest/node:v1.18.19@sha256:7af1492e19b3192a79f606e43c35fb741e520d195f96399284515f077b3b622c
157+
kindest/node:v1.17.17@sha256:66f1d0d91a88b8a001811e2f1054af60eef3b669a9a74f9b6db871f2f1eeed00
158+
kindest/node:v1.16.15@sha256:83067ed51bf2a3395b24687094e283a7c7c865ccc12a8b1d7aa673ba0c5e8861
159+
kindest/node:v1.15.12@sha256:b920920e1eda689d9936dfcf7332701e80be12566999152626b2c9d730397a95
160+
kindest/node:v1.14.10@sha256:f8a66ef82822ab4f7569e91a5bccaf27bceee135c1457c512e54de8c6f7219f8" "kind images"
160161

161162
# By default, this script tests sidecars with the CSI hostpath driver,
162163
# using the install_csi_driver function. That function depends on
@@ -292,7 +293,7 @@ tests_need_alpha_cluster () {
292293
tests_enabled "parallel-alpha" "serial-alpha"
293294
}
294295

295-
# Enabling mock tests adds the "CSI mock volume" tests from https://github.com/kubernetes/kubernetes/blob/master/test/e2e/storage/csi_mock_volume.go
296+
# Enabling mock tests adds the "CSI mock volume" tests from https://github.com/kubernetes/kubernetes/blob/HEAD/test/e2e/storage/csi_mock_volume.go
296297
# to the e2e.test invocations (serial, parallel, and the corresponding alpha variants).
297298
# When testing canary images, those get used instead of the images specified
298299
# in the e2e.test's normal YAML files.
@@ -795,7 +796,7 @@ install_snapshot_controller() {
795796
kind load docker-image --name csi-prow ${NEW_IMG} || die "could not load the snapshot-controller:csiprow image into the kind cluster"
796797

797798
# deploy snapshot-controller
798-
echo "Deploying snapshot-controller"
799+
echo "Deploying snapshot-controller from ${SNAPSHOT_CONTROLLER_YAML} with $NEW_IMG."
799800
# Replace image in SNAPSHOT_CONTROLLER_YAML with snapshot-controller:csiprow and deploy
800801
# NOTE: This logic is similar to the logic here:
801802
# https://github.com/kubernetes-csi/csi-driver-host-path/blob/v1.4.0/deploy/util/deploy-hostpath.sh#L155
@@ -832,8 +833,19 @@ install_snapshot_controller() {
832833
echo "$modified"
833834
exit 1
834835
fi
835-
echo "kubectl apply -f ${SNAPSHOT_CONTROLLER_YAML}(modified)"
836836
done
837+
elif [ "${CSI_PROW_DRIVER_CANARY}" = "canary" ]; then
838+
echo "Deploying snapshot-controller from ${SNAPSHOT_CONTROLLER_YAML} with canary images."
839+
yaml="$(kubectl apply --dry-run=client -o yaml -f "$SNAPSHOT_CONTROLLER_YAML")"
840+
# Ignore: See if you can use ${variable//search/replace} instead.
841+
# shellcheck disable=SC2001
842+
modified="$(echo "$yaml" | sed -e "s;image: .*/\([^/:]*\):.*;image: ${CSI_PROW_DRIVER_CANARY_REGISTRY}/\1:canary;")"
843+
diff <(echo "$yaml") <(echo "$modified")
844+
if ! echo "$modified" | kubectl apply -f -; then
845+
echo "modified version of $SNAPSHOT_CONTROLLER_YAML:"
846+
echo "$modified"
847+
exit 1
848+
fi
837849
else
838850
echo "kubectl apply -f $SNAPSHOT_CONTROLLER_YAML"
839851
kubectl apply -f "$SNAPSHOT_CONTROLLER_YAML"

0 commit comments

Comments
 (0)