Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregationConfig ¶
type AggregationConfig struct { BindAddress string `json:"bindaddress"` BindPort int `json:"bindport"` AdvertiseAddress string `json:"advertiseaddress"` TimeoutSeconds int `json:"timeoutseconds"` }
AggregationConfig are the config settings for the server that aggregates plugin results
type Definition ¶
type Definition struct { Driver string `json:"driver"` Name string `json:"name"` ResultType string `json:"resultType"` RawPodSpec map[string]interface{} `json:"spec"` PodSpec v1.PodSpec // This is filled in by the plugin loader, since deserializing a pod spec is nontrivial }
Definition defines a plugin's features, method of launch, and other metadata about it.
type ExpectedResult ¶
ExpectedResult is an expected result that a plugin will submit. This is so the aggregation server can know when it all results have been received.
func (*ExpectedResult) ID ¶
func (er *ExpectedResult) ID() string
ID returns a unique identifier for this expected result to distinguish it from the rest of the results that may be seen by the aggregation server.
type Interface ¶
type Interface interface { // Run runs a plugin, declaring all resources it needs, and then // returns. It does not block and wait until the plugin has finished. Run(kubeClient kubernetes.Interface) error // Cleanup cleans up all resources created by the plugin Cleanup(kubeClient kubernetes.Interface) []error // Monitor continually checks for problems in the resources created by a // plugin (either because it won't schedule, or the image won't // download, too many failed executions, etc) and sends the errors as // Result objects through the provided channel. Monitor(kubeClient kubernetes.Interface, availableNodes []v1.Node, resultsCh chan<- *Result) // ExpectedResults is an array of Result objects that a plugin should // expect to submit. ExpectedResults(nodes []v1.Node) []ExpectedResult // GetResultType returns the type of results for this plugin, typically // the same as the plugin name. GetResultType() string // GetName returns the name of this plugin GetName() string // GetPodSpec returns the pod spec for this plugins GetPodSpec() *v1.PodSpec // GetSessionID returns a distinct identifier for this plugin in this // sonobuoy session (for instance, for labeling resources created by // this plugin.) GetSessionID() string }
Interface represents what all plugins must implement to be run and have results be aggregated.
type Result ¶
Result represents a result we got from a dispatched plugin, returned to the aggregation server over HTTP. Errors running a plugin are also considered a Result, if they have an Error property set.
func (*Result) ExpectedResultID ¶
ExpectedResultID returns a unique identifier for this result to match it up against an expected result.
func (*Result) Extension ¶
Extension returns the results extension for different plugins TODO: We should load this for the plugin.
type Selection ¶
type Selection struct { Name string `json:"name"` Config map[string]interface{} `json:"config,omitempty"` }
Selection is the user specified input to load and initialize plugins
type WorkerConfig ¶
type WorkerConfig struct { // MasterURL is the URL we talk to for submitting results MasterURL string `json:"masterurl,omitempty mapstructure:"masterurl""` // NodeName is the node name we should call ourselves when sending results NodeName string `json:"nodename,omitempty" mapstructure:"nodename"` // ResultsDir is the directory that's expected to contain the host's root filesystem ResultsDir string `json:"resultsdir,omitempty" mapstructure:"resultsdir"` // ResultType is the type of result (to be put in the HTTP URL's path) to be // sent back to sonobuoy. ResultType string `json:"resulttype,omitempty" mapstructure:"resulttype"` }
WorkerConfig is the file given to the sonobuoy worker to configure it to phone home.
Directories ¶
Path | Synopsis |
---|---|
Package aggregation is responsible for hosting an HTTP server which aggregates results from all of the nodes that are running sonobuoy agent.
|
Package aggregation is responsible for hosting an HTTP server which aggregates results from all of the nodes that are running sonobuoy agent. |
driver
|
|
Package loader is responsible for scanning for Plugin Definitions at runtime, and matching/loading them from a user's configuration.
|
Package loader is responsible for scanning for Plugin Definitions at runtime, and matching/loading them from a user's configuration. |