Skip to content

Commit eb9343d

Browse files
authored
Bump version to v0.17.2 and add docs (#1075)
Signed-off-by: John Schnake <[email protected]>
1 parent f8c047f commit eb9343d

26 files changed

+1263
-2
lines changed

pkg/buildinfo/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ limitations under the License.
2020
package buildinfo
2121

2222
// Version is the current version of Sonobuoy, set by the go linker's -X flag at build time
23-
var Version = "v0.17.1"
23+
var Version = "v0.17.2"
2424

2525
// GitSHA is the actual commit that is being built, set by the go linker's -X flag at build time.
2626
var GitSHA string

site/_config.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ defaults:
5252
version: master
5353
gh: https://github.com/vmware-tanzu/sonobuoy/tree/master
5454
layout: "docs"
55+
- scope:
56+
path: docs/v0.17.2
57+
values:
58+
version: v0.17.2
59+
gh: https://github.com/vmware-tanzu/sonobuoy/tree/v0.17.2
60+
layout: "docs"
5561
- scope:
5662
path: docs/v0.17.1
5763
values:
@@ -173,9 +179,10 @@ collections:
173179
- plugin-list
174180

175181
versioning: true
176-
latest: v0.17.1
182+
latest: v0.17.2
177183
versions:
178184
- master
185+
- v0.17.2
179186
- v0.17.1
180187
- v0.17.0
181188
- v0.16.5

site/_data/toc-mapping.yml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# Below is a commented out example of what this may look like:
66

77
master: master-toc
8+
v0.17.2: v0-17-2toc
89
v0.17.1: v0-17-1toc
910
v0.17.0: v0-17-0toc
1011
v0.16.5: v0-16-5toc

site/_data/v0-17-2toc.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
toc:
2+
- title: Basics
3+
subfolderitems:
4+
- page: Overview
5+
url: /index.html
6+
- page: Checking Results
7+
url: /results
8+
- title: Plugins
9+
subfolderitems:
10+
- page: Overview
11+
url: /plugins
12+
- page: E2E & Conformance
13+
url: /e2eplugin
14+
- page: Examples
15+
url: /examples
16+
github: true
17+
- title: Advanced
18+
subfolderitems:
19+
- page: Detailed result contents
20+
url: /snapshot
21+
- page: Configuration Options
22+
url: /sonobuoy-config
23+
- page: Custom Registries & Airgap Testing
24+
url: /airgap
25+
- page: Using Private Images
26+
url: /pullsecrets
27+
- page: Advanced Customization
28+
url: /gen
29+
- title: Resources
30+
subfolderitems:
31+
- page: Frequently Asked Questions
32+
url: /faq

site/docs/v0.17.2/README.md

+180
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
# <img src="img/sonobuoy-logo.png" width="400px" alt="Sonobuoy logo" > [![CircleCI](https://circleci.com/gh/vmware-tanzu/sonobuoy.svg?style=svg)](https://circleci.com/gh/vmware-tanzu/sonobuoy)
2+
3+
## [Overview][oview]
4+
5+
Sonobuoy is a diagnostic tool that makes it easier to understand the
6+
state of a Kubernetes cluster by running a set of plugins (including [Kubernetes][k8s] conformance
7+
tests) in an accessible and non-destructive manner. It is a customizable,
8+
extendable, and cluster-agnostic way to generate clear, informative reports
9+
about your cluster.
10+
11+
Its selective data dumps of Kubernetes resource objects and cluster nodes allow
12+
for the following use cases:
13+
14+
* Integrated end-to-end (e2e) [conformance-testing][e2ePlugin]
15+
* Workload debugging
16+
* Custom data collection via extensible plugins
17+
18+
Sonobuoy supports 3 Kubernetes minor versions: the current release and 2 minor versions before. Sonobuoy is currently versioned to track the Kubernetes minor version to clarify the support matrix. For example, Sonobuoy v0.14.x would support Kubernetes 1.14.x, 1.13.x, and 1.12.x.
19+
20+
> Note: You can skip this version enforcement by running Sonobuoy with the `--skip-preflight` flag.
21+
22+
## Prerequisites
23+
24+
* Access to an up-and-running Kubernetes cluster. If you do not have a cluster,
25+
we recommend following the [AWS Quickstart for Kubernetes][quickstart] instructions.
26+
27+
* An admin `kubeconfig` file, and the KUBECONFIG environment variable set.
28+
29+
* For some advanced workflows it may be required to have `kubectl` installed. See [installing via Homebrew (MacOS)][brew] or [building
30+
the binary (Linux)][linux].
31+
32+
* The `sonobuoy images` subcommand requires [Docker](https://www.docker.com) to be installed. See [installing Docker](docker).
33+
34+
## Installing
35+
36+
We recommend installing Sonobuoy via downloading one of the releases directly from [here][releases].
37+
38+
You can use the web UI to download a release or from the terminal:
39+
40+
```
41+
$ VERSION=0.16.1 OS=darwin && \
42+
curl -L "https://github.com/vmware-tanzu/sonobuoy/releases/download/v${VERSION}/sonobuoy_${VERSION}_${OS}_amd64.tar.gz" --output $HOME/bin/sonobuoy.tar.gz && \
43+
tar -xzf $HOME/bin/sonobuoy.tar.gz -C $HOME/bin && \
44+
chmod +x $HOME/bin/sonobuoy && \
45+
rm $HOME/bin/sonobuoy.tar.gz
46+
```
47+
48+
> Note: Be sure to update the OS to your local value. Supported values are: "linux", "darwin", and "windows".
49+
50+
If building locally, you should clone the repository and run `make`. To build locally, Docker is required.
51+
52+
## Getting Started
53+
54+
To launch conformance tests (ensuring [CNCF][cncf] conformance) and wait until they are finished run:
55+
56+
```bash
57+
sonobuoy run --wait
58+
```
59+
60+
> Note: Using `--mode quick` will significantly shorten the runtime of Sonobuoy. It runs just a single test, helping to quickly validate your Sonobuoy and Kubernetes configuration.
61+
62+
Get the results from the plugins (e.g. e2e test results):
63+
64+
```bash
65+
results=$(sonobuoy retrieve)
66+
```
67+
68+
Inspect results for test failures. This will list the number of tests failed and their names:
69+
70+
```bash
71+
sonobuoy results $results
72+
```
73+
74+
> Note: The `results` command has lots of useful options for various situations. See the [results page][results] for more details.
75+
76+
You can also extract the entire contents of the file to get much more [detailed data][snapshot] about your cluster.
77+
78+
Sonobuoy creates a few resources in order to run and expects to run within its
79+
own namespace.
80+
81+
Deleting Sonobuoy entails removing its namespace as well as a few cluster
82+
scoped resources.
83+
84+
```bash
85+
sonobuoy delete --wait
86+
```
87+
88+
> Note: The --wait option ensures the Kubernetes namespace is deleted, avoiding conflicts if another Sonobuoy run is started quickly.
89+
90+
### Other Tests
91+
92+
By default, `sonobuoy run` runs the Kubernetes conformance tests but this can easily be configured. The same plugin that has the conformance tests has all the Kubernetes end-to-end tests which include other tests such as:
93+
94+
* tests for specific storage features
95+
* performance tests
96+
* scaling tests
97+
* provider specific tests
98+
* and many more
99+
100+
To modify which tests you want to run, checkout our page on the [e2e plugin][e2ePlugin].
101+
102+
If you want to run other tests or tools which are not a part of the Kubernetes end-to-end suite, refer to our documentation on [custom plugins][customPlugins].
103+
104+
### Monitoring Sonobuoy during a run
105+
106+
You can check on the status of each of the plugins running with:
107+
108+
```bash
109+
sonobuoy status
110+
```
111+
112+
You can also inspect the logs of all Sonobuoy containers:
113+
114+
```bash
115+
sonobuoy logs
116+
```
117+
118+
## Troubleshooting
119+
120+
If you encounter any problems that the documentation does not address, [file an
121+
issue][issue].
122+
123+
## Known Issues
124+
125+
### Leaked End-to-end namespaces
126+
127+
There are some Kubernetes e2e tests that may leak resources. Sonobuoy can
128+
help clean those up as well by deleting all namespaces prefixed with `e2e`:
129+
130+
```bash
131+
sonobuoy delete --all
132+
```
133+
134+
### Run on Google Cloud Platform (GCP)
135+
136+
Sonobuoy requires admin permissions which won't be automatic if you are running via Google Kubernetes Engine (GKE) cluster. You must first create an admin role for the user under which you run Sonobuoy:
137+
138+
```bash
139+
kubectl create clusterrolebinding <your-user-cluster-admin-binding> --clusterrole=cluster-admin --user=<[email protected]>
140+
```
141+
142+
## Contributing
143+
144+
Thanks for taking the time to join our community and start contributing! We
145+
welcome pull requests. Feel free to dig through the [issues][issue] and jump in.
146+
147+
### Before you start
148+
149+
* Please familiarize yourself with the [Code of Conduct][coc] before
150+
contributing.
151+
* See [CONTRIBUTING.md][contrib] for instructions on the developer certificate
152+
of origin that we require.
153+
* There is a [Slack channel][slack] if you want to
154+
interact with other members of the community
155+
156+
## Changelog
157+
158+
See [the list of releases][releases] to find out about feature changes.
159+
160+
[airgap]: airgap
161+
[brew]: https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-with-homebrew-on-macos
162+
[cncf]: https://github.com/cncf/k8s-conformance#certified-kubernetes
163+
[coc]: https://github.com/vmware-tanzu/sonobuoy/blob/master/CODE_OF_CONDUCT.md
164+
[contrib]: https://github.com/vmware-tanzu/sonobuoy/blob/master/CONTRIBUTING.md
165+
[docker]: https://docs.docker.com/install
166+
[docs]: https://sonobuoy.io/docs/v0.17.2
167+
[e2ePlugin]: e2eplugin
168+
[customPlugins]: plugins
169+
[gen]: gen
170+
[issue]: https://github.com/vmware-tanzu/sonobuoy/issues
171+
[k8s]: https://github.com/kubernetes/kubernetes
172+
[linux]: https://kubernetes.io/docs/tasks/tools/install-kubectl/#tabset-1
173+
[oview]: https://youtu.be/k-P4hXdruRs?t=9m27s
174+
[plugins]: plugins
175+
[quickstart]: https://aws.amazon.com/quickstart/architecture/vmware-kubernetes/
176+
[releases]: https://github.com/vmware-tanzu/sonobuoy/releases
177+
[results]: results
178+
[slack]: https://kubernetes.slack.com/messages/sonobuoy
179+
[snapshot]:snapshot
180+
[sonobuoyconfig]: sonobuoy-config

site/docs/v0.17.2/airgap.md

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Custom registries and air-gapped testing
2+
3+
In air-gapped deployments where there is no access to the public Docker registries Sonobuoy supports running the end-to-end tests with custom registries.
4+
This enables you to test your air-gapped deployment once you've loaded the necessary images into a registry that is reachable by your cluster.
5+
6+
You will need to make the Sonobuoy image available as well as the images for any plugins you wish to run.
7+
Below, you will find the details of how to use the Sonobuoy image, as well as the images for the `e2e` and `systemd-logs` plugins in this kind of deployment.
8+
9+
## Sonobuoy Image
10+
To run any Sonobuoy plugin in an air-gapped deployment, you must ensure that the Sonobuoy image is available in a registry that is reachable by your cluster.
11+
You will need to pull, tag, and then push the image as follows:
12+
13+
```
14+
PRIVATE_REG=<your private registry>
15+
SONOBUOY_VERSION=<version of Sonobuoy you are targeting; e.g. v0.16.0>
16+
17+
docker pull sonobuoy/sonobuoy:$SONOBUOY_VERSION
18+
docker tag sonobuoy/sonobuoy:$SONOBUOY_VERSION $PRIVATE_REG/sonobuoy:$SONOBUOY_VERSION
19+
docker push $PRIVATE_REG/sonobuoy:$SONOBUOY_VERSION
20+
```
21+
22+
By default, Sonobuoy will attempt to use the image available in the public registry.
23+
To use the image in your own registry, you will need to override it when using the `gen` or `run` command with the `--sonobuoy-image` flag as follows:
24+
25+
```
26+
sonobuoy run --sonobuoy-image $PRIVATE_REG/sonobuoy:$SONOBUOY_VERSION
27+
```
28+
29+
## E2E Plugin
30+
31+
To use the `e2e` plugin, the conformance test image and the images the tests use must be available in your registry.
32+
33+
### Conformance Image
34+
The process for making the conformance image available in your registry is the same as the Sonobuoy image.
35+
You need to pull, tag, and then push the image.
36+
To ensure you use the correct version of the conformance image, check your server version using `kubectl version`.
37+
38+
39+
```
40+
PRIVATE_REG=<private registry>
41+
CLUSTER_VERSION=<version of k8s you are targeting; e.g. v1.16.0>
42+
43+
docker pull gcr.io/google-containers/conformance:$CLUSTER_VERSION
44+
docker tag gcr.io/google-containers/conformance:$CLUSTER_VERSION $PRIVATE_REG/conformance:$CLUSTER_VERSION
45+
docker push $PRIVATE_REG/conformance:$CLUSTER_VERSION
46+
```
47+
48+
To use the conformance image in your registry, you will need to override the default when using the `gen` or `run` commands with the `--kube-conformance-image` flag as follows:
49+
50+
```
51+
sonobuoy run --kube-conformance-image $PRIVATE_REG/conformance:$CLUSTER_VERSION
52+
```
53+
54+
### Test Images
55+
56+
The end-to-end tests use a number of different images across multiple registries.
57+
When running the `e2e` plugin, you must provide a mapping that details which custom registries should be used instead of the public registries.
58+
59+
This mapping is a YAML file which maps the registry category to the corresponding registry URL.
60+
The keys in this file are specified in the Kubernetes test framework.
61+
The tests for each minor version of Kubernetes use a different set of registries so the mapping you create will depend on which Kubernetes version you are testing against.
62+
63+
To create this mapping, you can use the `gen default-image-config` command to provide the mapping with the default registry values for your cluster version.
64+
The following is an example of using this command with a v1.16 cluster:
65+
66+
```
67+
$ sonobuoy gen default-image-config
68+
dockerLibraryRegistry: docker.io/library
69+
e2eRegistry: gcr.io/kubernetes-e2e-test-images
70+
gcRegistry: k8s.gcr.io
71+
googleContainerRegistry: gcr.io/google-containers
72+
sampleRegistry: gcr.io/google-samples
73+
```
74+
75+
You can save this output to a file and modify it to specify your own registries instead.
76+
You can modify all of the registry values or just a subset.
77+
If you specify only a subset, the defaults will be used instead.
78+
79+
Sonobuoy provides the command `images` to help you easily pull the test images and push them to your own custom registries.
80+
First, you must pull the images to your local machine using the following command:
81+
82+
```
83+
sonobuoy images pull
84+
```
85+
86+
> **NOTE:** Some versions of Kubernetes reference images that do not exist or cannot be pulled without authentication.
87+
> You may see these errors when running the above command. This is expected behaviour.
88+
> These images are referenced by some end-to-end tests, but **not** by the conformance tests.
89+
90+
To push the images, you must provide the mapping using the `--e2e-repo-config` flag as follows:
91+
92+
```
93+
sonobuoy images push --e2e-repo-config <path/to/custom-repo-config.yaml>
94+
```
95+
96+
Sonobuoy will read the mapping config and will push the images to the repositories defined in that mapping.
97+
98+
When running the `e2e` plugin, you will need to provide this file using the same flag as follows:
99+
100+
```
101+
sonobuoy run --e2e-repo-config <path/to/custom-repo-config.yaml>
102+
```
103+
104+
## systemd-logs plugin
105+
106+
If you want to run the `systemd-logs` plugin you will again need to pull, tag, and push the image.
107+
108+
109+
```
110+
PRIVATE_REG=<private registry>
111+
112+
docker pull gcr.io/heptio-images/sonobuoy-plugin-systemd-logs:latest
113+
docker tag gcr.io/heptio-images/sonobuoy-plugin-systemd-logs:latest $PRIVATE_REG/sonobuoy-plugin-systemd-logs:latest
114+
docker push $PRIVATE_REG/sonobuoy-plugin-systemd-logs:latest
115+
```
116+
117+
To use the image in your own registry, you will need to override the default when using the `gen` or `run` commands with the `--systemd-logs-image` flag as follows:
118+
119+
```
120+
sonobuoy run --systemd-logs-image $PRIVATE_REG/sonobuoy-plugin-systemd-logs:latest
121+
```
122+
123+
If you do not wish to run this plugin, you can remove it from the list of [plugins][plugins] to be run within the manifest, or you can explicitly specify which plugin you with to run with the `--plugin` flag.
124+
125+
[plugins]: plugins.md#choosing-which-plugins-to-run

0 commit comments

Comments
 (0)