Skip to content

Commit 5de0cd5

Browse files
Automated Sonobuoy version update 0.57.1 (#4944)
Create new Sonobuoy version Co-authored-by: emosbaugh <[email protected]>
1 parent d36aaee commit 5de0cd5

File tree

3 files changed

+78
-0
lines changed

3 files changed

+78
-0
lines changed

addons/sonobuoy/0.57.1/Manifest

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
asset sonobuoy.tar.gz https://github.com/vmware-tanzu/sonobuoy/releases/download/v0.57.1/sonobuoy_0.57.1_linux_amd64.tar.gz
2+
3+
image systemd-logs sonobuoy/systemd-logs:v0.4
4+
image sonobuoy sonobuoy/sonobuoy:v0.57.1

addons/sonobuoy/0.57.1/install.sh

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
2+
function sonobuoy() {
3+
sonobuoy_binary
4+
5+
sonobuoy_airgap_maybe_tag_image "k8s.gcr.io/conformance:v${KUBERNETES_VERSION}" "registry.k8s.io/conformance:v${KUBERNETES_VERSION}"
6+
sonobuoy_airgap_maybe_tag_image "registry.k8s.io/conformance:v${KUBERNETES_VERSION}" "k8s.gcr.io/conformance:v${KUBERNETES_VERSION}"
7+
}
8+
9+
function sonobuoy_already_applied() {
10+
sonobuoy_airgap_maybe_tag_image "k8s.gcr.io/conformance:v${KUBERNETES_VERSION}" "registry.k8s.io/conformance:v${KUBERNETES_VERSION}"
11+
sonobuoy_airgap_maybe_tag_image "registry.k8s.io/conformance:v${KUBERNETES_VERSION}" "k8s.gcr.io/conformance:v${KUBERNETES_VERSION}"
12+
}
13+
14+
function sonobuoy_join() {
15+
sonobuoy_binary
16+
17+
sonobuoy_airgap_maybe_tag_image "k8s.gcr.io/conformance:v${KUBERNETES_VERSION}" "registry.k8s.io/conformance:v${KUBERNETES_VERSION}"
18+
sonobuoy_airgap_maybe_tag_image "registry.k8s.io/conformance:v${KUBERNETES_VERSION}" "k8s.gcr.io/conformance:v${KUBERNETES_VERSION}"
19+
}
20+
21+
function sonobuoy_binary() {
22+
local src="${DIR}/addons/sonobuoy/${SONOBUOY_VERSION}"
23+
24+
if ! kubernetes_is_master; then
25+
return 0
26+
fi
27+
28+
if [ "${AIRGAP}" != "1" ]; then
29+
mkdir -p "${src}/assets"
30+
curl -L -o "${src}/assets/sonobuoy.tar.gz" "https://github.com/vmware-tanzu/sonobuoy/releases/download/v${SONOBUOY_VERSION}/sonobuoy_${SONOBUOY_VERSION}_linux_amd64.tar.gz"
31+
fi
32+
33+
tar xzf "${src}/assets/sonobuoy.tar.gz" -C /usr/local/bin
34+
}
35+
36+
function sonobuoy_airgap_maybe_tag_image() {
37+
if [ "$AIRGAP" != "1" ]; then
38+
return
39+
fi
40+
if [ -n "$DOCKER_VERSION" ]; then
41+
sonobuoy_docker_maybe_tag_image "$@"
42+
else
43+
sonobuoy_ctr_maybe_tag_image "$@"
44+
fi
45+
}
46+
47+
function sonobuoy_docker_maybe_tag_image() {
48+
local src="$1"
49+
local dst="$2"
50+
if ! docker image inspect "$src" >/dev/null 2>&1 ; then
51+
# source image does not exist, will not tag
52+
return
53+
fi
54+
if docker image inspect "$dst" >/dev/null 2>&1 ; then
55+
# destination image exists, will not tag
56+
return
57+
fi
58+
docker image tag "$src" "$dst"
59+
}
60+
61+
function sonobuoy_ctr_maybe_tag_image() {
62+
local src="$1"
63+
local dst="$2"
64+
if [ "$(ctr -n=k8s.io images list -q name=="$src" 2>/dev/null | wc -l)" = "0" ] ; then
65+
# source image does not exist, will not tag
66+
return
67+
fi
68+
if [ "$(ctr -n=k8s.io images list -q name=="$dst" 2>/dev/null | wc -l)" = "1" ] ; then
69+
# destination image exists, will not tag
70+
return
71+
fi
72+
ctr -n=k8s.io images tag "$src" "$dst"
73+
}

web/src/installers/versions.js

+1
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,7 @@ module.exports.InstallerVersions = {
599599
],
600600
sonobuoy: [
601601
// cron-sonobuoy-update
602+
"0.57.1",
602603
"0.57.0",
603604
"0.56.17",
604605
"0.56.16",

0 commit comments

Comments
 (0)