Skip to content

Commit

Permalink
Prepare v0.18.0 release (#1101)
Browse files Browse the repository at this point in the history
Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
  • Loading branch information
zubron authored Apr 1, 2020
1 parent 7613c7d commit 9b3d367
Show file tree
Hide file tree
Showing 28 changed files with 1,369 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/buildinfo/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ limitations under the License.
package buildinfo

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

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

// MinimumKubeVersion is the lowest API version of Kubernetes this release of Sonobuoy supports.
var MinimumKubeVersion = "1.15.0"
var MinimumKubeVersion = "1.16.0"

// MaximumKubeVersion is the highest API version of Kubernetes this release of Sonobuoy supports.
var MaximumKubeVersion = "1.17.99"
var MaximumKubeVersion = "1.18.99"
21 changes: 21 additions & 0 deletions pkg/image/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const (
googleContainerRegistry = "gcr.io/google-containers"
invalidRegistry = "invalid.com/invalid"
privateRegistry = "gcr.io/k8s-authenticated-test"
promoterE2eRegistry = "us.gcr.io/k8s-artifacts-prod/e2e-test-images"
quayIncubator = "quay.io/kubernetes_incubator"
quayK8sCSI = "quay.io/k8scsi"
sampleRegistry = "gcr.io/google-samples"
Expand All @@ -52,6 +53,7 @@ type RegistryList struct {
GoogleContainerRegistry string `yaml:"googleContainerRegistry,omitempty"`
InvalidRegistry string `yaml:"invalidRegistry,omitempty"`
PrivateRegistry string `yaml:"privateRegistry,omitempty"`
PromoterE2eRegistry string `yaml:"promoterE2eRegistry"`
QuayIncubator string `yaml:"quayIncubator,omitempty"`
QuayK8sCSI string `yaml:"quayK8sCSI,omitempty"`
SampleRegistry string `yaml:"sampleRegistry,omitempty"`
Expand Down Expand Up @@ -125,6 +127,8 @@ func (r *RegistryList) getImageConfigs() (map[string]Config, error) {
return r.v1_16(), nil
case 17:
return r.v1_17(), nil
case 18:
return r.v1_18(), nil
}
}
return map[string]Config{}, fmt.Errorf("No matching configuration for k8s version: %v", r.K8sVersion)
Expand Down Expand Up @@ -239,6 +243,23 @@ func GetDefaultImageRegistries(version string) (*RegistryList, error) {
// GcAuthenticatedRegistry: gcAuthenticatedRegistry,
// PrivateRegistry: privateRegistry,
}, nil
case 18:
return &RegistryList{
E2eRegistry: e2eRegistry,
DockerLibraryRegistry: dockerLibraryRegistry,
GcRegistry: gcRegistry,
GoogleContainerRegistry: googleContainerRegistry,
DockerGluster: dockerGluster,
QuayIncubator: quayIncubator,
PromoterE2eRegistry: promoterE2eRegistry,

// The following keys are used in the v1.18 registry list however their images
// cannot be pulled as they are used as part of tests for checking image pull
// behavior. They are omitted from the resulting config.
// InvalidRegistry: invalidRegistry,
// GcAuthenticatedRegistry: gcAuthenticatedRegistry,
// PrivateRegistry: privateRegistry,
}, nil
}
}
return nil, fmt.Errorf("No matching configuration for k8s version: %v", v)
Expand Down
74 changes: 74 additions & 0 deletions pkg/image/v1.18.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// NOTE: This is manually replicated from: https://github.com/kubernetes/kubernetes/blob/v1.18.0/test/utils/image/manifest.go#L208-L248

package image

func (r *RegistryList) v1_18() map[string]Config {

e2eRegistry := r.E2eRegistry
dockerLibraryRegistry := r.DockerLibraryRegistry
gcRegistry := r.GcRegistry
gcAuthenticatedRegistry := r.GcAuthenticatedRegistry
googleContainerRegistry := r.GoogleContainerRegistry
invalidRegistry := r.InvalidRegistry
privateRegistry := r.PrivateRegistry
dockerGluster := r.DockerGluster
quayIncubator := r.QuayIncubator
promoterE2eRegistry := r.PromoterE2eRegistry

configs := map[string]Config{}
configs["Agnhost"] = Config{promoterE2eRegistry, "agnhost", "2.12"}
configs["AgnhostPrivate"] = Config{privateRegistry, "agnhost", "2.6"}
configs["AuthenticatedAlpine"] = Config{gcAuthenticatedRegistry, "alpine", "3.7"}
configs["AuthenticatedWindowsNanoServer"] = Config{gcAuthenticatedRegistry, "windows-nanoserver", "v1"}
configs["APIServer"] = Config{e2eRegistry, "sample-apiserver", "1.17"}
configs["AppArmorLoader"] = Config{e2eRegistry, "apparmor-loader", "1.0"}
configs["BusyBox"] = Config{dockerLibraryRegistry, "busybox", "1.29"}
configs["CheckMetadataConcealment"] = Config{e2eRegistry, "metadata-concealment", "1.2"}
configs["CudaVectorAdd"] = Config{e2eRegistry, "cuda-vector-add", "1.0"}
configs["CudaVectorAdd2"] = Config{e2eRegistry, "cuda-vector-add", "2.0"}
configs["EchoServer"] = Config{e2eRegistry, "echoserver", "2.2"}
configs["Etcd"] = Config{gcRegistry, "etcd", "3.4.3"}
configs["GlusterDynamicProvisioner"] = Config{dockerGluster, "glusterdynamic-provisioner", "v1.0"}
configs["Httpd"] = Config{dockerLibraryRegistry, "httpd", "2.4.38-alpine"}
configs["HttpdNew"] = Config{dockerLibraryRegistry, "httpd", "2.4.39-alpine"}
configs["InvalidRegistryImage"] = Config{invalidRegistry, "alpine", "3.1"}
configs["IpcUtils"] = Config{e2eRegistry, "ipc-utils", "1.0"}
configs["JessieDnsutils"] = Config{e2eRegistry, "jessie-dnsutils", "1.0"}
configs["Kitten"] = Config{e2eRegistry, "kitten", "1.0"}
configs["Mounttest"] = Config{e2eRegistry, "mounttest", "1.0"}
configs["MounttestUser"] = Config{e2eRegistry, "mounttest-user", "1.0"}
configs["Nautilus"] = Config{e2eRegistry, "nautilus", "1.0"}
configs["NFSProvisioner"] = Config{quayIncubator, "nfs-provisioner", "v2.2.2"}
configs["Nginx"] = Config{dockerLibraryRegistry, "nginx", "1.14-alpine"}
configs["NginxNew"] = Config{dockerLibraryRegistry, "nginx", "1.15-alpine"}
configs["Nonewprivs"] = Config{e2eRegistry, "nonewprivs", "1.0"}
configs["NonRoot"] = Config{e2eRegistry, "nonroot", "1.0"}
// Pause - when these values are updated, also update cmd/kubelet/app/options/container_runtime.go
configs["Pause"] = Config{gcRegistry, "pause", "3.2"}
configs["Perl"] = Config{dockerLibraryRegistry, "perl", "5.26"}
configs["PrometheusDummyExporter"] = Config{gcRegistry, "prometheus-dummy-exporter", "v0.1.0"}
configs["PrometheusToSd"] = Config{gcRegistry, "prometheus-to-sd", "v0.5.0"}
configs["Redis"] = Config{dockerLibraryRegistry, "redis", "5.0.5-alpine"}
configs["RegressionIssue74839"] = Config{e2eRegistry, "regression-issue-74839-amd64", "1.0"}
configs["ResourceConsumer"] = Config{e2eRegistry, "resource-consumer", "1.5"}
configs["SdDummyExporter"] = Config{gcRegistry, "sd-dummy-exporter", "v0.2.0"}
configs["StartupScript"] = Config{googleContainerRegistry, "startup-script", "v1"}
configs["VolumeNFSServer"] = Config{e2eRegistry, "volume/nfs", "1.0"}
configs["VolumeISCSIServer"] = Config{e2eRegistry, "volume/iscsi", "2.0"}
configs["VolumeGlusterServer"] = Config{e2eRegistry, "volume/gluster", "1.0"}
configs["VolumeRBDServer"] = Config{e2eRegistry, "volume/rbd", "1.0.1"}
return configs
}
9 changes: 8 additions & 1 deletion site/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ defaults:
version: master
gh: https://github.com/vmware-tanzu/sonobuoy/tree/master
layout: "docs"
- scope:
path: docs/v0.18.0
values:
version: v0.18.0
gh: https://github.com/vmware-tanzu/sonobuoy/tree/v0.18.0
layout: "docs"
- scope:
path: docs/v0.17.2
values:
Expand Down Expand Up @@ -179,9 +185,10 @@ collections:
- plugin-list

versioning: true
latest: v0.17.2
latest: v0.18.0
versions:
- master
- v0.18.0
- v0.17.2
- v0.17.1
- v0.17.0
Expand Down
1 change: 1 addition & 0 deletions site/_data/toc-mapping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Below is a commented out example of what this may look like:

master: master-toc
v0.18.0: v0-18-0toc
v0.17.2: v0-17-2toc
v0.17.1: v0-17-1toc
v0.17.0: v0-17-0toc
Expand Down
32 changes: 32 additions & 0 deletions site/_data/v0-18-0toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
toc:
- title: Basics
subfolderitems:
- page: Overview
url: /index.html
- page: Checking Results
url: /results
- title: Plugins
subfolderitems:
- page: Overview
url: /plugins
- page: E2E & Conformance
url: /e2eplugin
- page: Examples
url: /examples
github: true
- title: Advanced
subfolderitems:
- page: Detailed result contents
url: /snapshot
- page: Configuration Options
url: /sonobuoy-config
- page: Custom Registries & Airgap Testing
url: /airgap
- page: Using Private Images
url: /pullsecrets
- page: Advanced Customization
url: /gen
- title: Resources
subfolderitems:
- page: Frequently Asked Questions
url: /faq
173 changes: 173 additions & 0 deletions site/docs/v0.18.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
# <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)

## [Overview][oview]

Sonobuoy is a diagnostic tool that makes it easier to understand the
state of a Kubernetes cluster by running a set of plugins (including [Kubernetes][k8s] conformance
tests) in an accessible and non-destructive manner. It is a customizable,
extendable, and cluster-agnostic way to generate clear, informative reports
about your cluster.

Its selective data dumps of Kubernetes resource objects and cluster nodes allow
for the following use cases:

* Integrated end-to-end (e2e) [conformance-testing][e2ePlugin]
* Workload debugging
* Custom data collection via extensible plugins

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.

> Note: You can skip this version enforcement by running Sonobuoy with the `--skip-preflight` flag.
## Prerequisites

* Access to an up-and-running Kubernetes cluster. If you do not have a cluster,
we recommend following the [AWS Quickstart for Kubernetes][quickstart] instructions.

* An admin `kubeconfig` file, and the KUBECONFIG environment variable set.

* For some advanced workflows it may be required to have `kubectl` installed. See [installing via Homebrew (MacOS)][brew] or [building
the binary (Linux)][linux].

* The `sonobuoy images` subcommand requires [Docker](https://www.docker.com) to be installed. See [installing Docker](docker).

## Installation

1. Download the [latest release][releases] for your client platform.
2. Extract the tarball:

```
tar -xvf <RELEASE_TARBALL_NAME>.tar.gz
```

Move the extracted `sonobuoy` executable to somewhere on your `PATH`.

## Getting Started

To launch conformance tests (ensuring [CNCF][cncf] conformance) and wait until they are finished run:

```bash
sonobuoy run --wait
```

> 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.
Get the results from the plugins (e.g. e2e test results):

```bash
results=$(sonobuoy retrieve)
```

Inspect results for test failures. This will list the number of tests failed and their names:

```bash
sonobuoy results $results
```

> Note: The `results` command has lots of useful options for various situations. See the [results page][results] for more details.
You can also extract the entire contents of the file to get much more [detailed data][snapshot] about your cluster.

Sonobuoy creates a few resources in order to run and expects to run within its
own namespace.

Deleting Sonobuoy entails removing its namespace as well as a few cluster
scoped resources.

```bash
sonobuoy delete --wait
```

> Note: The --wait option ensures the Kubernetes namespace is deleted, avoiding conflicts if another Sonobuoy run is started quickly.
### Other Tests

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:

* tests for specific storage features
* performance tests
* scaling tests
* provider specific tests
* and many more

To modify which tests you want to run, checkout our page on the [e2e plugin][e2ePlugin].

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].

### Monitoring Sonobuoy during a run

You can check on the status of each of the plugins running with:

```bash
sonobuoy status
```

You can also inspect the logs of all Sonobuoy containers:

```bash
sonobuoy logs
```

## Troubleshooting

If you encounter any problems that the documentation does not address, [file an
issue][issue].

## Known Issues

### Leaked End-to-end namespaces

There are some Kubernetes e2e tests that may leak resources. Sonobuoy can
help clean those up as well by deleting all namespaces prefixed with `e2e`:

```bash
sonobuoy delete --all
```

### Run on Google Cloud Platform (GCP)

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:

```bash
kubectl create clusterrolebinding <your-user-cluster-admin-binding> --clusterrole=cluster-admin --user=<your.google.cloud.email@example.org>
```

## Contributing

Thanks for taking the time to join our community and start contributing! We
welcome pull requests. Feel free to dig through the [issues][issue] and jump in.

### Before you start

* Please familiarize yourself with the [Code of Conduct][coc] before
contributing.
* See [CONTRIBUTING.md][contrib] for instructions on the developer certificate
of origin that we require.
* There is a [Slack channel][slack] if you want to
interact with other members of the community

## Changelog

See [the list of releases][releases] to find out about feature changes.

[airgap]: airgap
[brew]: https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-with-homebrew-on-macos
[cncf]: https://github.com/cncf/k8s-conformance#certified-kubernetes
[coc]: https://github.com/vmware-tanzu/sonobuoy/blob/master/CODE_OF_CONDUCT.md
[contrib]: https://github.com/vmware-tanzu/sonobuoy/blob/master/CONTRIBUTING.md
[docker]: https://docs.docker.com/install
[docs]: https://sonobuoy.io/docs/v0.18.0
[e2ePlugin]: e2eplugin
[customPlugins]: plugins
[gen]: gen
[issue]: https://github.com/vmware-tanzu/sonobuoy/issues
[k8s]: https://github.com/kubernetes/kubernetes
[linux]: https://kubernetes.io/docs/tasks/tools/install-kubectl/#tabset-1
[oview]: https://youtu.be/k-P4hXdruRs?t=9m27s
[plugins]: plugins
[quickstart]: https://aws.amazon.com/quickstart/architecture/vmware-kubernetes/
[releases]: https://github.com/vmware-tanzu/sonobuoy/releases
[results]: results
[slack]: https://kubernetes.slack.com/messages/sonobuoy
[snapshot]:snapshot
[sonobuoyconfig]: sonobuoy-config
Loading

0 comments on commit 9b3d367

Please sign in to comment.