Documentation
¶
Overview ¶
Package driver enables interaction with experiment resources. It provides drivers for local and Kubernetes experiments.
Index ¶
- Constants
- func CopyFileToPwd(t *testing.T, filePath string) error
- func ExperimentFromBytes(b []byte) (*base.Experiment, error)
- func UpdateChartDependencies(chartDir string, settings *cli.EnvSettings) error
- type FileDriver
- type KubeDriver
- func (driver *KubeDriver) Delete() error
- func (driver *KubeDriver) GetExperimentLogs() (string, error)
- func (driver *KubeDriver) GetRevision() int
- func (kd *KubeDriver) Init() error
- func (kd *KubeDriver) InitKube() error
- func (driver *KubeDriver) Launch(chartDir string, valueOpts values.Options, group string, dry bool) error
- func (driver *KubeDriver) Read() (*base.Experiment, error)
- func (driver *KubeDriver) Write(e *base.Experiment) error
Constants ¶
const ( // ExperimentPath is the name of the experiment file ExperimentPath = "experiment.yaml" // DefaultExperimentGroup is the name of the default experiment chart DefaultExperimentGroup = "default" )
const (
// ManifestFile is the name of the Kubernetes manifest file
ManifestFile = "manifest.yaml"
)
Variables ¶
This section is empty.
Functions ¶
func CopyFileToPwd ¶ added in v0.11.0
CopyFileToPwd
func ExperimentFromBytes ¶ added in v0.11.0
func ExperimentFromBytes(b []byte) (*base.Experiment, error)
ExperimentFromBytes reads experiment from bytes
func UpdateChartDependencies ¶ added in v0.10.0
func UpdateChartDependencies(chartDir string, settings *cli.EnvSettings) error
UpdateChartDependencies for an Iter8 experiment chart for now this function has one purpose ... bring iter8lib dependency into other experiment charts like load-test-http
Types ¶
type FileDriver ¶
type FileDriver struct { // RunDir is the directory where the experiment.yaml file is to be found RunDir string }
FileDriver enables reading and writing experiment spec and result files
func (*FileDriver) GetRevision ¶ added in v0.11.0
func (f *FileDriver) GetRevision() int
GetRevision is undefined for file drivers
func (*FileDriver) Read ¶ added in v0.11.0
func (f *FileDriver) Read() (*base.Experiment, error)
Read the experiment
func (*FileDriver) Write ¶ added in v0.11.0
func (f *FileDriver) Write(exp *base.Experiment) error
Write the experiment
type KubeDriver ¶
type KubeDriver struct { // EnvSettings provides generic Kubernetes and Helm options *cli.EnvSettings // Clientset enables interaction with a Kubernetes cluster Clientset kubernetes.Interface // Configuration enables Helm-based interaction with a Kubernetes cluster *action.Configuration // Group is the experiment group Group string // contains filtered or unexported fields }
KubeDriver embeds Helm and Kube configuration, and enables interaction with a Kubernetes cluster through Kube APIs and Helm APIs
func NewFakeKubeDriver ¶
func NewFakeKubeDriver(s *cli.EnvSettings, objects ...runtime.Object) *KubeDriver
NewFakeKubeDriver creates and returns a new KubeDriver with fake clients
func NewKubeDriver ¶
func NewKubeDriver(s *cli.EnvSettings) *KubeDriver
NewKubeDriver creates and returns a new KubeDriver
func (*KubeDriver) Delete ¶ added in v0.10.0
func (driver *KubeDriver) Delete() error
Delete a Kubernetes experiment group
func (*KubeDriver) GetExperimentLogs ¶
func (driver *KubeDriver) GetExperimentLogs() (string, error)
GetExperimentLogs gets logs for a Kubernetes experiment
func (*KubeDriver) GetRevision ¶ added in v0.11.0
func (driver *KubeDriver) GetRevision() int
GetRevision gets the experiment revision
func (*KubeDriver) InitKube ¶ added in v0.10.13
func (kd *KubeDriver) InitKube() error
InitKube initializes the Kubernetes clientset
func (*KubeDriver) Launch ¶ added in v0.10.9
func (driver *KubeDriver) Launch(chartDir string, valueOpts values.Options, group string, dry bool) error
Launch a Kubernetes experiment
func (*KubeDriver) Read ¶ added in v0.11.0
func (driver *KubeDriver) Read() (*base.Experiment, error)
Read experiment from secret
func (*KubeDriver) Write ¶ added in v0.11.0
func (driver *KubeDriver) Write(e *base.Experiment) error
Write writes a Kubernetes experiment