Documentation ¶
Index ¶
- func GetModes() []string
- func UntarAll(reader io.Reader, destFile, prefix string) error
- type DeleteConfig
- type E2EConfig
- type GenConfig
- type Interface
- type LogConfig
- type Mode
- type ModeConfig
- type RetrieveConfig
- type RunConfig
- type SonobuoyClient
- func (c *SonobuoyClient) Delete(cfg *DeleteConfig, client kubernetes.Interface) error
- func (c *SonobuoyClient) GenerateManifest(cfg *GenConfig) ([]byte, error)
- func (c *SonobuoyClient) GetLogs(cfg *LogConfig, client kubernetes.Interface) error
- func (c *SonobuoyClient) GetStatus(namespace string, client kubernetes.Interface) (*aggregation.Status, error)
- func (c *SonobuoyClient) RetrieveResults(cfg *RetrieveConfig, restConfig *rest.Config) io.Reader
- func (c *SonobuoyClient) Run(cfg *RunConfig, restConfig *rest.Config) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DeleteConfig ¶
DeleteConfig are the input options for cleaning up a Sonobuoy run.
type GenConfig ¶
type GenConfig struct { E2EConfig *E2EConfig Config *config.Config Image string Namespace string EnableRBAC bool }
GenConfig are the input options for generating a Sonobuoy manifest.
type Interface ¶
type Interface interface { // Run generates the manifest, then tries to apply it to the cluster. // returns created resources or an error Run(cfg *RunConfig, restConfig *rest.Config) error // GenerateManifest fills in a template with a Sonobuoy config GenerateManifest(cfg *GenConfig) ([]byte, error) // RetrieveResults copies results from a sonobuoy run into a Reader in tar format. RetrieveResults(cfg *RetrieveConfig, restConfig *rest.Config) io.Reader // GetStatus determines the status of the sonobuoy run in order to assist the user. GetStatus(namespace string, client kubernetes.Interface) (*aggregation.Status, error) // GetLogs streams logs from the sonobuoy pod by default to stdout. GetLogs(cfg *LogConfig, client kubernetes.Interface) error // Delete removes a sonobuoy run, namespace, and all associated resources. Delete(cfg *DeleteConfig, client kubernetes.Interface) error }
Interface is the main contract that we will give to external consumers of this library This will provide a consistent look/feel to upstream and allow us to expose sonobuoy behavior to other automation systems.
type LogConfig ¶
type LogConfig struct { // Follow determines if the logs should be followed or not (tail -f). Follow *bool // Namespace is the namespace the sonobuoy aggregator is running in. Namespace string }
LogConfig are the options passed to GetLogs.
type Mode ¶
type Mode string
Mode identifies a specific mode of running Sonobuoy. A mode is a defined configuration of plugins and E2E Focus and Config. Modes form the base level defaults, which can then be overriden by the e2e flags and the config flag.
const ( // Quick runs a single E2E test and the systemd log tests. Quick Mode = "quick" // Conformance runs all of the E2E tests and the systemd log tests. Conformance Mode = "conformance" // Extended run all of the E2E tests, the systemd log tests, and // Heptio's E2E Tests. Extended Mode = "extended" )
func (*Mode) Get ¶
func (n *Mode) Get() *ModeConfig
Get returns the ModeConfig associated with a mode name, or nil if there's no associated mode
type ModeConfig ¶
type ModeConfig struct { // E2EConfig is the focus and skip vars for the conformance tests E2EConfig E2EConfig // Selectors are the plugins selected by this mode. Selectors []plugin.Selection }
ModeConfig represents the sonobuoy configuration for a given mode.
type RetrieveConfig ¶
type RetrieveConfig struct { // CmdErr is the place to write errors to. CmdErr io.Writer // Errc reports errors from go routines that retrieve may spawn. Errc chan error // Namespace is the namespace the sonobuoy aggregator is running in. Namespace string }
RetrieveConfig are the options passed to RetrieveResults.
type RunConfig ¶
type RunConfig struct { GenConfig // SkipPreflight means don't run any checks before kicking off the Sonobuoy run. SkipPreflight bool }
RunConfig are the input options for running Sonobuoy.
type SonobuoyClient ¶
type SonobuoyClient struct{}
SonobuoyClient is a high-level interface to Sonobuoy operations.
func NewSonobuoyClient ¶
func NewSonobuoyClient() *SonobuoyClient
NewSonobuoyClient creates a new SonobuoyClient
func (*SonobuoyClient) Delete ¶
func (c *SonobuoyClient) Delete(cfg *DeleteConfig, client kubernetes.Interface) error
func (*SonobuoyClient) GenerateManifest ¶
func (c *SonobuoyClient) GenerateManifest(cfg *GenConfig) ([]byte, error)
GenerateManifest fills in a template with a Sonobuoy config
func (*SonobuoyClient) GetLogs ¶
func (c *SonobuoyClient) GetLogs(cfg *LogConfig, client kubernetes.Interface) error
func (*SonobuoyClient) GetStatus ¶
func (c *SonobuoyClient) GetStatus(namespace string, client kubernetes.Interface) (*aggregation.Status, error)
func (*SonobuoyClient) RetrieveResults ¶
func (c *SonobuoyClient) RetrieveResults(cfg *RetrieveConfig, restConfig *rest.Config) io.Reader