Documentation
¶
Overview ¶
Package action contains the logic for each action that Iter8 can perform.
This is a library for calling top-level Iter8 actions like 'launch', 'assert', or 'report'. Actions approximately match the command line invocations that the Iter8 CLI uses.
Index ¶
Constants ¶
const ( // Completed states that the experiment is complete Completed = "completed" // NoFailure states that none of the tasks in the experiment have failed NoFailure = "nofailure" // SLOs states that all app versions participating in the experiment satisfy SLOs SLOs = "slos" )
const ( // DefaultHelmRepository is the URL of the default Helm repository DefaultHelmRepository = "https://iter8-tools.github.io/iter8" // DefaultChartName is the default name of the Iter8 chart DefaultChartName = "iter8" )
const ( // TextOutputFormatKey is the output format used to create text output TextOutputFormatKey = "text" // HTMLOutputFormatKey is the output format used to create html output HTMLOutputFormatKey = "html" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssertOpts ¶
type AssertOpts struct {
// Timeout is the duration to wait for conditions to be satisfied
Timeout time.Duration
// Conditions are checked by assert
Conditions []string
// RunOpts provides options relating to experiment resources
RunOpts
}
AssertOpts are the options used for asserting experiment results
func NewAssertOpts ¶
func NewAssertOpts(kd *driver.KubeDriver) *AssertOpts
NewAssertOpts initializes and returns assert opts
func (*AssertOpts) KubeRun ¶
func (aOpts *AssertOpts) KubeRun() (bool, error)
KubeRun asserts conditions for a Kubernetes experiment
type DeleteOpts ¶ added in v0.10.0
type DeleteOpts struct {
// KubeDriver enables access to Kubernetes cluster
*driver.KubeDriver
}
DeleteOpts are the options used for deleting experiment groups
func NewDeleteOpts ¶ added in v0.10.0
func NewDeleteOpts(kd *driver.KubeDriver) *DeleteOpts
NewDeleteOpts initializes and returns launch opts
func (*DeleteOpts) KubeRun ¶ added in v0.10.0
func (dOpts *DeleteOpts) KubeRun() error
KubeRun deletes a Kubernetes experiment
type LaunchOpts ¶
type LaunchOpts struct {
// DryRun enables simulating a launch
DryRun bool
// ChartPathOptions
action.ChartPathOptions
// ChartName is the name of the chart
ChartName string
// Options provides the values to be combined with the experiment chart
values.Options
// Rundir is the directory where experiment.yaml file is located
RunDir string
// KubeDriver enables Kubernetes experiment run
*driver.KubeDriver
// LocalChart indicates the chart is on the local filesystem
LocalChart bool
}
LaunchOpts are the options used for launching experiments
func NewLaunchOpts ¶
func NewLaunchOpts(kd *driver.KubeDriver) *LaunchOpts
NewLaunchOpts initializes and returns launch opts
func (*LaunchOpts) KubeRun ¶
func (lOpts *LaunchOpts) KubeRun() error
KubeRun launches a Kubernetes experiment
type LogOpts ¶
type LogOpts struct {
// KubeDriver enables interaction with Kubernetes cluster
*driver.KubeDriver
}
LogOpts enables fetching logs from Kubernetes
func NewLogOpts ¶
func NewLogOpts(kd *driver.KubeDriver) *LogOpts
NewLogOpts initializes and returns log opts
type ReportOpts ¶
type ReportOpts struct {
// OutputFormat specifies the output format to be used by report
OutputFormat string
// RunOpts enables fetching local experiment spec and result
RunOpts
// KubeDriver enables fetching Kubernetes experiment spec and result
*driver.KubeDriver
}
ReportOpts are the options used for generating reports from experiment result
func NewReportOpts ¶
func NewReportOpts(kd *driver.KubeDriver) *ReportOpts
NewReportOpts initializes and returns report opts
type RunOpts ¶
type RunOpts struct {
// Rundir is the directory of the local experiment.yaml file
RunDir string
// KubeDriver enables Kubernetes experiment run
*driver.KubeDriver
// ReuseResult configures Iter8 to reuse the experiment result instead of
// creating a new one for looping experiments.
ReuseResult bool
}
RunOpts are the options used for running an experiment
func NewRunOpts ¶
func NewRunOpts(kd *driver.KubeDriver) *RunOpts
NewRunOpts initializes and returns run opts