Skip to content

Commit 09b2bd9

Browse files
committed
Squashed 'release-tools/' changes from a1e1127..bc0504a
bc0504a Merge pull request #140 from jsafrane/remove-unused-k8s-libs 5b1de1a go-get-kubernetes.sh: remove unused k8s libs 49b4269 Merge pull request #120 from pohly/add-kubernetes-release f7e7ee4 docs: steps for adding testing against new Kubernetes release git-subtree-dir: release-tools git-subtree-split: bc0504ad76ac6e20d0d7c60d46f62c7ff7591f8c
1 parent 162f2f9 commit 09b2bd9

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

SIDECAR_RELEASE_PROCESS.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,47 @@ naming convention `<hostpath-deployment-version>-on-<kubernetes-version>`.
104104
CSI hostpath driver with the new sidecars in the [CSI repo](https://github.com/kubernetes-csi/csi-driver-host-path/tree/master/deploy)
105105
and [k/k
106106
in-tree](https://github.com/kubernetes/kubernetes/tree/master/test/e2e/testing-manifests/storage-csi/hostpath/hostpath)
107+
108+
## Adding support for a new Kubernetes release
109+
110+
1. Add the new release to `k8s_versions` in
111+
https://github.com/kubernetes/test-infra/blob/090dec5dd535d5f61b7ba52e671a810f5fc13dfd/config/jobs/kubernetes-csi/gen-jobs.sh#L25
112+
to enable generating a job for it. Set `experimental_k8s_version`
113+
in
114+
https://github.com/kubernetes/test-infra/blob/090dec5dd535d5f61b7ba52e671a810f5fc13dfd/config/jobs/kubernetes-csi/gen-jobs.sh#L40
115+
to ensure that the new jobs aren't run for PRs unless explicitly
116+
requested. Generate and submit the new jobs.
117+
1. Create a test PR to try out the new job in some repo with `/test
118+
pull-kubernetes-csi-<repo>-<x.y>-on-kubernetes-<x.y>` where x.y
119+
matches the Kubernetes release. Alternatively, run .prow.sh in that
120+
repo locally with `CSI_PROW_KUBERNETES_VERSION=x.y.z`.
121+
1. Optional: update to a [new
122+
release](https://github.com/kubernetes-sigs/kind/tags) of kind with
123+
pre-built images for the new Kubernetes release. This is optional
124+
if the current version of kind is able to build images for the new
125+
Kubernetes release. However, jobs require less resources when they
126+
don't need to build those images from the Kubernetes source code.
127+
This change needs to be tried out in a PR against a component
128+
first, then get submitted against csi-release-tools.
129+
1. Optional: propagate the updated csi-release-tools to all components
130+
with the script from
131+
https://github.com/kubernetes-csi/csi-release-tools/issues/7#issuecomment-707025402
132+
1. Once it is likely to work in all components, unset
133+
`experimental_k8s_version` and submit the updated jobs.
134+
1. Once all sidecars for the new Kubernetes release are released,
135+
either bump the version number of the images in the existing
136+
[csi-driver-host-path
137+
deployments](https://github.com/kubernetes-csi/csi-driver-host-path/tree/master/deploy)
138+
and/or create a new deployment, depending on what Kubernetes
139+
release an updated sidecar is compatible with. If no new deployment
140+
is needed, then add a symlink to document that there intentionally
141+
isn't a separate deployment. This symlink is not needed for Prow
142+
testing because that will use "kubernetes-latest" as fallback.
143+
Update that link when creating a new deployment.
144+
1. Create a new csi-driver-host-path release.
145+
1. Bump `CSI_PROW_DRIVER_VERSION` in prow.sh to that new release and
146+
(eventually) roll that change out to all repos by updating
147+
`release-tools` in them. This is used when testing manually. The
148+
Prow jobs override that value, so also update
149+
`hostpath_driver_version` in
150+
https://github.com/kubernetes/test-infra/blob/91b04e6af3a40a9bcff25aa030850a4721e2dd2b/config/jobs/kubernetes-csi/gen-jobs.sh#L46-L47

go-get-kubernetes.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ mods=$( (set -x; curl --silent --show-error --fail "https://raw.githubuserconten
5555
sed -n 's|.*k8s.io/\(.*\) => ./staging/src/k8s.io/.*|k8s.io/\1|p'
5656
) || die "failed to determine Kubernetes staging modules"
5757
for mod in $mods; do
58+
if ! (env GO111MODULE=on go mod graph) | grep "$mod@" > /dev/null; then
59+
echo "Kubernetes module $mod is not used, skipping"
60+
# Remove the module from go.mod "replace" that was added by an older version of this script.
61+
(set -x; env GO111MODULE=on go mod edit "-dropreplace=$mod") || die "'go mod edit' failed"
62+
continue
63+
fi
5864
# The presence of a potentially incomplete go.mod file affects this command,
5965
# so move elsewhere.
6066
modinfo=$(set -x; cd /; env GO111MODULE=on go mod download -json "$mod@kubernetes-${k8s}") ||

0 commit comments

Comments
 (0)