-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: upgrade kubernetes dependencies from 0.26.4 to 0.26.11 (#16581)
* chore: upgrade kubernetes dependencies from 0.26.4 to 0.26.11 Fixes some vulnerabilities trivy is reporting on (not necessarily vulnerabe, trivy tends to have a lot of false positives when it comes to golang projects): * CVE-2023-3676 * CVE-2023-3955 * CVE-2023-5528 * CVE-2023-2431 * CVE-2023-2727 * CVE-2023-2728 Signed-off-by: Zoltán Reegn <zoltan.reegn@gmail.com> * go mod tidy Signed-off-by: Zoltán Reegn <zoltan.reegn@gmail.com> * Add go mod tidy to kubernetes updater script Signed-off-by: Zoltán Reegn <zoltan.reegn@gmail.com> --------- Signed-off-by: Zoltán Reegn <zoltan.reegn@gmail.com>
- Loading branch information
Showing
3 changed files
with
93 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
if [ -z "${1:-}" ]; then | ||
echo "Example usage: ./hack/update-kubernetes-version.sh v1.26.11" | ||
exit 1 | ||
fi | ||
VERSION=${1#"v"} | ||
MODS=($( | ||
curl -sS https://raw.githubusercontent.com/kubernetes/kubernetes/v${VERSION}/go.mod | | ||
sed -n 's|.*k8s.io/\(.*\) => ./staging/src/k8s.io/.*|k8s.io/\1|p' | ||
)) | ||
for MOD in "${MODS[@]}"; do | ||
echo "Updating $MOD..." >&2 | ||
V=$( | ||
go mod download -json "${MOD}@kubernetes-${VERSION}" | | ||
sed -n 's|.*"Version": "\(.*\)".*|\1|p' | ||
) | ||
go mod edit "-replace=${MOD}=${MOD}@${V}" | ||
done | ||
go get "k8s.io/kubernetes@v${VERSION}" | ||
go mod tidy |