v2alpha1

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v2alpha1 contains API Schema definitions for the core v2alpha1 API group +kubebuilder:object:generate=true +groupName=iter8.tools

Index

Constants

View Source
const (
	ReasonExperimentInitialized      = "ExperimentInitialized"
	ReasonTargetAcquired             = "TargetAcquired"
	ReasonIterationCompleted         = "IterationUpdate"
	ReasonExperimentCompleted        = "ExperimentCompleted"
	ReasonAnalyticsServiceError      = "AnalyticsServiceError"
	ReasonMetricUnavailable          = "MetricUnavailable"
	ReasonMetricsUnreadable          = "MetricsUnreadable"
	ReasonHandlerLaunched            = "HandlerLaunched"
	ReasonHandlerCompleted           = "HandlerCompleted"
	ReasonHandlerFailed              = "HandlerFailed"
	ReasonLaunchHandlerFailed        = "LaunchHandlerFailed"
	ReasonWeightRedistributionFailed = "WeightRedistributionFailed"
	ReasonInvalidExperiment          = "InvalidExperiment"
	ReasonStageAdvanced              = "StageAdvanced"
)

A set of reason setting the experiment condition status

View Source
const (
	// NoneHandler is the keyword users can use to indicate no handler
	NoneHandler string = "none"

	// DefaultMaxCandidateWeight is the default traffic percentage used in experiment, which is 100
	DefaultMaxCandidateWeight int32 = 100

	// DefaultMaxCandidateWeightIncrement is the default maxIncrement for traffic update, which is 10
	DefaultMaxCandidateWeightIncrement int32 = 10

	// DefaultDeploymentPattern is the default deployment pattern for experiments
	// It takes effect when the testing pattern is canary, A/B or A/B/n
	DefaultDeploymentPattern DeploymentPatternType = DeploymentPatternProgressive

	// DefaultIntervalSeconds is default interval duration as a string
	DefaultIntervalSeconds = 20

	// DefaultIterationsPerLoop is the default number of iterations, 15
	DefaultIterationsPerLoop int32 = 15

	// DefaultMaxLoops is the default maximum number of loops, 1
	// reserved for future use
	DefaultMaxLoops int32 = 1
)
View Source
const (
	//DefaultCompletedIterations is the number of iterations that have completed; ie, 0
	DefaultCompletedIterations = 0
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "iter8.tools", Version: "v2alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var DefaultBlueGreenSplit = []int32{0, 100}

DefaultBlueGreenSplit is the default split to be used for bluegreen experiment

ValidTestingPatternTypes are legal strategy types iter8 is aware of Should match list in github.com/iter8-tools/etc3/api/v2alpha1 (cf. constants.go)

Functions

This section is empty.

Types

type Action

type Action []TaskSpec

Action is a slice of task specifications.

func (Action) DeepCopy

func (in Action) DeepCopy() Action

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Action.

func (Action) DeepCopyInto

func (in Action) DeepCopyInto(out *Action)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ActionMap

type ActionMap map[string]Action

ActionMap type for containing a collection of actions.

func (ActionMap) DeepCopy

func (in ActionMap) DeepCopy() ActionMap

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionMap.

func (ActionMap) DeepCopyInto

func (in ActionMap) DeepCopyInto(out *ActionMap)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AggregatedMetricsAnalysis

type AggregatedMetricsAnalysis struct {
	AnalysisMetaData `json:",inline" yaml:",inline"`

	// Data is a map from metric name to most recent metric data
	Data map[string]AggregatedMetricsData `json:"data" yaml:"data"`
}

AggregatedMetricsAnalysis ..

func (*AggregatedMetricsAnalysis) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AggregatedMetricsAnalysis.

func (*AggregatedMetricsAnalysis) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AggregatedMetricsData

type AggregatedMetricsData struct {
	// Max value observed for this metric across all versions
	// +optional
	Max *resource.Quantity `json:"max,omitempty" yaml:"max,omitempty"`

	// Min value observed for this metric across all versions
	// +optional
	Min *resource.Quantity `json:"min,omitempty" yaml:"min,omitempty"`

	// Data is a map from version name to the most recent aggregated metrics data for that version
	Data map[string]AggregatedMetricsVersionData `json:"data" yaml:"data"`
}

AggregatedMetricsData ..

func (*AggregatedMetricsData) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AggregatedMetricsData.

func (*AggregatedMetricsData) DeepCopyInto

func (in *AggregatedMetricsData) DeepCopyInto(out *AggregatedMetricsData)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AggregatedMetricsVersionData

type AggregatedMetricsVersionData struct {
	// Max value observed for this metric for this version
	// +optional
	Max *resource.Quantity `json:"max,omitempty" yaml:"max,omitempty"`

	// Min value observed for this metric for this version
	// +optional
	Min *resource.Quantity `json:"min,omitempty" yaml:"min,omitempty"`

	// Value of the metric observed for this version
	// +optional
	Value *resource.Quantity `json:"value,omitempty" yaml:"value,omitempty"`

	// SampleSize is the number of requests observed for this version
	// +kubebuilder:validation:Minimum:=0
	SampleSize *int32 `json:"sampleSize,omitempty" yaml:"sampleSize,omitempty"`
}

AggregatedMetricsVersionData ..

func (*AggregatedMetricsVersionData) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AggregatedMetricsVersionData.

func (*AggregatedMetricsVersionData) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Analysis

type Analysis struct {
	// AggregatedMetrics
	AggregatedMetrics *AggregatedMetricsAnalysis `json:"aggregatedMetrics,omitempty" yaml:"aggregatedMetrics,omitempty"`

	// WinnerAssessment
	WinnerAssessment *WinnerAssessmentAnalysis `json:"winnerAssessment,omitempty" yaml:"winnerAssessment,omitempty"`

	// VersionAssessments
	VersionAssessments *VersionAssessmentAnalysis `json:"versionAssessments,omitempty" yaml:"versionAssessments,omitempty"`

	// Weights
	Weights *WeightsAnalysis `json:"weights,omitempty" yaml:"weights,omitempty"`
}

Analysis is data from an analytics provider

func (*Analysis) DeepCopy

func (in *Analysis) DeepCopy() *Analysis

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Analysis.

func (*Analysis) DeepCopyInto

func (in *Analysis) DeepCopyInto(out *Analysis)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AnalysisMetaData

type AnalysisMetaData struct {
	// Provenance is source of data
	Provenance string `json:"provenance" yaml:"provenance"`

	// Timestamp is the timestamp when the controller got its data from an analytics engine
	Timestamp metav1.Time `json:"timestamp" yaml:"timestamp"`

	// Message optional messsage for user
	// +optional
	Message *string `json:"message,omitempty" yaml:"message,omitempty"`
}

AnalysisMetaData ..

func (*AnalysisMetaData) DeepCopy

func (in *AnalysisMetaData) DeepCopy() *AnalysisMetaData

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnalysisMetaData.

func (*AnalysisMetaData) DeepCopyInto

func (in *AnalysisMetaData) DeepCopyInto(out *AnalysisMetaData)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BooleanList

type BooleanList []bool

BooleanList ..

func (BooleanList) DeepCopy

func (in BooleanList) DeepCopy() BooleanList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BooleanList.

func (BooleanList) DeepCopyInto

func (in BooleanList) DeepCopyInto(out *BooleanList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Criteria

type Criteria struct {

	// RequestCount identifies metric to be used to count how many requests a version has seen
	// Typically set by the controller (based on setup configuration) but can be overridden by the user
	// + optional
	RequestCount *string `json:"requestCount,omitempty" yaml:"requestCount,omitempty"`

	// Reward is the metric that should be used to evaluate the reward for a version in the experiment.
	// +optional
	Reward *Reward `json:"reward,omitempty" yaml:"reward,omitempty"`

	// Indicators is a list of metrics to be measured and reported on each iteration of the experiment.
	// +optional
	Indicators []string `json:"indicators,omitempty" yaml:"indicators,omitempty"`

	// Objectives is a list of conditions on metrics that must be tested on each iteration of the experiment.
	// Failure of an objective might reduces the likelihood that a version will be selected as the winning version.
	// Failure of an objective might also trigger an experiment rollback.
	// +optional
	Objectives []Objective `json:"objectives,omitempty" yaml:"objectives,omitempty"`
}

Criteria is list of criteria to be evaluated throughout the experiment

func (*Criteria) DeepCopy

func (in *Criteria) DeepCopy() *Criteria

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Criteria.

func (*Criteria) DeepCopyInto

func (in *Criteria) DeepCopyInto(out *Criteria)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DeploymentPatternType

type DeploymentPatternType string

DeploymentPatternType identifies the deployment patterns that can be used +kubebuilder:validation:Enum=FixedSplit;Progressive;BlueGreen

const (
	// DeploymentPatternFixedSplit indicates the deployment pattern is fixed split
	DeploymentPatternFixedSplit DeploymentPatternType = "FixedSplit"

	// DeploymentPatternProgressive indicates that the deployment pattern progressive
	DeploymentPatternProgressive DeploymentPatternType = "Progressive"

	// DeploymentPatternBlueGreen indicates that the deployment pattern is blue-green
	DeploymentPatternBlueGreen DeploymentPatternType = "BlueGreen"
)

type Duration

type Duration struct {
	// IntervalSeconds is the length of an interval of the experiment in seconds
	// Default is 20 (seconds)
	// +kubebuilder:validation:Minimum:=1
	// +optional
	IntervalSeconds *int32 `json:"intervalSeconds,omitempty" yaml:"intervalSeconds,omitempty"`

	// IterationsPerLoop is the maximum number of iterations
	// Default is 15
	// +kubebuilder:validation:Minimum:=1
	// +optional
	IterationsPerLoop *int32 `json:"iterationsPerLoop,omitempty" yaml:"iterationsPerLoop,omitempty"`

	// MaxLoops is the maximum number of loops
	// Default is 1
	// Reserved for future use
	// +kubebuilder:validation:Minimum:=1
	// +optional
	MaxLoops *int32 `json:"maxLoops,omitempty" yaml:"maxLoops,omitempty"`
}

Duration of an experiment

func (*Duration) DeepCopy

func (in *Duration) DeepCopy() *Duration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Duration.

func (*Duration) DeepCopyInto

func (in *Duration) DeepCopyInto(out *Duration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Experiment

type Experiment struct {
	metav1.TypeMeta   `json:",inline" yaml:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`

	Spec   ExperimentSpec   `json:"spec,omitempty" yaml:"spec,omitempty"`
	Status ExperimentStatus `json:"status,omitempty" yaml:"spec,omitempty"`
}

Experiment is the Schema for the experiments API +k8s:openapi-gen=true +kubebuilder:object:root=true +groupName=iter8.tools +kubebuilder:subresource:status +kubebuilder:printcolumn:name="type",type="string",JSONPath=".spec.strategy.testingPattern" +kubebuilder:printcolumn:name="target",type="string",JSONPath=".spec.target" +kubebuilder:printcolumn:name="stage",type="string",JSONPath=".status.stage" +kubebuilder:printcolumn:name="completed iterations",type="string",JSONPath=".status.completedIterations" +kubebuilder:printcolumn:name="message",type="string",JSONPath=".status.message"

func (*Experiment) DeepCopy

func (in *Experiment) DeepCopy() *Experiment

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Experiment.

func (*Experiment) DeepCopyInto

func (in *Experiment) DeepCopyInto(out *Experiment)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Experiment) DeepCopyObject

func (in *Experiment) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Experiment) InitializeStatus

func (e *Experiment) InitializeStatus()

InitializeStatus initialize status value of an experiment

type ExperimentBuilder

type ExperimentBuilder Experiment

ExperimentBuilder ..

func NewExperiment

func NewExperiment(name, namespace string) *ExperimentBuilder

NewExperiment returns an iter8 experiment

func (*ExperimentBuilder) Build

func (b *ExperimentBuilder) Build() *Experiment

Build the experiment object

func (*ExperimentBuilder) DeepCopy

func (in *ExperimentBuilder) DeepCopy() *ExperimentBuilder

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentBuilder.

func (*ExperimentBuilder) DeepCopyInto

func (in *ExperimentBuilder) DeepCopyInto(out *ExperimentBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExperimentBuilder) WithAction added in v0.1.15

func (b *ExperimentBuilder) WithAction(key string, tasks []TaskSpec) *ExperimentBuilder

WithAction ..

func (*ExperimentBuilder) WithBaselineVersion

func (b *ExperimentBuilder) WithBaselineVersion(name string, objRef *corev1.ObjectReference) *ExperimentBuilder

WithBaselineVersion ..

func (*ExperimentBuilder) WithCandidateVersion

func (b *ExperimentBuilder) WithCandidateVersion(name string, objRef *corev1.ObjectReference) *ExperimentBuilder

WithCandidateVersion .. Expects VersionInfo to be defined already via WithBaselineVersion()

func (*ExperimentBuilder) WithCondition

func (b *ExperimentBuilder) WithCondition(condition ExperimentConditionType, status corev1.ConditionStatus, reason string, messageFormat string, messageA ...interface{}) *ExperimentBuilder

WithCondition ..

func (*ExperimentBuilder) WithCurrentWeight

func (b *ExperimentBuilder) WithCurrentWeight(name string, weight int32) *ExperimentBuilder

WithCurrentWeight ..

func (*ExperimentBuilder) WithDeploymentPattern

func (b *ExperimentBuilder) WithDeploymentPattern(deploymentPattern DeploymentPatternType) *ExperimentBuilder

WithDeploymentPattern ..

func (*ExperimentBuilder) WithDuration

func (b *ExperimentBuilder) WithDuration(interval int32, iterationsPerLoop int32, maxLoops int32) *ExperimentBuilder

WithDuration ..

func (*ExperimentBuilder) WithHandlers

func (b *ExperimentBuilder) WithHandlers(handlers map[string]string) *ExperimentBuilder

WithHandlers ..

func (*ExperimentBuilder) WithIndicator added in v0.1.15

func (b *ExperimentBuilder) WithIndicator(metric Metric) *ExperimentBuilder

WithIndicator ..

func (*ExperimentBuilder) WithObjective added in v0.1.15

func (b *ExperimentBuilder) WithObjective(metric Metric, upper *resource.Quantity, lower *resource.Quantity, rollback bool) *ExperimentBuilder

WithObjective ..

func (*ExperimentBuilder) WithRecommendedWeight

func (b *ExperimentBuilder) WithRecommendedWeight(name string, weight int32) *ExperimentBuilder

WithRecommendedWeight ..

func (*ExperimentBuilder) WithRequestCount

func (b *ExperimentBuilder) WithRequestCount(requestCount string) *ExperimentBuilder

WithRequestCount ..

func (*ExperimentBuilder) WithReward added in v0.1.15

func (b *ExperimentBuilder) WithReward(metric Metric, preferredDirection PreferredDirectionType) *ExperimentBuilder

WithReward ..

func (*ExperimentBuilder) WithTarget

func (b *ExperimentBuilder) WithTarget(target string) *ExperimentBuilder

WithTarget sets spec.Target

func (*ExperimentBuilder) WithTestingPattern

func (b *ExperimentBuilder) WithTestingPattern(testingPattern TestingPatternType) *ExperimentBuilder

WithTestingPattern ..

type ExperimentCondition

type ExperimentCondition struct {
	// Type of the condition
	Type ExperimentConditionType `json:"type" yaml:"type"`

	// Status of the condition
	Status corev1.ConditionStatus `json:"status" yaml:"status"`

	// LastTransitionTime is the time when this condition is last updated
	// +optional
	LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty" yaml:"lastTransitionTime,omitempty"`

	// Reason for the last update
	// +optional
	Reason *string `json:"reason,omitempty" yaml:"reason,omitempty"`

	// Detailed explanation on the update
	// +optional
	Message *string `json:"message,omitempty" yaml:"message,omitempty"`
}

ExperimentCondition describes a condition of an experiment

func (*ExperimentCondition) DeepCopy

func (in *ExperimentCondition) DeepCopy() *ExperimentCondition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentCondition.

func (*ExperimentCondition) DeepCopyInto

func (in *ExperimentCondition) DeepCopyInto(out *ExperimentCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExperimentCondition) IsFalse

func (c *ExperimentCondition) IsFalse() bool

IsFalse tells whether the experiment condition is false or not

func (*ExperimentCondition) IsTrue

func (c *ExperimentCondition) IsTrue() bool

IsTrue tells whether the experiment condition is true or not

func (*ExperimentCondition) IsUnknown

func (c *ExperimentCondition) IsUnknown() bool

IsUnknown tells whether the experiment condition is false or not

type ExperimentConditionType

type ExperimentConditionType string

ExperimentConditionType limits conditions can be set by controller +kubebuilder:validation:Enum:=Completed;Failed;TargetAcquired

const (
	// ExperimentConditionExperimentCompleted has status True when the experiment is completed
	// Unknown initially, set to False during initialization
	ExperimentConditionExperimentCompleted ExperimentConditionType = "Completed"

	// ExperimentConditionExperimentFailed has status True when the experiment has failed
	// False until failure occurs
	ExperimentConditionExperimentFailed ExperimentConditionType = "Failed"

	// ExperimentConditionTargetAcquired has status True when an experiment has a lock on the target
	// False until can lock the target
	ExperimentConditionTargetAcquired ExperimentConditionType = "TargetAcquired"
)

type ExperimentList

type ExperimentList struct {
	metav1.TypeMeta `json:",inline" yaml:",inline"`
	metav1.ListMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	Items           []Experiment `json:"items"`
}

ExperimentList contains a list of Experiment +kubebuilder:object:root=true

func (*ExperimentList) DeepCopy

func (in *ExperimentList) DeepCopy() *ExperimentList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentList.

func (*ExperimentList) DeepCopyInto

func (in *ExperimentList) DeepCopyInto(out *ExperimentList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExperimentList) DeepCopyObject

func (in *ExperimentList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ExperimentSpec

type ExperimentSpec struct {

	// Target is used to enable concurrent experimentation
	// Two experiments cannot be running concurrently for the same target.
	// +kubebuilder:validation:MinLength:=1
	Target string `json:"target" yaml:"target"`

	// VersionInfo is information about versions that is typically provided by the domain start handler
	// +optional
	VersionInfo *VersionInfo `json:"versionInfo,omitempty" yaml:"versionInfo,omitempty"`

	// Strategy identifies the type of experiment and its properties
	Strategy Strategy `json:"strategy" yaml:"strategy"`

	// Criteria contains a list of Criterion for assessing the candidates
	// Note that at most one reward metric is allowed
	// If more than one reward criterion is included, the first will be used while others would be omitted
	// +optional
	Criteria *Criteria `json:"criteria,omitempty" yaml:"criteria,omitempty"`

	// Duration describes how long the experiment will last.
	// +optional
	Duration *Duration `json:"duration,omitempty" yaml:"duration,omitempty"`

	// Metrics is a list of all the metrics used in the experiment
	// It is inserted by the controller from the references in spec.criteria
	// Key is the name as referenced in spec.criteria
	// +optional
	Metrics []MetricInfo `json:"metrics,omitempty" yaml:"metrics,omitempty"`
}

ExperimentSpec defines the desired state of Experiment

func (*ExperimentSpec) DeepCopy

func (in *ExperimentSpec) DeepCopy() *ExperimentSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentSpec.

func (*ExperimentSpec) DeepCopyInto

func (in *ExperimentSpec) DeepCopyInto(out *ExperimentSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExperimentSpec) GetDeploymentPattern

func (s *ExperimentSpec) GetDeploymentPattern() DeploymentPatternType

GetDeploymentPattern returns spec.strategy.deploymentPattern if set

func (*ExperimentSpec) GetFailureHandler

func (s *ExperimentSpec) GetFailureHandler(cfg configuration.Iter8Config) *string

GetFailureHandler returns the handler to be called if there is a failure during experiment execution

func (*ExperimentSpec) GetFinishHandler

func (s *ExperimentSpec) GetFinishHandler(cfg configuration.Iter8Config) *string

GetFinishHandler returns the handler that should be called when an experiment ha completed.

func (*ExperimentSpec) GetIntervalAsDuration

func (s *ExperimentSpec) GetIntervalAsDuration() time.Duration

GetIntervalAsDuration returns spec.duration.intervalSeconds as a time.Duration (in ns)

func (*ExperimentSpec) GetIntervalSeconds

func (s *ExperimentSpec) GetIntervalSeconds() int32

GetIntervalSeconds returns specified(or default) interval for each duration

func (*ExperimentSpec) GetIterationsPerLoop

func (s *ExperimentSpec) GetIterationsPerLoop() int32

GetIterationsPerLoop returns the specified (or default) iterations

func (*ExperimentSpec) GetLoopHandler added in v0.1.15

func (s *ExperimentSpec) GetLoopHandler(cfg configuration.Iter8Config) *string

GetLoopHandler returns the handler to be called at the end of each loop (except the last)

func (*ExperimentSpec) GetMaxCandidateWeight

func (s *ExperimentSpec) GetMaxCandidateWeight() int32

GetMaxCandidateWeight return spec.strategy.weights.maxCandidateWeight if set Otherwise it returns DefaultMaxCandidateWeight (100)

func (*ExperimentSpec) GetMaxCandidateWeightIncrement

func (s *ExperimentSpec) GetMaxCandidateWeightIncrement() int32

GetMaxCandidateWeightIncrement return spec.strategy.weights.maxCandidateWeightIncrement if set Otherwise it returns DefaultMaxCandidateWeightIncrement (10)

func (*ExperimentSpec) GetMaxLoops

func (s *ExperimentSpec) GetMaxLoops() int32

GetMaxLoops returns specified (or default) max mumber of loops

func (*ExperimentSpec) GetNumberOfBaseline

func (s *ExperimentSpec) GetNumberOfBaseline() int

GetNumberOfBaseline returns the number of baselines in VersionInfo (1 if present, 0 otherwise)

func (*ExperimentSpec) GetNumberOfCandidates

func (s *ExperimentSpec) GetNumberOfCandidates() int

GetNumberOfCandidates returns the number of candidates in VersionInfo

func (*ExperimentSpec) GetRequestCount

func (s *ExperimentSpec) GetRequestCount(cfg configuration.Iter8Config) *string

GetRequestCount returns the requst count metric If there are no criteria specified, this is nil

func (*ExperimentSpec) GetReward

func (s *ExperimentSpec) GetReward() *Reward

GetReward returns the reward metric, if any If there are no criteria specified, this is nil

func (*ExperimentSpec) GetRollbackHandler

func (s *ExperimentSpec) GetRollbackHandler(cfg configuration.Iter8Config) *string

GetRollbackHandler returns the handler to be called if a candidate fails its objective(s)

func (*ExperimentSpec) GetStartHandler

func (s *ExperimentSpec) GetStartHandler(cfg configuration.Iter8Config) *string

GetStartHandler returns the name of the handler to be called when an experiment starts

func (*ExperimentSpec) HasBaseline

func (s *ExperimentSpec) HasBaseline() bool

HasBaseline determines if a baseline has been identified in a s.VersionInfo

func (*ExperimentSpec) InitializeCriteria

func (s *ExperimentSpec) InitializeCriteria(cfg configuration.Iter8Config)

InitializeCriteria initializes any criteria details not already set

func (*ExperimentSpec) InitializeDeploymentPattern

func (s *ExperimentSpec) InitializeDeploymentPattern()

InitializeDeploymentPattern initializes spec.strategy.deploymentPattern if not already set

func (*ExperimentSpec) InitializeDuration

func (s *ExperimentSpec) InitializeDuration()

InitializeDuration initializes spec.durations if not already set

func (*ExperimentSpec) InitializeFailureHandler

func (s *ExperimentSpec) InitializeFailureHandler(cfg configuration.Iter8Config)

InitializeFailureHandler initializes the finish handler (if not already set) to the default handler

func (*ExperimentSpec) InitializeFinishHandler

func (s *ExperimentSpec) InitializeFinishHandler(cfg configuration.Iter8Config)

InitializeFinishHandler iinitializes the finish handler (if not already set) to the default rollback handler defined by the iter8 config.

func (*ExperimentSpec) InitializeHandlers

func (s *ExperimentSpec) InitializeHandlers(cfg configuration.Iter8Config)

InitializeHandlers initialize handlers if not already set

func (*ExperimentSpec) InitializeInterval

func (s *ExperimentSpec) InitializeInterval()

InitializeInterval sets duration.interval if not already set using the default value

func (*ExperimentSpec) InitializeIterationsPerLoop

func (s *ExperimentSpec) InitializeIterationsPerLoop()

InitializeIterationsPerLoop sets duration.iterationsPerLoop to the default if not already set

func (*ExperimentSpec) InitializeLoopHandler added in v0.1.15

func (s *ExperimentSpec) InitializeLoopHandler(cfg configuration.Iter8Config)

InitializeLoopHandler initializes the loop handler (if not already set) to the default handler

func (*ExperimentSpec) InitializeMaxCandidateWeight

func (s *ExperimentSpec) InitializeMaxCandidateWeight()

InitializeMaxCandidateWeight initializes spec.strategy.weights.maxCandiateWeight if not already set

func (*ExperimentSpec) InitializeMaxCandidateWeightIncrement

func (s *ExperimentSpec) InitializeMaxCandidateWeightIncrement()

InitializeMaxCandidateWeightIncrement initializes spec.strategy.weights.maxCandidateWeightIncrement if not already set

func (*ExperimentSpec) InitializeMaxLoops added in v0.1.15

func (s *ExperimentSpec) InitializeMaxLoops()

InitializeMaxLoops sets duration.iterationsPerLoop to the default if not already set

func (*ExperimentSpec) InitializeObjectives

func (s *ExperimentSpec) InitializeObjectives()

InitializeObjectives initializes the rollbackOnFailure field of all objectives if the strategy type is "bluegreen"

func (*ExperimentSpec) InitializeRequestCount

func (s *ExperimentSpec) InitializeRequestCount(cfg configuration.Iter8Config)

InitializeRequestCount sets the request count metric to the default value if not already set

func (*ExperimentSpec) InitializeRollbackHandler

func (s *ExperimentSpec) InitializeRollbackHandler(cfg configuration.Iter8Config)

InitializeRollbackHandler initializes the rollback handler (if not already set) to the default rollback handler defined by the iter8 config.

func (*ExperimentSpec) InitializeSpec

func (s *ExperimentSpec) InitializeSpec(cfg configuration.Iter8Config)

InitializeSpec initializes values in Spec to default values if not already set

func (*ExperimentSpec) InitializeStartHandler

func (s *ExperimentSpec) InitializeStartHandler(cfg configuration.Iter8Config)

InitializeStartHandler iinitializes the start handler (if not already set) to the default rollback handler defined by the iter8 config.

func (*ExperimentSpec) InitializeWeights

func (s *ExperimentSpec) InitializeWeights()

InitializeWeights initializes weights if not already set

type ExperimentStageType

type ExperimentStageType string

ExperimentStageType identifies valid stages of an experiment +kubebuilder:validation:Enum:=Waiting;Initializing;Running;Finishing;Completed

const (
	// ExperimentStageWaiting indicates the experiment is not yet scheduled to run because it
	// does not yet have exclusive experiment access to the target
	ExperimentStageWaiting ExperimentStageType = "Waiting"

	// ExperimentStageInitializing indicates an experiment has acquired access to the target
	// and a start handler, if  any, is running
	ExperimentStageInitializing ExperimentStageType = "Initializing"

	// ExperimentStageRunning indicates an experiment is running
	ExperimentStageRunning ExperimentStageType = "Running"

	// ExperimentStageFinishing indicates an experiment has completed its iterations and is
	// running any termination handler (either success or  failure)
	ExperimentStageFinishing ExperimentStageType = "Finishing"

	// ExperimentStageCompleted indicates an experiment has completed
	ExperimentStageCompleted ExperimentStageType = "Completed"
)

func (ExperimentStageType) After

func (stage ExperimentStageType) After(otherStage ExperimentStageType) bool

After Determines if a stage is after another

type ExperimentStatus

type ExperimentStatus struct {
	// List of conditions
	// +optional
	Conditions []*ExperimentCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"`

	// InitTime is the times when the experiment is initialized (experiment CR is new)
	// +optional
	// matches example
	InitTime *metav1.Time `json:"initTime,omitempty" yaml:"initTime,omitempty"`

	// StartTime is the time when the experiment starts (after the start handler finished)
	// +optional
	// matches
	StartTime *metav1.Time `json:"startTime,omitempty" yaml:"startTime,omitempty"`

	// EndTime is the time when experiment completes (after the finish handler completed)
	// +optional
	EndTime *metav1.Time `json:"endTime,omitempty" yaml:"endTime,omitempty"`

	// LastUpdateTime is the last time iteration has been updated
	// +optional
	LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty" yaml:"lastUpdateTime,omitempty"`

	// Stage indicates where the experiment is in its process of execution
	// +optional
	Stage *ExperimentStageType `json:"stage,omitempty" yaml:"stage,omitempty"`

	// CurrentIteration is the current iteration number.
	// It is undefined until the experiment starts.
	// +optional
	CompletedIterations *int32 `json:"completedIterations,omitempty" yaml:"completedIterations,omitempty"`

	// CurrentWeightDistribution is currently applied traffic weights
	// +optional
	CurrentWeightDistribution []WeightData `json:"currentWeightDistribution,omitempty" yaml:"currentWeightDistribution,omitempty"`

	// Analysis returned by the last analyis
	// +optional
	Analysis *Analysis `json:"analysis,omitempty" yaml:"analysis,omitempty"`

	// RecommendedBaseline is the version recommended as the baseline after the experiment completes.
	// Will be set to the winner (status.analysis[].data.winner)
	// or to the current baseline in the case of a rollback.
	// +optional
	RecommendedBaseline *string `json:"recommendedBaseline,omitempty" yaml:"recommendedBaseline,omitempty"`

	// Message specifies message to show in the kubectl printer
	// +optional
	Message *string `json:"message,omitempty" yaml:"message,omitempty"`
}

ExperimentStatus defines the observed state of Experiment

func (*ExperimentStatus) DeepCopy

func (in *ExperimentStatus) DeepCopy() *ExperimentStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentStatus.

func (*ExperimentStatus) DeepCopyInto

func (in *ExperimentStatus) DeepCopyInto(out *ExperimentStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExperimentStatus) GetCompletedIterations

func (s *ExperimentStatus) GetCompletedIterations() int32

GetCompletedIterations ..

func (*ExperimentStatus) GetCondition

func (s *ExperimentStatus) GetCondition(condition ExperimentConditionType) *ExperimentCondition

GetCondition returns condition of given conditionType

func (*ExperimentStatus) IncrementCompletedIterations

func (s *ExperimentStatus) IncrementCompletedIterations() int32

IncrementCompletedIterations ..

func (*ExperimentStatus) MarkCondition

func (s *ExperimentStatus) MarkCondition(condition ExperimentConditionType, status corev1.ConditionStatus, reason string, messageFormat string, messageA ...interface{}) bool

MarkCondition sets a condition with a status, reason and message. The reason and method are also combined to set status.Message Note that we compare all fields to determine if we are actually changing anything. We do this because we want to also expose the message externally (via Kubernetes events and notifications) but want to do so only once -- the first time it is set.

func (*ExperimentStatus) SetRecommendedBaseline

func (s *ExperimentStatus) SetRecommendedBaseline(currentBaseline string)

SetRecommendedBaseline sets a recommended baseline to either: the recommended winner or the current baseline

type Handlers

type Handlers struct {
	// Start handler implmenents any domain specific set up for an experiment.
	// It should ensure that any needed resources are available and in an appropriate state.
	// It must update the spec.versionInfo field of the experiment resource.
	// +optional
	Start *string `json:"start,omitempty" yaml:"start,omitempty"`

	// Finish handler implements any domain specific actions that should take place at the end of an experiment.
	// For now, this includes any promotion logic that is needed for a winning version.
	// In the future, this function might be migrated into the controller itself.
	// +optional
	Finish *string `json:"finish,omitempty" yaml:"finish,omitempty"`

	// Rollback handler should implement any domain specific actions that should take place when an objective is violated.
	// This behavior is specific to the version with the failing objective
	// +optional
	Rollback *string `json:"rollback,omitempty" yaml:"rollback,omitempty"`

	// Failure handler should implement any domain specific actions that should take place when an experiment fails.
	// +optional
	Failure *string `json:"failure,omitempty" yaml:"failure,omitempty"`

	// Loop handler should implement any domain specific actions that should take place when an experiment reaches  a loop boundary.
	// +optional
	Loop *string `json:"loop,omitempty" yaml:"loop,omitempty"`
}

Handlers define domain specific behavior and are called at well defined points in the lifecycle of an experiment. Specifically at the start (start handler), at the end (finish handler). A special handler can be specified to handle error cases.

func (*Handlers) DeepCopy

func (in *Handlers) DeepCopy() *Handlers

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Handlers.

func (*Handlers) DeepCopyInto

func (in *Handlers) DeepCopyInto(out *Handlers)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Metric

type Metric struct {
	metav1.TypeMeta   `json:",inline" yaml:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`

	Spec MetricSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
}

Metric is the Schema for the metrics API +k8s:openapi-gen=true +kubebuilder:printcolumn:name="type",type="string",JSONPath=".spec.type" +kubebuilder:printcolumn:name="description",type="string",JSONPath=".spec.description"

func (*Metric) DeepCopy

func (in *Metric) DeepCopy() *Metric

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metric.

func (*Metric) DeepCopyInto

func (in *Metric) DeepCopyInto(out *Metric)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Metric) DeepCopyObject

func (in *Metric) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type MetricBuilder

type MetricBuilder Metric

MetricBuilder type for building new config by hand

func NewMetric

func NewMetric(name, namespace string) *MetricBuilder

NewMetric returns a new metric builder

func (*MetricBuilder) Build

func (b *MetricBuilder) Build() *Metric

Build ..

func (*MetricBuilder) DeepCopy

func (in *MetricBuilder) DeepCopy() *MetricBuilder

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricBuilder.

func (*MetricBuilder) DeepCopyInto

func (in *MetricBuilder) DeepCopyInto(out *MetricBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MetricBuilder) WithDescription

func (b *MetricBuilder) WithDescription(description string) *MetricBuilder

WithDescription ..

func (*MetricBuilder) WithParams

func (b *MetricBuilder) WithParams(params map[string]string) *MetricBuilder

WithParams ..

func (*MetricBuilder) WithProvider

func (b *MetricBuilder) WithProvider(provider string) *MetricBuilder

WithProvider ..

func (*MetricBuilder) WithSampleSize

func (b *MetricBuilder) WithSampleSize(name string) *MetricBuilder

WithSampleSize ..

func (*MetricBuilder) WithType

func (b *MetricBuilder) WithType(t MetricType) *MetricBuilder

WithType ..

func (*MetricBuilder) WithUnits

func (b *MetricBuilder) WithUnits(units string) *MetricBuilder

WithUnits ..

type MetricInfo

type MetricInfo struct {
	// Name is identifier for metric.  Can be of the form "name" or "namespace/name"
	Name string `json:"name" yaml:"name"`

	// MetricObj is the referenced metric
	// +kubebuilder:validation:EmbeddedResource
	MetricObj Metric `json:"metricObj" yaml:"metricObj"`
}

MetricInfo is name/value pair; entry for list of metrics

func (*MetricInfo) DeepCopy

func (in *MetricInfo) DeepCopy() *MetricInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricInfo.

func (*MetricInfo) DeepCopyInto

func (in *MetricInfo) DeepCopyInto(out *MetricInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MetricList

type MetricList struct {
	metav1.TypeMeta `json:",inline" yaml:",inline"`
	metav1.ListMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	Items           []Metric `json:"items" yaml:"items"`
}

MetricList contains a list of Metric

func (*MetricList) DeepCopy

func (in *MetricList) DeepCopy() *MetricList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricList.

func (*MetricList) DeepCopyInto

func (in *MetricList) DeepCopyInto(out *MetricList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MetricList) DeepCopyObject

func (in *MetricList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type MetricReference

type MetricReference struct {
	// Namespace is the namespace where the metric is defined
	// If not provided, it is assumed to be in the same namespace as the referrer.
	// +optional
	Namespace *string `json:"namespace,omitempty" yaml:"namespace,omitempty"`

	// Name is the name of the metric
	// +kubebuilder:validation:MinLength:=1
	Name string `json:"name" yaml:"name"`
}

MetricReference is a reference to another metric

func (*MetricReference) DeepCopy

func (in *MetricReference) DeepCopy() *MetricReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricReference.

func (*MetricReference) DeepCopyInto

func (in *MetricReference) DeepCopyInto(out *MetricReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MetricSpec

type MetricSpec struct {

	// Params are key/value pairs used to construct a REST query to the metrics backend
	// +optional
	Params *[]Param `json:"params,omitempty" yaml:"params,omitempty"`

	// Text description of the metric
	// +optional
	Description *string `json:"description,omitempty" yaml:"description,omitempty"`

	// Units used for display only
	// +optional
	Units *string `json:"units,omitempty" yaml:"units,omitempty"`

	// Type of the metric
	// +kubebuilder:default:="gauge"
	// +optional
	Type MetricType `json:"type" yaml:"type"`

	// SampleSize is a reference to a counter metric resource.
	// It needs to indicte the number of data points over which this metric is computed.
	// +optional
	SampleSize *MetricReference `json:"sampleSize,omitempty" yaml:"sampleSize,omitempty"`

	// Provider identifies the metric backend including its authentication properties and its unmarshaller
	// +kubebuilder:validation:MinLength:=1
	Provider string `json:"provider" yaml:"provider"`
}

MetricSpec defines the desired state of Metric

func (*MetricSpec) DeepCopy

func (in *MetricSpec) DeepCopy() *MetricSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricSpec.

func (*MetricSpec) DeepCopyInto

func (in *MetricSpec) DeepCopyInto(out *MetricSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MetricStatus

type MetricStatus struct {
}

MetricStatus defines the observed state of Metric

func (*MetricStatus) DeepCopy

func (in *MetricStatus) DeepCopy() *MetricStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricStatus.

func (*MetricStatus) DeepCopyInto

func (in *MetricStatus) DeepCopyInto(out *MetricStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MetricType

type MetricType string

MetricType identifies the type of the metric +kubebuilder:validation:Enum=counter;gauge

const (
	// CounterMetricType corresponds to Prometheus counter metric type
	CounterMetricType MetricType = "counter"

	// GaugeMetricType is an enhancement of Prometheus gauge metric type
	GaugeMetricType MetricType = "gauge"
)

type Objective

type Objective struct {
	// Metric is the name of the metric resource that defines the metric to be measured.
	// If the value contains a "/", the prefix will be considered to be a namespace name.
	// If the value does not contain a "/", the metric should be defined either in the same namespace
	// or in the default domain namespace (defined as a property of iter8 when installed).
	// The experiment namespace takes precedence.
	Metric string `json:"metric" yaml:"metric"`

	// UpperLimit is the maximum acceptable value of the metric.
	// +optional
	UpperLimit *resource.Quantity `json:"upperLimit,omitempty" yaml:"upperLimit,omitempty"`

	// UpperLimit is the minimum acceptable value of the metric.
	// +optional
	LowerLimit *resource.Quantity `json:"lowerLimit,omitempty" yaml:"lowerLimit,omitempty"`

	// RollbackOnFailure indicates that if the criterion is not met, the experiment should be ended
	// default is false
	// +optional
	RollbackOnFailure *bool `json:"rollback_on_failure,omitempty" yaml:"rollback_on_failure,omitempty"`
}

Objective is a service level objective

func (*Objective) DeepCopy

func (in *Objective) DeepCopy() *Objective

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Objective.

func (*Objective) DeepCopyInto

func (in *Objective) DeepCopyInto(out *Objective)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Objective) GetRollbackOnFailure

func (o *Objective) GetRollbackOnFailure(deploymentPattern DeploymentPatternType) bool

GetRollbackOnFailure identifies if the experiment should be rolledback on failure of an objective

type Param

type Param struct {
	// Name of parameter
	Name string `json:"name" yaml:"name"`

	// Value of parameter
	Value string `json:"value" yaml:"value"`
}

Param name/value to be used in constructing a REST query to backend metrics server

func (*Param) DeepCopy

func (in *Param) DeepCopy() *Param

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Param.

func (*Param) DeepCopyInto

func (in *Param) DeepCopyInto(out *Param)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PreferredDirectionType

type PreferredDirectionType string

PreferredDirectionType defines the valid values for reward.PreferredDirection +kubebuilder:validation:Enum=High;Low

const (
	// PreferredDirectionHigher indicates that a higher value is "better"
	PreferredDirectionHigher PreferredDirectionType = "High"

	// PreferredDirectionLower indicates that a lower value is "better"
	PreferredDirectionLower PreferredDirectionType = "Low"
)

type Reward

type Reward struct {
	// Metric ..
	Metric string `json:"metric" yaml:"metric"`

	// PreferredDirection identifies whether higher or lower values of the reward metric are preferred
	// valid values are "higher" and "lower"
	PreferredDirection PreferredDirectionType `json:"preferredDirection" yaml:"preferredDirection"`
}

Reward ..

func (*Reward) DeepCopy

func (in *Reward) DeepCopy() *Reward

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Reward.

func (*Reward) DeepCopyInto

func (in *Reward) DeepCopyInto(out *Reward)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Strategy

type Strategy struct {
	// TestingPattern is the testing pattern of an experiment
	TestingPattern TestingPatternType `json:"testingPattern" yaml:"testingPattern"`

	// DeploymentPattern is the deployment pattern of an experiment.
	// It takes effect when the testing pattern is one of Canary, A/B or A/B/n.
	// It defaults to Progressive.
	// +optional
	DeploymentPattern *DeploymentPatternType `json:"deploymentPattern,omitempty" yaml:"deploymentPattern,omitempty"`

	// Handlers define domain specific behavior and are called at well defined points in the lifecycle of an experiment.
	// Specifically at the start (start handler), at the end (finish handler).
	// A special handler can be specified to handle error cases.
	// +optional
	Handlers *Handlers `json:"handlers,omitempty" yaml:"handlers,omitempty"`

	// Actions define the collections of tasks that are executed by handlers.
	// Specifically, start and finish actions are invoked by start and finish handlers respectively.
	// +optional
	Actions ActionMap `json:"actions,omitempty" yaml:"actions,omitempty"`

	// Weights modify the behavior of the traffic split algorithm.
	// Defaults depend on the experiment type.
	// +optional
	Weights *Weights `json:"weights,omitempty" yaml:"weights,omitempty"`
}

Strategy identifies the type of experiment and its properties The behavior of the experiment can be modified by setting advanced properties.

func (*Strategy) DeepCopy

func (in *Strategy) DeepCopy() *Strategy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Strategy.

func (*Strategy) DeepCopyInto

func (in *Strategy) DeepCopyInto(out *Strategy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TaskSpec

type TaskSpec struct {
	// Library where this task is defined.
	// Examples include 'common', 'knative', etc.
	Library string `json:"library" yaml:"library"`
	// Task unique identifies the task to be executed with the library.
	// Examples include 'init-experiment', 'exec', etc.
	Task string `json:"task" yaml:"task"`
	// With holds inputs to this task.
	// Different task require different types of inputs. Hence, this data is held as json.RawMessage to be decoded by individual task libraries.
	// +optional
	With map[string]apiextensionsv1.JSON `json:"with,omitempty" yaml:"with,omitempty"`
}

TaskSpec contains the specification of a task.

func (*TaskSpec) DeepCopy

func (in *TaskSpec) DeepCopy() *TaskSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskSpec.

func (*TaskSpec) DeepCopyInto

func (in *TaskSpec) DeepCopyInto(out *TaskSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TestingPatternType

type TestingPatternType string

TestingPatternType identifies the type of experiment type +kubebuilder:validation:Enum=Canary;A/B;A/B/N;Conformance

const (
	// TestingPatternCanary indicates an experiment is a canary experiment
	TestingPatternCanary TestingPatternType = "Canary"

	// TestingPatternAB indicates an experiment is a A/B experiment
	TestingPatternAB TestingPatternType = "A/B"

	// TestingPatternABN indicates an experiment is a A/B/n experiment
	TestingPatternABN TestingPatternType = "A/B/N"

	// TestingPatternConformance indicates an experiment is a conformance experiment
	TestingPatternConformance TestingPatternType = "Conformance"
)

type Variable

type Variable struct {
	// Name is the name of the variable
	Name string `json:"name" yaml:"name"`

	// Value is the value of the variable
	Value string `json:"value" yaml:"value"`
}

Variable a name/value pair that can be used by handlers and in metrics queries

func (*Variable) DeepCopy

func (in *Variable) DeepCopy() *Variable

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Variable.

func (*Variable) DeepCopyInto

func (in *Variable) DeepCopyInto(out *Variable)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VersionAssessmentAnalysis

type VersionAssessmentAnalysis struct {
	AnalysisMetaData `json:",inline" yaml:",inline"`

	// Data is a map from version name to an array of indicators as to whether or not the objectives are satisfied
	// The order of the array entries is the same as the order of objectives in spec.criteria.objectives
	// There must be an entry for each objective
	Data map[string]BooleanList `json:"data" yaml:"data"`
}

VersionAssessmentAnalysis ..

func (*VersionAssessmentAnalysis) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionAssessmentAnalysis.

func (*VersionAssessmentAnalysis) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VersionDetail

type VersionDetail struct {

	// Name is a name for the version
	Name string `json:"name" yaml:"name"`

	// Variables is a list of variables that can be used by handlers and in metrics queries
	// +optional
	Variables []Variable `json:"variables,omitempty" yaml:"variables,omitempty"`

	// WeightObjRef is a reference to another kubernetes object
	// +optional
	WeightObjRef *corev1.ObjectReference `json:"weightObjRef,omitempty" yaml:"weightObjRef,omitempty"`
}

VersionDetail is detail about a single version

func (*VersionDetail) DeepCopy

func (in *VersionDetail) DeepCopy() *VersionDetail

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionDetail.

func (*VersionDetail) DeepCopyInto

func (in *VersionDetail) DeepCopyInto(out *VersionDetail)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VersionInfo

type VersionInfo struct {
	// Baseline is baseline version
	Baseline VersionDetail `json:"baseline" yaml:"baseline"`

	// Candidates is list candidate versions
	// +optional
	Candidates []VersionDetail `json:"candidates,omitempty" yaml:"candidates,omitempty"`
}

VersionInfo is information about versions that is typically provided by the domain start handler.

func (*VersionInfo) DeepCopy

func (in *VersionInfo) DeepCopy() *VersionInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionInfo.

func (*VersionInfo) DeepCopyInto

func (in *VersionInfo) DeepCopyInto(out *VersionInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WeightData

type WeightData struct {
	// Name the name of a version
	Name string `json:"name" yaml:"name"`

	// Value is the weight assigned to name
	Value int32 `json:"value" yaml:"value"`
}

WeightData is the weight for a version

func (*WeightData) DeepCopy

func (in *WeightData) DeepCopy() *WeightData

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WeightData.

func (*WeightData) DeepCopyInto

func (in *WeightData) DeepCopyInto(out *WeightData)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Weights

type Weights struct {
	// MaxCandidateWeight is the maximum percent of traffic that should be sent to the
	// candidate versions during an experiment
	// +kubebuilder:validation:Minimum:=0
	// +kubebuilder:validation:Maximum:=100
	// +optional
	MaxCandidateWeight *int32 `json:"maxCandidateWeight,omitempty" yaml:"maxCandidateWeight,omitempty"`

	// MaxCandidateWeightIncrement the maximum permissible increase in traffic to a candidate in one iteration
	// +kubebuilder:validation:Minimum:=0
	// +kubebuilder:validation:Maximum:=100
	// +optional
	MaxCandidateWeightIncrement *int32 `json:"maxCandidateWeightIncrement,omitempty" yaml:"maxCandidateWeightIncrement,omitempty"`
}

Weights modify the behavior of the traffic split algorithm.

func (*Weights) DeepCopy

func (in *Weights) DeepCopy() *Weights

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Weights.

func (*Weights) DeepCopyInto

func (in *Weights) DeepCopyInto(out *Weights)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WeightsAnalysis

type WeightsAnalysis struct {
	AnalysisMetaData `json:",inline" yaml:",inline"`

	// Data
	Data []WeightData `json:"data" yaml:"data"`
}

WeightsAnalysis ..

func (*WeightsAnalysis) DeepCopy

func (in *WeightsAnalysis) DeepCopy() *WeightsAnalysis

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WeightsAnalysis.

func (*WeightsAnalysis) DeepCopyInto

func (in *WeightsAnalysis) DeepCopyInto(out *WeightsAnalysis)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WinnerAssessmentAnalysis

type WinnerAssessmentAnalysis struct {
	AnalysisMetaData `json:",inline" yaml:",inline"`

	// Data
	Data WinnerAssessmentData `json:"data" yaml:"data"`
}

WinnerAssessmentAnalysis ..

func (*WinnerAssessmentAnalysis) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WinnerAssessmentAnalysis.

func (*WinnerAssessmentAnalysis) DeepCopyInto

func (in *WinnerAssessmentAnalysis) DeepCopyInto(out *WinnerAssessmentAnalysis)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WinnerAssessmentData

type WinnerAssessmentData struct {
	// WinnerFound whether or not a winning version has been identified
	WinnerFound bool `json:"winnerFound" yaml:"winnerFound"`

	// Winner if found
	// +optional
	Winner *string `json:"winner,omitempty" yaml:"winner,omitempty"`
}

WinnerAssessmentData ..

func (*WinnerAssessmentData) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WinnerAssessmentData.

func (*WinnerAssessmentData) DeepCopyInto

func (in *WinnerAssessmentData) DeepCopyInto(out *WinnerAssessmentData)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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