Skip to content

Commit b27ccfc

Browse files
committed
Squashed 'release-tools/' changes from c0a4fb1..65922ea
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 git-subtree-dir: release-tools git-subtree-split: 65922ea
1 parent bfbeb0f commit b27ccfc

File tree

5 files changed

+31
-25
lines changed

5 files changed

+31
-25
lines changed

README.md

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 11 additions & 16 deletions
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

cloudbuild.yaml

Lines changed: 2 additions & 2 deletions
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,

prow.sh

Lines changed: 15 additions & 4 deletions
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 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" "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
@@ -292,7 +292,7 @@ tests_need_alpha_cluster () {
292292
tests_enabled "parallel-alpha" "serial-alpha"
293293
}
294294

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

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

0 commit comments

Comments
 (0)