-
Notifications
You must be signed in to change notification settings - Fork 81
Automated Sonobuoy version update 0.57.5 #6044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
replicated-ci-kurl
wants to merge
1
commit into
main
Choose a base branch
from
automation/update-sonobuoy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+78
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,4 @@ | ||
| asset sonobuoy.tar.gz https://github.com/vmware-tanzu/sonobuoy/releases/download/v0.57.5/sonobuoy_0.57.5_linux_amd64.tar.gz | ||
|
|
||
| image systemd-logs sonobuoy/systemd-logs:v0.4 | ||
| image sonobuoy sonobuoy/sonobuoy:v0.57.5 | ||
This file contains hidden or 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,73 @@ | ||
|
|
||
| function sonobuoy() { | ||
| sonobuoy_binary | ||
|
|
||
| sonobuoy_airgap_maybe_tag_image "k8s.gcr.io/conformance:v${KUBERNETES_VERSION}" "registry.k8s.io/conformance:v${KUBERNETES_VERSION}" | ||
| sonobuoy_airgap_maybe_tag_image "registry.k8s.io/conformance:v${KUBERNETES_VERSION}" "k8s.gcr.io/conformance:v${KUBERNETES_VERSION}" | ||
| } | ||
|
|
||
| function sonobuoy_already_applied() { | ||
| sonobuoy_airgap_maybe_tag_image "k8s.gcr.io/conformance:v${KUBERNETES_VERSION}" "registry.k8s.io/conformance:v${KUBERNETES_VERSION}" | ||
| sonobuoy_airgap_maybe_tag_image "registry.k8s.io/conformance:v${KUBERNETES_VERSION}" "k8s.gcr.io/conformance:v${KUBERNETES_VERSION}" | ||
| } | ||
|
|
||
| function sonobuoy_join() { | ||
| sonobuoy_binary | ||
|
|
||
| sonobuoy_airgap_maybe_tag_image "k8s.gcr.io/conformance:v${KUBERNETES_VERSION}" "registry.k8s.io/conformance:v${KUBERNETES_VERSION}" | ||
| sonobuoy_airgap_maybe_tag_image "registry.k8s.io/conformance:v${KUBERNETES_VERSION}" "k8s.gcr.io/conformance:v${KUBERNETES_VERSION}" | ||
| } | ||
|
|
||
| function sonobuoy_binary() { | ||
| local src="${DIR}/addons/sonobuoy/${SONOBUOY_VERSION}" | ||
|
|
||
| if ! kubernetes_is_master; then | ||
| return 0 | ||
| fi | ||
|
|
||
| if [ "${AIRGAP}" != "1" ]; then | ||
| mkdir -p "${src}/assets" | ||
| 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" | ||
| fi | ||
|
|
||
| tar xzf "${src}/assets/sonobuoy.tar.gz" -C /usr/local/bin | ||
| } | ||
|
|
||
| function sonobuoy_airgap_maybe_tag_image() { | ||
| if [ "$AIRGAP" != "1" ]; then | ||
| return | ||
| fi | ||
| if [ -n "$DOCKER_VERSION" ]; then | ||
| sonobuoy_docker_maybe_tag_image "$@" | ||
| else | ||
| sonobuoy_ctr_maybe_tag_image "$@" | ||
| fi | ||
| } | ||
|
|
||
| function sonobuoy_docker_maybe_tag_image() { | ||
| local src="$1" | ||
| local dst="$2" | ||
| if ! docker image inspect "$src" >/dev/null 2>&1 ; then | ||
| # source image does not exist, will not tag | ||
| return | ||
| fi | ||
| if docker image inspect "$dst" >/dev/null 2>&1 ; then | ||
| # destination image exists, will not tag | ||
| return | ||
| fi | ||
| docker image tag "$src" "$dst" | ||
| } | ||
|
|
||
| function sonobuoy_ctr_maybe_tag_image() { | ||
| local src="$1" | ||
| local dst="$2" | ||
| if [ "$(ctr -n=k8s.io images list -q name=="$src" 2>/dev/null | wc -l)" = "0" ] ; then | ||
| # source image does not exist, will not tag | ||
| return | ||
| fi | ||
| if [ "$(ctr -n=k8s.io images list -q name=="$dst" 2>/dev/null | wc -l)" = "1" ] ; then | ||
| # destination image exists, will not tag | ||
| return | ||
| fi | ||
| ctr -n=k8s.io images tag "$src" "$dst" | ||
| } |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In airgap installs, this Manifest only packages the Sonobuoy and systemd-logs images. The installer later tries to retag
k8s.gcr.io/conformance:v${KUBERNETES_VERSION}andregistry.k8s.io/conformance:v${KUBERNETES_VERSION}, but if neither source image was bundled for this new version those retag calls are no-ops, and Sonobuoy conformance runs can fail when the plugin cannot pull the conformance image.