sonobuoytest

package
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sonobuoytest runs Kubernetes conformance, Sonobuoy's quick mode, for gcpemu's own tests: the Autopilot acceptance (e2e) on Autopilot clusters and TestKubeConformance (compat) on Standard clusters.

Only the e2e plugin runs, on Standard and Autopilot clusters alike: the systemd-logs plugin's DaemonSet is privileged and mounts host paths, which Autopilot refuses, as GKE does, and on a Standard cluster it only gathers node journals, asserting nothing about conformance (#754).

Index

Constants

View Source
const Version = "0.57.5"

Version is the pinned Sonobuoy release.

Variables

View Source
var SHA256 = map[string]string{
	"linux/amd64":   "7c5c2250e5103c98f4dad2bcab86baf954e319c57c419c113f28f5060e62f129",
	"linux/arm64":   "ec482b5d1ec237f4c94b6fd7be5a69f95678a4331001b3edcb6ad7835ec40695",
	"darwin/amd64":  "4202d3a960a812e68b555829eefbe0cc25de8b2e5cb2fc8e5cc38dfc83515a9d",
	"darwin/arm64":  "d889c4a4485f3899f8d860506ed4da5380372f23f91cd0113e52f036d842e978",
	"windows/amd64": "041500d35af9720cb8e0ec3584b32243e6555c1e7413caadf9ddb8c336354f63",
}

SHA256 is Version's archive checksums (sonobuoy_<version>_checksums.txt) by GOOS/GOARCH.

Functions

func URL

func URL(platform string) string

URL returns the Version archive's URL for platform ("linux/amd64").

Types

type Guarded

type Guarded struct {
	Bin   string   // sonobuoy
	Env   []string // its environment, before the guard's
	Guard *escapeguard.Guard
	// APIServer is the cluster's API server ("https://10.0.0.2:6443" or
	// "10.0.0.2"), on this machine, which the guard lets through.
	APIServer string
}

Guarded runs sonobuoy behind the Escape guard (see CONTEXT.md), so that a request it sends off the machine is refused and named.

func (Guarded) Canary

func (g Guarded) Canary(dir string) error

Canary asks for the server version of a cluster at canaryHost, writing its kubeconfig in dir, and returns an error unless the guard refuses the request. Without it, a sonobuoy that ignored HTTPS_PROXY would pass every run with the guard never seeing a request.

func (Guarded) Sonobuoy

func (g Guarded) Sonobuoy(errorf func(format string, args ...any)) func(time.Duration, ...string) (string, error)

Sonobuoy is exec as Quick.Sonobuoy, calling errorf for each request the guard refused. gke-gcloud-auth-plugin, in a kubeconfig from gcloud, runs gcloud under it, so gcloud's universe descriptor fetch is not an escape.

type Quick

type Quick struct {
	// Sonobuoy runs sonobuoy with args against the cluster, within timeout.
	Sonobuoy func(timeout time.Duration, args ...string) (string, error)
	// Keep, if set, is the file a failed run's results tarball is copied to.
	Keep string
	// Diagnose, if set, explains a run that failed or left no results (the
	// sonobuoy pods' logs, say).
	Diagnose func() string
	// Logf logs the results.
	Logf func(format string, args ...any)
}

Quick is a quick-mode run against one cluster.

func (Quick) Run

func (q Quick) Run(dir, version string) error

Run runs quick mode on a cluster at version ("1.36.5-gke.100"), keeping the results tarball in dir, and returns an error unless the e2e plugin passed with at least one test passed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL