Skip to content

Commit 1e50106

Browse files
authored
Merge pull request #922 from pohly/prow-update-master
master: update release-tools
2 parents d9f453f + 90434d2 commit 1e50106

File tree

8 files changed

+67
-43
lines changed

8 files changed

+67
-43
lines changed

go.mod

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ require (
3030
)
3131

3232
require (
33-
github.com/GoogleCloudPlatform/guest-configs v0.0.0-20211028171426-a0dacef88470 // indirect
3433
github.com/Microsoft/go-winio v0.4.16 // indirect
3534
github.com/beorn7/perks v1.0.1 // indirect
3635
github.com/blang/semver v3.5.1+incompatible // indirect

go.sum

-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZ
6464
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
6565
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
6666
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
67-
github.com/GoogleCloudPlatform/guest-configs v0.0.0-20211028171426-a0dacef88470 h1:A+CGaqTTg3TSo8k4v90qMInYSZ52kJrnnHUlsCgHRVM=
68-
github.com/GoogleCloudPlatform/guest-configs v0.0.0-20211028171426-a0dacef88470/go.mod h1:PYz+owYRovKCp6mKRumuKgk77Ac9B5UNmlMHRlW0B1w=
6967
github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20200415212048-7901bc822317 h1:JhyuWIqYrstW7KHMjk/fTqU0xtMpBOHuiTA2FVc7L4E=
7068
github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20200415212048-7901bc822317/go.mod h1:DF8FZRxMHMGv/vP2lQP6h+dYzzjpuRn24VeRiYn3qjQ=
7169
github.com/GoogleCloudPlatform/testgrid v0.0.1-alpha.3/go.mod h1:f96W2HYy3tiBNV5zbbRc+NczwYHgG1PHXMQfoEWv680=

release-tools/KUBERNETES_CSI_OWNERS_ALIASES

+1-9
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,7 @@ aliases:
3131

3232
# This documents who previously contributed to Kubernetes-CSI
3333
# as approver.
34-
emeritus_approver:
34+
emeritus_approvers:
3535
- lpabon
3636
- sbezverk
3737
- vladimirvivien
38-
39-
# This documents who previously contributed to Kubernetes-CSI
40-
# as reviewer.
41-
emeritus_reviewer:
42-
- lpabon
43-
- saad-ali
44-
- sbezverk
45-
- vladimirvivien

release-tools/SIDECAR_RELEASE_PROCESS.md

+44-9
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,38 @@ naming convention `<hostpath-deployment-version>-on-<kubernetes-version>`.
4646
## Release Process
4747
1. Identify all issues and ongoing PRs that should go into the release, and
4848
drive them to resolution.
49-
1. Download v2.8+ [K8s release notes
50-
generator](https://github.com/kubernetes/release/tree/HEAD/cmd/release-notes)
49+
1. Download the latest version of the
50+
[K8s release notes generator](https://github.com/kubernetes/release/tree/HEAD/cmd/release-notes)
51+
1. Create a
52+
[Github personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
53+
with `repo:public_repo` access
5154
1. Generate release notes for the release. Replace arguments with the relevant
52-
information.
55+
information.
5356
* Clean up old cached information (also needed if you are generating release
5457
notes for multiple repos)
5558
```bash
5659
rm -rf /tmp/k8s-repo
5760
```
5861
* For new minor releases on master:
5962
```bash
60-
GITHUB_TOKEN=<token> release-notes --discover=mergebase-to-latest
61-
--github-org=kubernetes-csi --github-repo=external-provisioner
62-
--required-author="" --output out.md
63+
GITHUB_TOKEN=<token> release-notes \
64+
--discover=mergebase-to-latest \
65+
--org=kubernetes-csi \
66+
--repo=external-provisioner \
67+
--required-author="" \
68+
--markdown-links \
69+
--output out.md
6370
```
6471
* For new patch releases on a release branch:
6572
```bash
66-
GITHUB_TOKEN=<token> release-notes --discover=patch-to-latest --branch=release-1.1
67-
--github-org=kubernetes-csi --github-repo=external-provisioner
68-
--required-author="" --output out.md
73+
GITHUB_TOKEN=<token> release-notes \
74+
--discover=patch-to-latest \
75+
--branch=release-1.1 \
76+
--org=kubernetes-csi \
77+
--repo=external-provisioner \
78+
--required-author="" \
79+
--markdown-links \
80+
--output out.md
6981
```
7082
1. Compare the generated output to the new commits for the release to check if
7183
any notable change missed a release note.
@@ -100,6 +112,29 @@ naming convention `<hostpath-deployment-version>-on-<kubernetes-version>`.
100112
and [k/k
101113
in-tree](https://github.com/kubernetes/kubernetes/tree/HEAD/test/e2e/testing-manifests/storage-csi/hostpath/hostpath)
102114

115+
### Troubleshooting
116+
117+
#### Image build jobs
118+
119+
The following jobs are triggered after tagging to produce the corresponding
120+
image(s):
121+
https://k8s-testgrid.appspot.com/sig-storage-image-build
122+
123+
Clicking on a failed build job opens that job in https://prow.k8s.io. Next to
124+
the job title is a rerun icon (circle with arrow). Clicking it opens a popup
125+
with a "rerun" button that maintainers with enough permissions can use. If in
126+
doubt, ask someone on #sig-release to rerun the job.
127+
128+
Another way to rerun a job is to search for it in https://prow.k8s.io and click
129+
the rerun icon in the resulting job list:
130+
https://prow.k8s.io/?job=canary-csi-test-push-images
131+
132+
#### Verify images
133+
134+
Canary and staged images can be viewed at https://console.cloud.google.com/gcr/images/k8s-staging-sig-storage
135+
136+
Promoted images can be viewed at https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/sig-storage
137+
103138
## Adding support for a new Kubernetes release
104139

105140
1. Add the new release to `k8s_versions` in

release-tools/build.make

+15-13
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ endif
7070
# Specific packages can be excluded from each of the tests below by setting the *_FILTER_CMD variables
7171
# to something like "| grep -v 'github.com/kubernetes-csi/project/pkg/foobar'". See usage below.
7272

73-
# BUILD_PLATFORMS contains a set of tuples [os arch suffix base_image addon_image]
73+
# BUILD_PLATFORMS contains a set of tuples [os arch buildx_platform suffix base_image addon_image]
7474
# separated by semicolon. An empty variable or empty entry (= just a
7575
# semicolon) builds for the default platform of the current Go
7676
# toolchain.
@@ -85,20 +85,20 @@ FULL_LDFLAGS = $(LDFLAGS) $(IMPORTPATH_LDFLAGS) $(EXT_LDFLAGS)
8585
# defined by BUILD_PLATFORMS.
8686
$(CMDS:%=build-%): build-%: check-go-version-go
8787
mkdir -p bin
88-
# os_arch_seen captures all of the $$os-$$arch seen for the current binary
89-
# that we want to build, if we've seen an $$os-$$arch before it means that
88+
# os_arch_seen captures all of the $$os-$$arch-$$buildx_platform seen for the current binary
89+
# that we want to build, if we've seen an $$os-$$arch-$$buildx_platform before it means that
9090
# we don't need to build it again, this is done to avoid building
9191
# the windows binary multiple times (see the default value of $$BUILD_PLATFORMS)
92-
export os_arch_seen="" && echo '$(BUILD_PLATFORMS)' | tr ';' '\n' | while read -r os arch suffix base_image addon_image; do \
93-
os_arch_seen_pre=$${os_arch_seen%%$$os-$$arch*}; \
92+
export os_arch_seen="" && echo '$(BUILD_PLATFORMS)' | tr ';' '\n' | while read -r os arch buildx_platform suffix base_image addon_image; do \
93+
os_arch_seen_pre=$${os_arch_seen%%$$os-$$arch-$$buildx_platform*}; \
9494
if ! [ $${#os_arch_seen_pre} = $${#os_arch_seen} ]; then \
9595
continue; \
9696
fi; \
9797
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 \
9898
echo "Building $* for GOOS=$$os GOARCH=$$arch failed, see error(s) above."; \
9999
exit 1; \
100100
fi; \
101-
os_arch_seen+=";$$os-$$arch"; \
101+
os_arch_seen+=";$$os-$$arch-$$buildx_platform"; \
102102
done
103103

104104
$(CMDS:%=container-%): container-%: build-%
@@ -154,16 +154,17 @@ $(CMDS:%=push-multiarch-%): push-multiarch-%: check-pull-base-ref build-%
154154
dockerfile_windows=$$(if [ -e ./$(CMDS_DIR)/$*/Dockerfile.Windows ]; then echo ./$(CMDS_DIR)/$*/Dockerfile.Windows; else echo Dockerfile.Windows; fi); \
155155
if [ '$(BUILD_PLATFORMS)' ]; then build_platforms='$(BUILD_PLATFORMS)'; else build_platforms="linux amd64"; fi; \
156156
if ! [ -f "$$dockerfile_windows" ]; then \
157-
build_platforms="$$(echo "$$build_platforms" | sed -e 's/windows *[^ ]* *.exe *[^ ]* *[^ ]*//g' -e 's/; *;/;/g' -e 's/;[ ]*$$//')"; \
157+
build_platforms="$$(echo "$$build_platforms" | sed -e 's/windows *[^ ]* *[^ ]* *.exe *[^ ]* *[^ ]*//g' -e 's/; *;/;/g' -e 's/;[ ]*$$//')"; \
158158
fi; \
159159
pushMultiArch () { \
160160
tag=$$1; \
161-
echo "$$build_platforms" | tr ';' '\n' | while read -r os arch suffix base_image addon_image; do \
161+
echo "$$build_platforms" | tr ';' '\n' | while read -r os arch buildx_platform suffix base_image addon_image; do \
162162
escaped_base_image=$${base_image/:/-}; \
163+
escaped_buildx_platform=$${buildx_platform//\//-}; \
163164
if ! [ -z $$escaped_base_image ]; then escaped_base_image+="-"; fi; \
164165
docker buildx build --push \
165-
--tag $(IMAGE_NAME):$$arch-$$os-$$escaped_base_image$$tag \
166-
--platform=$$os/$$arch \
166+
--tag $(IMAGE_NAME):$$escaped_buildx_platform-$$os-$$escaped_base_image$$tag \
167+
--platform=$$os/$$buildx_platform \
167168
--file $$(eval echo \$${dockerfile_$$os}) \
168169
--build-arg binary=./bin/$*$$suffix \
169170
--build-arg ARCH=$$arch \
@@ -172,13 +173,14 @@ $(CMDS:%=push-multiarch-%): push-multiarch-%: check-pull-base-ref build-%
172173
--label revision=$(REV) \
173174
.; \
174175
done; \
175-
images=$$(echo "$$build_platforms" | tr ';' '\n' | while read -r os arch suffix base_image addon_image; do \
176+
images=$$(echo "$$build_platforms" | tr ';' '\n' | while read -r os arch buildx_platform suffix base_image addon_image; do \
176177
escaped_base_image=$${base_image/:/-}; \
178+
escaped_buildx_platform=$${buildx_platform//\//-}; \
177179
if ! [ -z $$escaped_base_image ]; then escaped_base_image+="-"; fi; \
178-
echo $(IMAGE_NAME):$$arch-$$os-$$escaped_base_image$$tag; \
180+
echo $(IMAGE_NAME):$$escaped_buildx_platform-$$os-$$escaped_base_image$$tag; \
179181
done); \
180182
docker manifest create --amend $(IMAGE_NAME):$$tag $$images; \
181-
echo "$$build_platforms" | tr ';' '\n' | while read -r os arch suffix base_image addon_image; do \
183+
echo "$$build_platforms" | tr ';' '\n' | while read -r os arch buildx_platform suffix base_image addon_image; do \
182184
if [ $$os = "windows" ]; then \
183185
escaped_base_image=$${base_image/:/-}; \
184186
if ! [ -z $$escaped_base_image ]; then escaped_base_image+="-"; fi; \

release-tools/cloudbuild.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
# 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).
19-
# Building three images in external-snapshotter takes roughly half an hour,
20-
# sometimes more.
21-
timeout: 3600s
19+
# Building three images in external-snapshotter takes more than an hour.
20+
timeout: 7200s
2221
# This prevents errors if you don't use both _GIT_TAG and _PULL_BASE_REF,
2322
# or any new substitutions added in the future.
2423
options:

release-tools/prow.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ 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 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"
81+
configvar CSI_PROW_BUILD_PLATFORMS "linux amd64 amd64; linux ppc64le ppc64le -ppc64le; linux s390x s390x -s390x; linux arm arm -arm; linux arm64 arm64 -arm64; linux arm arm/v7 -armv7; windows amd64 amd64 .exe nanoserver:1809 servercore:ltsc2019; windows amd64 amd64 .exe nanoserver:20H2 servercore:20H2; windows amd64 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
@@ -149,7 +149,8 @@ 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.22.0@sha256:b8bda84bb3a190e6e028b1760d277454a72267a5454b57db34437c34a588d047
152+
configvar CSI_PROW_KIND_IMAGES "kindest/node:v1.23.0@sha256:49824ab1727c04e56a21a5d8372a402fcd32ea51ac96a2706a12af38934f81ac
153+
kindest/node:v1.22.0@sha256:b8bda84bb3a190e6e028b1760d277454a72267a5454b57db34437c34a588d047
153154
kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
154155
kindest/node:v1.20.7@sha256:cbeaf907fc78ac97ce7b625e4bf0de16e3ea725daf6b04f930bd14c67c671ff9
155156
kindest/node:v1.19.11@sha256:07db187ae84b4b7de440a73886f008cf903fcf5764ba8106a9fd5243d6f32729
@@ -233,7 +234,7 @@ configvar CSI_PROW_E2E_IMPORT_PATH "k8s.io/kubernetes" "E2E package"
233234
# of the cluster. The alternative would have been to (cross-)compile csi-sanity
234235
# and install it inside the cluster, which is not necessarily easier.
235236
configvar CSI_PROW_SANITY_REPO https://github.com/kubernetes-csi/csi-test "csi-test repo"
236-
configvar CSI_PROW_SANITY_VERSION v4.2.0 "csi-test version"
237+
configvar CSI_PROW_SANITY_VERSION v4.3.0 "csi-test version"
237238
configvar CSI_PROW_SANITY_PACKAGE_PATH github.com/kubernetes-csi/csi-test "csi-test package"
238239
configvar CSI_PROW_SANITY_SERVICE "hostpath-service" "Kubernetes TCP service name that exposes csi.sock"
239240
configvar CSI_PROW_SANITY_POD "csi-hostpathplugin-0" "Kubernetes pod with CSI driver"
@@ -736,7 +737,7 @@ install_csi_driver () {
736737
fi
737738
}
738739

739-
# Installs all nessesary snapshotter CRDs
740+
# Installs all necessary snapshotter CRDs
740741
install_snapshot_crds() {
741742
# Wait until volumesnapshot CRDs are in place.
742743
CRD_BASE_DIR="https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${CSI_SNAPSHOTTER_VERSION}/client/config/crd"

vendor/modules.txt

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
cloud.google.com/go/compute/metadata
44
cloud.google.com/go/iam
55
cloud.google.com/go/kms/apiv1
6-
# github.com/GoogleCloudPlatform/guest-configs v0.0.0-20211028171426-a0dacef88470
7-
## explicit
86
# github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20200415212048-7901bc822317
97
## explicit; go 1.13
108
github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta

0 commit comments

Comments
 (0)