This is the documentation for the latest development version of Sonobuoy. Both code and docs may be unstable, and these docs are not guaranteed to be up to date or correct. See the latest version.
version
defined in the code to the new version number.
As of the time of writing, the version is defined in pkg/buildinfo/version.go
.Is this release for a Kubernetes release? If so, apply the following steps:
Ensure the upstream conformance script is working appropriately:
make check-kind-env
to ensure the repo/tag are correctmake kind_images
make push_kind_images
kind-config.yaml
file with the new image version here.Add the new list of E2E test images for the targed version.
Within pkg/image/
, copy the latest v1.x.go
file to a file which corresponds to the new Kubernetes release number.
For example, if the new Sonobuoy release corresponds to Kubernetes v1.20
, copy the v1.19.go
file to v1.20.go
.
cd pkg/image
cp v1.{19,20}.go
This file will contain a function to return the list of test images via a map[int]Config
value.
v1_20
.map
entries stored in variable configs
from upstream Kubernetes file kubernetes/test/utils/image/mafnifest
. Remove the previous map entries and replace them wi the The copied entries.GetImageConfigs
function within pkg/image/manifest.go
and add a new case
statement to the minor version check which will be the minor version of the new Kubernetes release. In this new case, call the newly created function (e.g. r.v1_20()
).GetDefaultImageRegistries
within pkg/image/manifest.go
to return the default image registries for the new version.
case 19:
), return a new RegistryList
object which includes only the registry keys used within the registry config for that version.
Some registries are not applicable to include in this object as they are there to test specific image pull behavior such as pulling from a private or non-existent registry. This object should only include registries that can be successfully pulled from. The other registries are not used within the end-to-end tests.Explicit doc changes (if any) should be made to the appropriate files in directory site/docs/master
.
Next, generate a set of versioned docs for v0.x.y. For instance, the new docs be generated by running the command:
./scripts/update_docs.sh v0.20.0
This will copy the current master
docs into the version given and update
a few of the links in the README to be correct. It will also update
the website config to add the new version and consider it the newest
version of the docs.
This step will tag the code and triggers a release.
From your local branch, create an annotated tag
for the commit that was merged:
git tag -a v0.x.y -m "Release v0.x.y"
NOTE: Tag the new tip of
master
, not the branch you just merged.
tag
to the github.com/vmware-tanzu/sonobuoy
repository.To ensure that the tag is pushed to the correct repository, check which remote corresponds to that repository using the following command:
git remote -v
The output of this command should include at least two configured remotes, typically origin
, which refers to your personal fork, and upstream
which refers to the upstream Sonobuoy repository.
For example:
origin git@github.com:<username>/sonobuoy.git (fetch)
origin git@github.com:<username>/sonobuoy.git (push)
upstream https://github.com/vmware-tanzu/sonobuoy (fetch)
upstream https://github.com/vmware-tanzu/sonobuoy (push)
For the following steps, use the remote configured for the vmware-tanzu/sonobuoy
repository.
The following instructions will use upstream
.
NOTE: This will push all tags.
git push upstream --tags
To push just one tag, use the following command format (replacing v0.x.y
with the tag created in the previous step):
git push upstream refs/tags/v0.x.y
If there is a problem and you need to remove the tag, run the following commands:
git tag -d v0.x.y
git push upstream :refs/tags/v0.x.y
NOTE: The
:
preceding the tag ref is necessary to delete the tag from the remote repository. Git refspecs have the format<+><src>:<dst>
. By pushing an emptysrc
to the remotedst
, it makes the destination ref empty, effectively deleting it. For more details, see thegit push
documentation or this concise explanation on Stack Overflow.
Run the following command to make sure the image was pushed correctly to Docker Hub:
docker run -it sonobuoy/sonobuoy:v0.x.y /sonobuoy version
The Sonobuoy Version
in the output should match the release tag above.
Run a Kind cluster locally and ensure that you can run sonobuoy run --mode quick
.
If this release corresponds to a new Kubernetes release as well, ensure:
you’re using the correct Kubernetes context by checking the output from:
kubectl config current-context
and verifying that it is set to the context for the Kind cluster just created (kind-kind
or kind-<custom_cluster_name>
)
you’re testing with the new Kind images by checking the output from:
kubectl version --short
and verifying that the server version matches the intended Kubernetes version.
you can run sonobuoy images
and get a list of test images as expected
docker context
which is a Windows machine.docker context use default
make build/windows/amd64/sonobuoy.exe
docker context use 2019-box
make windows_containers
PUSH_WINDOWS=true make push
To help you get started, see the documentation.