Merge pull request #179 from pohly/prow-update-master
master: update release-tools
This commit is contained in:
		
						commit
						5fb9469c3c
					
				|  | @ -31,15 +31,7 @@ aliases: | ||||||
| 
 | 
 | ||||||
| # This documents who previously contributed to Kubernetes-CSI | # This documents who previously contributed to Kubernetes-CSI | ||||||
| # as approver. | # as approver. | ||||||
| emeritus_approver: | emeritus_approvers: | ||||||
| - lpabon | - lpabon | ||||||
| - sbezverk | - sbezverk | ||||||
| - vladimirvivien | - vladimirvivien | ||||||
| 
 |  | ||||||
| # This documents who previously contributed to Kubernetes-CSI |  | ||||||
| # as reviewer. |  | ||||||
| emeritus_reviewer: |  | ||||||
| - lpabon |  | ||||||
| - saad-ali |  | ||||||
| - sbezverk |  | ||||||
| - vladimirvivien |  | ||||||
|  |  | ||||||
|  | @ -46,8 +46,11 @@ naming convention `<hostpath-deployment-version>-on-<kubernetes-version>`. | ||||||
| ## Release Process | ## Release Process | ||||||
| 1. Identify all issues and ongoing PRs that should go into the release, and | 1. Identify all issues and ongoing PRs that should go into the release, and | ||||||
|   drive them to resolution. |   drive them to resolution. | ||||||
| 1. Download v2.8+ [K8s release notes | 1. Download the latest version of the | ||||||
|   generator](https://github.com/kubernetes/release/tree/HEAD/cmd/release-notes) |    [K8s release notes generator](https://github.com/kubernetes/release/tree/HEAD/cmd/release-notes) | ||||||
|  | 1. Create a | ||||||
|  |    [Github personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) | ||||||
|  |    with `repo:public_repo` access | ||||||
| 1. Generate release notes for the release. Replace arguments with the relevant | 1. Generate release notes for the release. Replace arguments with the relevant | ||||||
|    information. |    information. | ||||||
|     * Clean up old cached information (also needed if you are generating release |     * Clean up old cached information (also needed if you are generating release | ||||||
|  | @ -57,15 +60,24 @@ naming convention `<hostpath-deployment-version>-on-<kubernetes-version>`. | ||||||
|       ``` |       ``` | ||||||
|     * For new minor releases on master: |     * For new minor releases on master: | ||||||
|         ```bash |         ```bash | ||||||
|         GITHUB_TOKEN=<token> release-notes --discover=mergebase-to-latest |         GITHUB_TOKEN=<token> release-notes \ | ||||||
|         --github-org=kubernetes-csi --github-repo=external-provisioner |           --discover=mergebase-to-latest \ | ||||||
|         --required-author="" --output out.md |           --org=kubernetes-csi \ | ||||||
|  |           --repo=external-provisioner \ | ||||||
|  |           --required-author="" \ | ||||||
|  |           --markdown-links \ | ||||||
|  |           --output out.md | ||||||
|         ``` |         ``` | ||||||
|     * For new patch releases on a release branch: |     * For new patch releases on a release branch: | ||||||
|         ```bash |         ```bash | ||||||
|         GITHUB_TOKEN=<token> release-notes --discover=patch-to-latest --branch=release-1.1 |         GITHUB_TOKEN=<token> release-notes \ | ||||||
|         --github-org=kubernetes-csi --github-repo=external-provisioner |           --discover=patch-to-latest \ | ||||||
|         --required-author="" --output out.md |           --branch=release-1.1 \ | ||||||
|  |           --org=kubernetes-csi \ | ||||||
|  |           --repo=external-provisioner \ | ||||||
|  |           --required-author="" \ | ||||||
|  |           --markdown-links \ | ||||||
|  |           --output out.md | ||||||
|         ``` |         ``` | ||||||
| 1. Compare the generated output to the new commits for the release to check if | 1. Compare the generated output to the new commits for the release to check if | ||||||
|    any notable change missed a release note. |    any notable change missed a release note. | ||||||
|  | @ -100,6 +112,29 @@ naming convention `<hostpath-deployment-version>-on-<kubernetes-version>`. | ||||||
|    and [k/k |    and [k/k | ||||||
|    in-tree](https://github.com/kubernetes/kubernetes/tree/HEAD/test/e2e/testing-manifests/storage-csi/hostpath/hostpath) |    in-tree](https://github.com/kubernetes/kubernetes/tree/HEAD/test/e2e/testing-manifests/storage-csi/hostpath/hostpath) | ||||||
| 
 | 
 | ||||||
|  | ### Troubleshooting | ||||||
|  | 
 | ||||||
|  | #### Image build jobs | ||||||
|  | 
 | ||||||
|  | The following jobs are triggered after tagging to produce the corresponding | ||||||
|  | image(s): | ||||||
|  | https://k8s-testgrid.appspot.com/sig-storage-image-build | ||||||
|  | 
 | ||||||
|  | Clicking on a failed build job opens that job in https://prow.k8s.io. Next to | ||||||
|  | the job title is a rerun icon (circle with arrow). Clicking it opens a popup | ||||||
|  | with a "rerun" button that maintainers with enough permissions can use. If in | ||||||
|  | doubt, ask someone on #sig-release to rerun the job. | ||||||
|  | 
 | ||||||
|  | Another way to rerun a job is to search for it in https://prow.k8s.io and click | ||||||
|  | the rerun icon in the resulting job list: | ||||||
|  | https://prow.k8s.io/?job=canary-csi-test-push-images | ||||||
|  | 
 | ||||||
|  | #### Verify images | ||||||
|  | 
 | ||||||
|  | Canary and staged images can be viewed at https://console.cloud.google.com/gcr/images/k8s-staging-sig-storage | ||||||
|  | 
 | ||||||
|  | Promoted images can be viewed at https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/sig-storage | ||||||
|  | 
 | ||||||
| ## Adding support for a new Kubernetes release | ## Adding support for a new Kubernetes release | ||||||
| 
 | 
 | ||||||
| 1. Add the new release to `k8s_versions` in | 1. Add the new release to `k8s_versions` in | ||||||
|  |  | ||||||
|  | @ -70,7 +70,7 @@ endif | ||||||
| # Specific packages can be excluded from each of the tests below by setting the *_FILTER_CMD variables | # Specific packages can be excluded from each of the tests below by setting the *_FILTER_CMD variables | ||||||
| # to something like "| grep -v 'github.com/kubernetes-csi/project/pkg/foobar'". See usage below. | # to something like "| grep -v 'github.com/kubernetes-csi/project/pkg/foobar'". See usage below. | ||||||
| 
 | 
 | ||||||
| # BUILD_PLATFORMS contains a set of tuples [os arch suffix base_image addon_image] | # BUILD_PLATFORMS contains a set of tuples [os arch buildx_platform suffix base_image addon_image] | ||||||
| # separated by semicolon. An empty variable or empty entry (= just a | # separated by semicolon. An empty variable or empty entry (= just a | ||||||
| # semicolon) builds for the default platform of the current Go | # semicolon) builds for the default platform of the current Go | ||||||
| # toolchain. | # toolchain. | ||||||
|  | @ -85,12 +85,12 @@ FULL_LDFLAGS = $(LDFLAGS) $(IMPORTPATH_LDFLAGS) $(EXT_LDFLAGS) | ||||||
| # defined by BUILD_PLATFORMS. | # defined by BUILD_PLATFORMS. | ||||||
| $(CMDS:%=build-%): build-%: check-go-version-go | $(CMDS:%=build-%): build-%: check-go-version-go | ||||||
| 	mkdir -p bin | 	mkdir -p bin | ||||||
| 	# os_arch_seen captures all of the $$os-$$arch seen for the current binary | 	# os_arch_seen captures all of the $$os-$$arch-$$buildx_platform seen for the current binary | ||||||
| 	# that we want to build, if we've seen an $$os-$$arch before it means that | 	# that we want to build, if we've seen an $$os-$$arch-$$buildx_platform before it means that | ||||||
| 	# we don't need to build it again, this is done to avoid building | 	# we don't need to build it again, this is done to avoid building | ||||||
| 	# the windows binary multiple times (see the default value of $$BUILD_PLATFORMS) | 	# the windows binary multiple times (see the default value of $$BUILD_PLATFORMS) | ||||||
| 	export os_arch_seen="" && echo '$(BUILD_PLATFORMS)' | tr ';' '\n' | while read -r os arch suffix base_image addon_image; do \ | 	export os_arch_seen="" && echo '$(BUILD_PLATFORMS)' | tr ';' '\n' | while read -r os arch buildx_platform suffix base_image addon_image; do \ | ||||||
| 		os_arch_seen_pre=$${os_arch_seen%%$$os-$$arch*}; \ | 		os_arch_seen_pre=$${os_arch_seen%%$$os-$$arch-$$buildx_platform*}; \ | ||||||
| 		if ! [ $${#os_arch_seen_pre} = $${#os_arch_seen} ]; then \ | 		if ! [ $${#os_arch_seen_pre} = $${#os_arch_seen} ]; then \ | ||||||
| 			continue; \ | 			continue; \ | ||||||
| 		fi; \ | 		fi; \ | ||||||
|  | @ -98,7 +98,7 @@ $(CMDS:%=build-%): build-%: check-go-version-go | ||||||
| 			echo "Building $* for GOOS=$$os GOARCH=$$arch failed, see error(s) above."; \ | 			echo "Building $* for GOOS=$$os GOARCH=$$arch failed, see error(s) above."; \ | ||||||
| 			exit 1; \ | 			exit 1; \ | ||||||
| 		fi; \ | 		fi; \ | ||||||
| 		os_arch_seen+=";$$os-$$arch"; \ | 		os_arch_seen+=";$$os-$$arch-$$buildx_platform"; \ | ||||||
| 	done | 	done | ||||||
| 
 | 
 | ||||||
| $(CMDS:%=container-%): container-%: build-% | $(CMDS:%=container-%): container-%: build-% | ||||||
|  | @ -154,16 +154,17 @@ $(CMDS:%=push-multiarch-%): push-multiarch-%: check-pull-base-ref build-% | ||||||
| 	dockerfile_windows=$$(if [ -e ./$(CMDS_DIR)/$*/Dockerfile.Windows ]; then echo ./$(CMDS_DIR)/$*/Dockerfile.Windows; else echo Dockerfile.Windows; fi); \ | 	dockerfile_windows=$$(if [ -e ./$(CMDS_DIR)/$*/Dockerfile.Windows ]; then echo ./$(CMDS_DIR)/$*/Dockerfile.Windows; else echo Dockerfile.Windows; fi); \ | ||||||
| 	if [ '$(BUILD_PLATFORMS)' ]; then build_platforms='$(BUILD_PLATFORMS)'; else build_platforms="linux amd64"; fi; \ | 	if [ '$(BUILD_PLATFORMS)' ]; then build_platforms='$(BUILD_PLATFORMS)'; else build_platforms="linux amd64"; fi; \ | ||||||
| 	if ! [ -f "$$dockerfile_windows" ]; then \ | 	if ! [ -f "$$dockerfile_windows" ]; then \ | ||||||
| 		build_platforms="$$(echo "$$build_platforms" | sed -e 's/windows *[^ ]* *.exe *[^ ]* *[^ ]*//g' -e 's/; *;/;/g' -e 's/;[ ]*$$//')"; \ | 		build_platforms="$$(echo "$$build_platforms" | sed -e 's/windows *[^ ]* *[^ ]* *.exe *[^ ]* *[^ ]*//g' -e 's/; *;/;/g' -e 's/;[ ]*$$//')"; \ | ||||||
| 	fi; \ | 	fi; \ | ||||||
| 	pushMultiArch () { \ | 	pushMultiArch () { \ | ||||||
| 		tag=$$1; \ | 		tag=$$1; \ | ||||||
| 		echo "$$build_platforms" | tr ';' '\n' | while read -r os arch suffix base_image addon_image; do \ | 		echo "$$build_platforms" | tr ';' '\n' | while read -r os arch buildx_platform suffix base_image addon_image; do \ | ||||||
| 			escaped_base_image=$${base_image/:/-}; \ | 			escaped_base_image=$${base_image/:/-}; \ | ||||||
|  | 			escaped_buildx_platform=$${buildx_platform//\//-}; \ | ||||||
| 			if ! [ -z $$escaped_base_image ]; then escaped_base_image+="-"; fi; \ | 			if ! [ -z $$escaped_base_image ]; then escaped_base_image+="-"; fi; \ | ||||||
| 			docker buildx build --push \ | 			docker buildx build --push \ | ||||||
| 				--tag $(IMAGE_NAME):$$arch-$$os-$$escaped_base_image$$tag \ | 				--tag $(IMAGE_NAME):$$escaped_buildx_platform-$$os-$$escaped_base_image$$tag \ | ||||||
| 				--platform=$$os/$$arch \ | 				--platform=$$os/$$buildx_platform \ | ||||||
| 				--file $$(eval echo \$${dockerfile_$$os}) \ | 				--file $$(eval echo \$${dockerfile_$$os}) \ | ||||||
| 				--build-arg binary=./bin/$*$$suffix \ | 				--build-arg binary=./bin/$*$$suffix \ | ||||||
| 				--build-arg ARCH=$$arch \ | 				--build-arg ARCH=$$arch \ | ||||||
|  | @ -172,13 +173,14 @@ $(CMDS:%=push-multiarch-%): push-multiarch-%: check-pull-base-ref build-% | ||||||
| 				--label revision=$(REV) \ | 				--label revision=$(REV) \ | ||||||
| 				.; \ | 				.; \ | ||||||
| 		done; \ | 		done; \ | ||||||
| 		images=$$(echo "$$build_platforms" | tr ';' '\n' | while read -r os arch suffix base_image addon_image; do \ | 		images=$$(echo "$$build_platforms" | tr ';' '\n' | while read -r os arch buildx_platform suffix base_image addon_image; do \ | ||||||
| 			escaped_base_image=$${base_image/:/-}; \ | 			escaped_base_image=$${base_image/:/-}; \ | ||||||
|  | 			escaped_buildx_platform=$${buildx_platform//\//-}; \ | ||||||
| 			if ! [ -z $$escaped_base_image ]; then escaped_base_image+="-"; fi; \ | 			if ! [ -z $$escaped_base_image ]; then escaped_base_image+="-"; fi; \ | ||||||
| 			echo $(IMAGE_NAME):$$arch-$$os-$$escaped_base_image$$tag; \ | 			echo $(IMAGE_NAME):$$escaped_buildx_platform-$$os-$$escaped_base_image$$tag; \ | ||||||
| 		done); \ | 		done); \ | ||||||
| 		docker manifest create --amend $(IMAGE_NAME):$$tag $$images; \ | 		docker manifest create --amend $(IMAGE_NAME):$$tag $$images; \ | ||||||
| 		echo "$$build_platforms" | tr ';' '\n' | while read -r os arch suffix base_image addon_image; do \ | 		echo "$$build_platforms" | tr ';' '\n' | while read -r os arch buildx_platform suffix base_image addon_image; do \ | ||||||
| 			if [ $$os = "windows" ]; then \ | 			if [ $$os = "windows" ]; then \ | ||||||
| 				escaped_base_image=$${base_image/:/-}; \ | 				escaped_base_image=$${base_image/:/-}; \ | ||||||
| 				if ! [ -z $$escaped_base_image ]; then escaped_base_image+="-"; fi; \ | 				if ! [ -z $$escaped_base_image ]; then escaped_base_image+="-"; fi; \ | ||||||
|  |  | ||||||
|  | @ -16,9 +16,8 @@ | ||||||
| # To promote release images, see https://github.com/kubernetes/k8s.io/tree/HEAD/k8s.gcr.io/images/k8s-staging-sig-storage. | # To promote release images, see https://github.com/kubernetes/k8s.io/tree/HEAD/k8s.gcr.io/images/k8s-staging-sig-storage. | ||||||
| 
 | 
 | ||||||
| # This must be specified in seconds. If omitted, defaults to 600s (10 mins). | # This must be specified in seconds. If omitted, defaults to 600s (10 mins). | ||||||
| # Building three images in external-snapshotter takes roughly half an hour, | # Building three images in external-snapshotter takes more than an hour. | ||||||
| # sometimes more. | timeout: 7200s | ||||||
| timeout: 3600s |  | ||||||
| # This prevents errors if you don't use both _GIT_TAG and _PULL_BASE_REF, | # This prevents errors if you don't use both _GIT_TAG and _PULL_BASE_REF, | ||||||
| # or any new substitutions added in the future. | # or any new substitutions added in the future. | ||||||
| options: | options: | ||||||
|  |  | ||||||
|  | @ -78,7 +78,7 @@ version_to_git () { | ||||||
| # the list of windows versions was matched from: | # the list of windows versions was matched from: | ||||||
| # - https://hub.docker.com/_/microsoft-windows-nanoserver | # - https://hub.docker.com/_/microsoft-windows-nanoserver | ||||||
| # - https://hub.docker.com/_/microsoft-windows-servercore | # - https://hub.docker.com/_/microsoft-windows-servercore | ||||||
| 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" | 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" | ||||||
| 
 | 
 | ||||||
| # If we have a vendor directory, then use it. We must be careful to only | # If we have a vendor directory, then use it. We must be careful to only | ||||||
| # use this for "make" invocations inside the project's repo itself because | # 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" | ||||||
| 
 | 
 | ||||||
| # kind images to use. Must match the kind version. | # kind images to use. Must match the kind version. | ||||||
| # The release notes of each kind release list the supported images. | # The release notes of each kind release list the supported images. | ||||||
| configvar CSI_PROW_KIND_IMAGES "kindest/node:v1.22.0@sha256:b8bda84bb3a190e6e028b1760d277454a72267a5454b57db34437c34a588d047 | configvar CSI_PROW_KIND_IMAGES "kindest/node:v1.23.0@sha256:49824ab1727c04e56a21a5d8372a402fcd32ea51ac96a2706a12af38934f81ac | ||||||
|  | kindest/node:v1.22.0@sha256:b8bda84bb3a190e6e028b1760d277454a72267a5454b57db34437c34a588d047 | ||||||
| kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6 | kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6 | ||||||
| kindest/node:v1.20.7@sha256:cbeaf907fc78ac97ce7b625e4bf0de16e3ea725daf6b04f930bd14c67c671ff9 | kindest/node:v1.20.7@sha256:cbeaf907fc78ac97ce7b625e4bf0de16e3ea725daf6b04f930bd14c67c671ff9 | ||||||
| kindest/node:v1.19.11@sha256:07db187ae84b4b7de440a73886f008cf903fcf5764ba8106a9fd5243d6f32729 | kindest/node:v1.19.11@sha256:07db187ae84b4b7de440a73886f008cf903fcf5764ba8106a9fd5243d6f32729 | ||||||
|  | @ -233,7 +234,7 @@ configvar CSI_PROW_E2E_IMPORT_PATH "k8s.io/kubernetes" "E2E package" | ||||||
| # of the cluster. The alternative would have been to (cross-)compile csi-sanity | # of the cluster. The alternative would have been to (cross-)compile csi-sanity | ||||||
| # and install it inside the cluster, which is not necessarily easier. | # and install it inside the cluster, which is not necessarily easier. | ||||||
| configvar CSI_PROW_SANITY_REPO https://github.com/kubernetes-csi/csi-test "csi-test repo" | configvar CSI_PROW_SANITY_REPO https://github.com/kubernetes-csi/csi-test "csi-test repo" | ||||||
| configvar CSI_PROW_SANITY_VERSION v4.2.0 "csi-test version" | configvar CSI_PROW_SANITY_VERSION v4.3.0 "csi-test version" | ||||||
| configvar CSI_PROW_SANITY_PACKAGE_PATH github.com/kubernetes-csi/csi-test "csi-test package" | configvar CSI_PROW_SANITY_PACKAGE_PATH github.com/kubernetes-csi/csi-test "csi-test package" | ||||||
| configvar CSI_PROW_SANITY_SERVICE "hostpath-service" "Kubernetes TCP service name that exposes csi.sock" | configvar CSI_PROW_SANITY_SERVICE "hostpath-service" "Kubernetes TCP service name that exposes csi.sock" | ||||||
| configvar CSI_PROW_SANITY_POD "csi-hostpathplugin-0" "Kubernetes pod with CSI driver" | configvar CSI_PROW_SANITY_POD "csi-hostpathplugin-0" "Kubernetes pod with CSI driver" | ||||||
|  | @ -736,7 +737,7 @@ install_csi_driver () { | ||||||
|     fi |     fi | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| # Installs all nessesary snapshotter CRDs | # Installs all necessary snapshotter CRDs | ||||||
| install_snapshot_crds() { | install_snapshot_crds() { | ||||||
|   # Wait until volumesnapshot CRDs are in place. |   # Wait until volumesnapshot CRDs are in place. | ||||||
|   CRD_BASE_DIR="https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${CSI_SNAPSHOTTER_VERSION}/client/config/crd" |   CRD_BASE_DIR="https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${CSI_SNAPSHOTTER_VERSION}/client/config/crd" | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue