Documentation
¶
Overview ¶
Package v1alpha2 contains API Schema definitions for the iter8 v1alpha2 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/iter8-tools/iter8-controller/pkg/apis/iter8 +k8s:defaulter-gen=TypeMeta +groupName=iter8.tools
Package v1alpha2 contains API Schema definitions for the iter8 v1alpha2 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/iter8-tools/iter8-controller/pkg/apis/iter8 +k8s:defaulter-gen=TypeMeta +groupName=iter8.tools
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type ActionType
- type Assessment
- type Conditions
- type CounterMetric
- type Criterion
- type Duration
- type Experiment
- type ExperimentCondition
- type ExperimentConditionType
- type ExperimentList
- type ExperimentSpec
- func (in *ExperimentSpec) DeepCopy() *ExperimentSpec
- func (in *ExperimentSpec) DeepCopyInto(out *ExperimentSpec)
- func (s *ExperimentSpec) GetAction() ActionType
- func (s *ExperimentSpec) GetAnalyticsEndpoint() string
- func (s *ExperimentSpec) GetCleanup() bool
- func (s *ExperimentSpec) GetInterval() (time.Duration, error)
- func (s *ExperimentSpec) GetMaxIncrements() int32
- func (s *ExperimentSpec) GetMaxIterations() int32
- func (s *ExperimentSpec) GetOnTermination() OnTerminationType
- func (s *ExperimentSpec) GetPercentage() int32
- func (s *ExperimentSpec) GetStrategy() string
- func (s *ExperimentSpec) Pause() bool
- func (s *ExperimentSpec) Resume() bool
- func (s *ExperimentSpec) Terminate() bool
- func (s *ExperimentSpec) TerminateExperiment()
- func (s *ExperimentSpec) Validate() error
- type ExperimentStatus
- func (in *ExperimentStatus) DeepCopy() *ExperimentStatus
- func (in *ExperimentStatus) DeepCopyInto(out *ExperimentStatus)
- func (s *ExperimentStatus) ExperimentCompleted() bool
- func (s *ExperimentStatus) GetCondition(condition ExperimentConditionType) *ExperimentCondition
- func (s *ExperimentStatus) IsWinnerAssessmentAvailable() bool
- func (s *ExperimentStatus) IsWinnerFound() bool
- func (s *ExperimentStatus) MarkAnalyticsServiceError(messageFormat string, messageA ...interface{}) (bool, string)
- func (s *ExperimentStatus) MarkAnalyticsServiceRunning(messageFormat string, messageA ...interface{}) (bool, string)
- func (s *ExperimentStatus) MarkAssessmentUpdate(messageFormat string, messageA ...interface{}) (bool, string)
- func (s *ExperimentStatus) MarkExperimentCompleted(messageFormat string, messageA ...interface{}) (bool, string)
- func (s *ExperimentStatus) MarkExperimentPause(messageFormat string, messageA ...interface{}) (bool, string)
- func (s *ExperimentStatus) MarkExperimentResume(messageFormat string, messageA ...interface{}) (bool, string)
- func (s *ExperimentStatus) MarkIterationUpdate(messageFormat string, messageA ...interface{}) (bool, string)
- func (s *ExperimentStatus) MarkMetricsSynced(messageFormat string, messageA ...interface{}) (bool, string)
- func (s *ExperimentStatus) MarkMetricsSyncedError(messageFormat string, messageA ...interface{}) (bool, string)
- func (s *ExperimentStatus) MarkRoutingRulesError(messageFormat string, messageA ...interface{}) (bool, string)
- func (s *ExperimentStatus) MarkRoutingRulesReady(messageFormat string, messageA ...interface{}) (bool, string)
- func (s *ExperimentStatus) MarkTargetsError(messageFormat string, messageA ...interface{}) (bool, string)
- func (s *ExperimentStatus) MarkTargetsFound(messageFormat string, messageA ...interface{}) (bool, string)
- func (s *ExperimentStatus) MarkTrafficUpdate(messageFormat string, messageA ...interface{}) (bool, string)
- func (s *ExperimentStatus) MetricsSynced() bool
- func (s *ExperimentStatus) RoutingRulesReady() bool
- func (s *ExperimentStatus) TargetsFound() bool
- func (s *ExperimentStatus) TrafficToString() string
- func (s *ExperimentStatus) WinnerToString() string
- type HTTPMatchRequest
- type Host
- type ManualOverride
- type Match
- type Metrics
- type Networking
- type OnTerminationType
- type PhaseType
- type RatioMetric
- type Service
- type StrategyType
- type StringMatch
- type Threshold
- type TrafficControl
- type VersionAssessment
- type WinnerAssessment
Constants ¶
const ( ReasonTargetsFound = "TargetsFound" ReasonTargetsError = "TargetsError" ReasonAnalyticsServiceError = "AnalyticsServiceError" ReasonAnalyticsServiceRunning = "AnalyticsServiceRunning" ReasonIterationUpdate = "IterationUpdate" ReasonAssessmentUpdate = "AssessmentUpdate" ReasonTrafficUpdate = "TrafficUpdate" ReasonExperimentCompleted = "ExperimentCompleted" ReasonSyncMetricsError = "SyncMetricsError" ReasonSyncMetricsSucceeded = "SyncMetricsSucceeded" ReasonRoutingRulesError = "RoutingRulesError" ReasonRoutingRulesReady = "RoutingRulesReady" ReasonActionPause = "ActionPause" ReasonActionResume = "ActionResume" )
A set of reason setting the experiment condition status
const ( // DefaultRewardMetric indicate whether a metric is a reward by default, which is false DefaultRewardMetric bool = false // DefaultZeroToOne indicate whether the value range of metric is from 0 to 1 by default, which is false DefaultZeroToOne bool = false // DefaultCleanup indicate whether router and targets receiving no traffic should be deleted after expreriment DefaultCleanup bool = false // DefaultStrategy is the default value for strategy, which is progressive DefaultStrategy StrategyType = StrategyProgressive // DefaultOnTermination is the default value for onTermination, which is to_winner DefaultOnTermination OnTerminationType = OnTerminationToWinner // DefaultPercentage is the default traffic percentage used in experiment, which is 100 DefaultPercentage int32 = 100 // DefaultMaxIncrement is the default maxIncrement for traffic update, which is 2 DefaultMaxIncrement int32 = 2 // DefaultDuration is the default duration for an interval, which is 30 seconds DefaultDuration time.Duration = time.Second * 30 // DefaultMaxIterations is the default number of iterations, which is 100 DefaultMaxIterations int32 = 100 // DefaultAnalyticsEndpoint is the default endpoint of analytics DefaultAnalyticsEndpoint string = "http://iter8-analytics:8080" )
const ( ExperimentTypePerformance string = "Perfromance" ExperimentTypeCanary string = "Canary" ExperimentTypeAB string = "A/B" ExperimentTypeABN string = "A/B/N" )
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "iter8.tools", Version: "v1alpha2"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder runtime.SchemeBuilder AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource is required by pkg/client/listers/...
Types ¶
type ActionType ¶
type ActionType string
ActionType provides options for override actions
const ( // ActionPause is an action to pause the experiment ActionPause ActionType = "pause" // ActionResume is an action to resume the experiment ActionResume ActionType = "resume" // ActionTerminate is an action to terminate the experiment ActionTerminate ActionType = "terminate" )
type Assessment ¶
type Assessment struct {
// Assessment details of baseline
Baseline VersionAssessment `json:"baseline"`
// Assessment details of each candidate
Candidates []VersionAssessment `json:"candidates"`
// Assessment for winner target if exists
Winner *WinnerAssessment `json:"winner,omitempty"`
}
Assessment details for the each target
func (*Assessment) DeepCopy ¶
func (in *Assessment) DeepCopy() *Assessment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Assessment.
func (*Assessment) DeepCopyInto ¶
func (in *Assessment) DeepCopyInto(out *Assessment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Conditions ¶
type Conditions []*ExperimentCondition
Conditions is a list of ExperimentConditions
func (Conditions) DeepCopy ¶
func (in Conditions) DeepCopy() Conditions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Conditions.
func (Conditions) DeepCopyInto ¶
func (in Conditions) DeepCopyInto(out *Conditions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CounterMetric ¶
type CounterMetric struct {
// Name of metric
Name string `json:"name" yaml:"name"`
// Query template of this metric
QueryTemplate string `json:"query_template" yaml:"query_template"`
// Preferred direction of the metric value
// +optional
PreferredDirection *string `json:"preferred_direction,omitempty" yaml:"preferred_direction,omitempty"`
// Unit of the metric value
// +optional
Unit *string `json:"unit,omitempty" yaml:"unit,omitempty"`
}
CounterMetric is the definition of Counter Metric
func (*CounterMetric) DeepCopy ¶
func (in *CounterMetric) DeepCopy() *CounterMetric
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CounterMetric.
func (*CounterMetric) DeepCopyInto ¶
func (in *CounterMetric) DeepCopyInto(out *CounterMetric)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Criterion ¶
type Criterion struct {
// Name of metric used in the assessment
Metric string `json:"metric"`
// Threshold specifies the numerical value for a success criterion
// Metric value above threhsold violates the criterion
// +optional
Threshold *Threshold `json:"threshold,omitempty"`
// IsReward indicates whether the metric is a reward metric or not
// +optional
IsReward *bool `json:"isReward,omitempty"`
}
Criterion defines the criterion for assessing a target
func (*Criterion) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Criterion.
func (*Criterion) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Criterion) HasRewardMetric ¶
HasRewardMetric indicates whether this criterion uses a reward metric or not
type Duration ¶
type Duration struct {
// Interval specifies duration between iterations
// default is 30s
// +optional
Interval *string `json:"interval,omitempty"`
// MaxIterations indicates the amount of iteration
// default is 100
// +optional
MaxIterations *int32 `json:"maxIterations,omitempty"`
}
Duration specifies how often/many times the expriment should re-evaluate the assessment
func (*Duration) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Duration.
func (*Duration) DeepCopyInto ¶
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"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ExperimentSpec `json:"spec"`
// +optional
Status ExperimentStatus `json:"status,omitempty"`
}
Experiment contains the sections for -- defining an experiment, showing experiment status, +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:categories=all,iter8 +kubebuilder:printcolumn:name="type",type="string",JSONPath=".status.experimentType",description="Type of experiment",format="byte" +kubebuilder:printcolumn:name="hosts",type="string",JSONPath=".status.effectiveHosts",description="Names of candidates",format="byte" +kubebuilder:printcolumn:name="phase",type="string",JSONPath=".status.phase",description="Phase of the experiment",format="byte" +kubebuilder:printcolumn:name="winner found",type="boolean",JSONPath=".status.assessment.winner.winning_version_found",description="Winner identified",format="byte" +kubebuilder:printcolumn:name="current best",type="string",JSONPath=".status.assessment.winner.name",description="Current best version",format="byte" +kubebuilder:printcolumn:name="confidence",priority=1,type="string",JSONPath=".status.assessment.winner.probability_of_winning_for_best_version",description="Confidence current bets version will be the winner",format="float" +kubebuilder:printcolumn:name="status",type="string",JSONPath=".status.message",description="Detailed Status of the experiment",format="byte" +kubebuilder:printcolumn:name="baseline",priority=1,type="string",JSONPath=".spec.service.baseline",description="Name of baseline",format="byte" +kubebuilder:printcolumn:name="candidates",priority=1,type="string",JSONPath=".spec.service.candidates",description="Names of candidates",format="byte"
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) InitStatus ¶
func (e *Experiment) InitStatus()
InitStatus initialize status value of an experiment
func (*Experiment) ServiceNamespace ¶
func (e *Experiment) ServiceNamespace() string
ServiceNamespace gets the namespace for targets
type ExperimentCondition ¶
type ExperimentCondition struct {
// Type of the condition
Type ExperimentConditionType `json:"type"`
// Status of the condition
Status corev1.ConditionStatus `json:"status"`
// The time when this condition is last updated
// +optional
LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
// Reason for the last update
// +optional
Reason *string `json:"reason,omitempty"`
// Detailed explanation on the update
// +optional
Message *string `json:"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
type ExperimentConditionType ¶
type ExperimentConditionType string
ExperimentConditionType limits conditions can be set by controller
const ( // ExperimentConditionTargetsProvided has status True when the Experiment detects all elements specified in targetService ExperimentConditionTargetsProvided ExperimentConditionType = "TargetsProvided" // ExperimentConditionAnalyticsServiceNormal has status True when the analytics service is operating normally ExperimentConditionAnalyticsServiceNormal ExperimentConditionType = "AnalyticsServiceNormal" // ExperimentConditionMetricsSynced has status True when metrics are successfully synced with config map ExperimentConditionMetricsSynced ExperimentConditionType = "MetricsSynced" // ExperimentConditionExperimentCompleted has status True when the experiment is completed ExperimentConditionExperimentCompleted ExperimentConditionType = "ExperimentCompleted" // ExperimentConditionRoutingRulesReady has status True when routing rules are ready ExperimentConditionRoutingRulesReady ExperimentConditionType = "RoutingRulesReady" )
type ExperimentList ¶
type ExperimentList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Experiment `json:"items"`
}
ExperimentList contains a list of Experiment +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
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 {
// Service is a reference to the service componenets that this experiment is targeting at
Service `json:"service"`
// Criteria contains a list of Criterion for assessing the target service
// Noted that at most one reward metric is allowed
// If more than one reward criterion is included, the first would be used while others would be omitted
// +optional
Criteria []Criterion `json:"criteria,omitempty"`
// TrafficControl provides instructions on traffic management for an experiment
// +optional
TrafficControl *TrafficControl `json:"trafficControl,omitempty"`
// Endpoint of reaching analytics service
// default is http://iter8-analytics:8080
// +optional
AnalyticsEndpoint *string `json:"analyticsEndpoint,omitempty"`
// Duration specifies how often/many times the expriment should re-evaluate the assessment
// +optional
Duration *Duration `json:"duration,omitempty"`
// Cleanup indicates whether routing rules and deployment receiving no traffic should be deleted at the end of experiment
// +optional
Cleanup *bool `json:"cleanup,omitempty"`
// The metrics used in the experiment
// +optional
Metrics *Metrics `json:"metrics,omitempty"`
// User actions to override the current status of the experiment
// +optional
ManualOverride *ManualOverride `json:"manualOverride,omitempty"`
// Networking describes how traffic network should be configured for the experiment
// +optional
Networking *Networking `json:"networking,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) GetAction ¶
func (s *ExperimentSpec) GetAction() ActionType
GetAction retrieves the action specified in manual override if any
func (*ExperimentSpec) GetAnalyticsEndpoint ¶
func (s *ExperimentSpec) GetAnalyticsEndpoint() string
GetAnalyticsEndpoint returns specified(or default) analytics endpoint
func (*ExperimentSpec) GetCleanup ¶
func (s *ExperimentSpec) GetCleanup() bool
GetCleanup returns whether router and targets receiving no traffic should be deleted after expreriment
func (*ExperimentSpec) GetInterval ¶
func (s *ExperimentSpec) GetInterval() (time.Duration, error)
GetInterval returns specified(or default) interval for each duration
func (*ExperimentSpec) GetMaxIncrements ¶
func (s *ExperimentSpec) GetMaxIncrements() int32
GetMaxIncrements returns specified(or default) maxIncrements for each traffic update
func (*ExperimentSpec) GetMaxIterations ¶
func (s *ExperimentSpec) GetMaxIterations() int32
GetMaxIterations returns specified(or default) max of iterations
func (*ExperimentSpec) GetOnTermination ¶
func (s *ExperimentSpec) GetOnTermination() OnTerminationType
GetOnTermination returns specified(or default) onTermination strategy for traffic controller
func (*ExperimentSpec) GetPercentage ¶
func (s *ExperimentSpec) GetPercentage() int32
GetPercentage returns specified(or default) experiment traffic percentage
func (*ExperimentSpec) GetStrategy ¶
func (s *ExperimentSpec) GetStrategy() string
GetStrategy gets the specified(or default) strategy used for traffic control
func (*ExperimentSpec) Pause ¶
func (s *ExperimentSpec) Pause() bool
Pause indicates whether an Experiment Pause request is issued or not
func (*ExperimentSpec) Resume ¶
func (s *ExperimentSpec) Resume() bool
Resume indicates whether an Experiment Resume request is issued or not
func (*ExperimentSpec) Terminate ¶
func (s *ExperimentSpec) Terminate() bool
Terminate indicates whether an Experiment Terminate request is issued or not
func (*ExperimentSpec) TerminateExperiment ¶
func (s *ExperimentSpec) TerminateExperiment()
TerminateExperiment terminates experiment
func (*ExperimentSpec) Validate ¶
func (s *ExperimentSpec) Validate() error
Validate checks whether specification in Service can be supported by iter8 or not returns nil if ok; otherwise non-nil err with detailed explanation will be returned
type ExperimentStatus ¶
type ExperimentStatus struct {
// List of conditions
// +optional
Conditions Conditions `json:"conditions,omitempty"`
// InitTimestamp is the timestamp when the experiment is initialized
// +optional
InitTimestamp *metav1.Time `json:"initTimestamp,omitempty"`
// StartTimestamp is the timestamp when the experiment starts
// +optional
StartTimestamp *metav1.Time `json:"startTimestamp,omitempty"`
// EndTimestamp is the timestamp when experiment completes
// +optional
EndTimestamp *metav1.Time `json:"endTimestamp,omitempty"`
// LastUpdateTime is the last time iteration has been updated
// +optional
LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"`
// CurrentIteration is the current iteration number
// +optional
CurrentIteration *int32 `json:"currentIteration,omitempty"`
// GrafanaURL is the url to the Grafana Dashboard
// +optional
GrafanaURL *string `json:"grafanaURL,omitempty"`
// Assessment returned by the last analyis
// +optional
Assessment *Assessment `json:"assessment,omitempty"`
// Phase marks the Phase the experiment is at
// +optional
Phase PhaseType `json:"phase,omitempty"`
// Message specifies message to show in the kubectl printer
// +optional
Message *string `json:"message,omitempty"`
// AnalysisState is the last recorded analysis state
// +optional
AnalysisState *runtime.RawExtension `json:"analysisState,omitempty"`
// ExperimentType is type of experiment
ExperimentType string `json:"experimentType,omitempty"`
// EffectiveHosts is computed host for experiment.
// List of spec.Service.Name and spec.Service.Hosts[0].name
EffectiveHosts []string `json:"effectiveHosts,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) ExperimentCompleted ¶
func (s *ExperimentStatus) ExperimentCompleted() bool
ExperimentCompleted returns whether experiment is completed or not
func (*ExperimentStatus) GetCondition ¶
func (s *ExperimentStatus) GetCondition(condition ExperimentConditionType) *ExperimentCondition
GetCondition returns condition of given conditionType
func (*ExperimentStatus) IsWinnerAssessmentAvailable ¶
func (s *ExperimentStatus) IsWinnerAssessmentAvailable() bool
IsWinnerAssessmentAvailable tells whether winner assessment is presented in status or not
func (*ExperimentStatus) IsWinnerFound ¶
func (s *ExperimentStatus) IsWinnerFound() bool
IsWinnerFound tells whether winner has been found by analytics
func (*ExperimentStatus) MarkAnalyticsServiceError ¶
func (s *ExperimentStatus) MarkAnalyticsServiceError(messageFormat string, messageA ...interface{}) (bool, string)
MarkAnalyticsServiceError sets the condition that the analytics service breaks down Return true if it's converted from true or unknown
func (*ExperimentStatus) MarkAnalyticsServiceRunning ¶
func (s *ExperimentStatus) MarkAnalyticsServiceRunning(messageFormat string, messageA ...interface{}) (bool, string)
MarkAnalyticsServiceRunning sets the condition that the analytics service is operating normally Return true if it's converted from false or unknown
func (*ExperimentStatus) MarkAssessmentUpdate ¶
func (s *ExperimentStatus) MarkAssessmentUpdate(messageFormat string, messageA ...interface{}) (bool, string)
MarkAssessmentUpdate sets the condition that assessment for experiment updated
func (*ExperimentStatus) MarkExperimentCompleted ¶
func (s *ExperimentStatus) MarkExperimentCompleted(messageFormat string, messageA ...interface{}) (bool, string)
MarkExperimentCompleted sets the condition that the experiemnt is completed
func (*ExperimentStatus) MarkExperimentPause ¶
func (s *ExperimentStatus) MarkExperimentPause(messageFormat string, messageA ...interface{}) (bool, string)
MarkExperimentPause sets the phase and status that experiment is paused by manualOverrides returns true if this is a newly-set operation
func (*ExperimentStatus) MarkExperimentResume ¶
func (s *ExperimentStatus) MarkExperimentResume(messageFormat string, messageA ...interface{}) (bool, string)
MarkExperimentResume sets the phase and status that experiment is resmued by manualOverrides returns true if this is a newly-set operation
func (*ExperimentStatus) MarkIterationUpdate ¶
func (s *ExperimentStatus) MarkIterationUpdate(messageFormat string, messageA ...interface{}) (bool, string)
MarkIterationUpdate sets the condition that the iteration updated
func (*ExperimentStatus) MarkMetricsSynced ¶
func (s *ExperimentStatus) MarkMetricsSynced(messageFormat string, messageA ...interface{}) (bool, string)
MarkMetricsSynced sets the condition that the metrics are synced with config map Return true if it's converted from false or unknown
func (*ExperimentStatus) MarkMetricsSyncedError ¶
func (s *ExperimentStatus) MarkMetricsSyncedError(messageFormat string, messageA ...interface{}) (bool, string)
MarkMetricsSyncedError sets the condition that the error occurs when syncing with the config map Return true if it's converted from true or unknown
func (*ExperimentStatus) MarkRoutingRulesError ¶
func (s *ExperimentStatus) MarkRoutingRulesError(messageFormat string, messageA ...interface{}) (bool, string)
MarkRoutingRulesError sets the condition that the routing rules are not ready Return true if it's converted from true or unknown
func (*ExperimentStatus) MarkRoutingRulesReady ¶
func (s *ExperimentStatus) MarkRoutingRulesReady(messageFormat string, messageA ...interface{}) (bool, string)
MarkRoutingRulesReady sets the condition that the routing rules are ready Return true if it's converted from false or unknown
func (*ExperimentStatus) MarkTargetsError ¶
func (s *ExperimentStatus) MarkTargetsError(messageFormat string, messageA ...interface{}) (bool, string)
MarkTargetsError sets the condition that there is error in finding all targets Return true if it's converted from true or unknown
func (*ExperimentStatus) MarkTargetsFound ¶
func (s *ExperimentStatus) MarkTargetsFound(messageFormat string, messageA ...interface{}) (bool, string)
MarkTargetsFound sets the condition that the all target have been found Return true if it's converted from false or unknown
func (*ExperimentStatus) MarkTrafficUpdate ¶
func (s *ExperimentStatus) MarkTrafficUpdate(messageFormat string, messageA ...interface{}) (bool, string)
MarkTrafficUpdate sets the condition that traffic to targets has beeen changed
func (*ExperimentStatus) MetricsSynced ¶
func (s *ExperimentStatus) MetricsSynced() bool
MetricsSynced returns whether status of ExperimentConditionMetricsSynced is true or not
func (*ExperimentStatus) RoutingRulesReady ¶
func (s *ExperimentStatus) RoutingRulesReady() bool
RoutingRulesReady returns whether status of ExperimentConditionRoutingRulesReady is true or not
func (*ExperimentStatus) TargetsFound ¶
func (s *ExperimentStatus) TargetsFound() bool
TargetsFound returns whether status of ExperimentConditionTargetsProvided is true or not
func (*ExperimentStatus) TrafficToString ¶
func (s *ExperimentStatus) TrafficToString() string
TrafficToString outputs current traffic in human-readable format
func (*ExperimentStatus) WinnerToString ¶
func (s *ExperimentStatus) WinnerToString() string
WinnerToString outputs winner assessment in human-readable format
type HTTPMatchRequest ¶
type HTTPMatchRequest struct {
// The name assigned to a match.
Name string `json:"name,omitempty"`
// URI to match
URI *StringMatch `json:"uri,omitempty"`
// Scheme Scheme
Scheme *StringMatch `json:"scheme,omitempty"`
// HTTP Method
Method *StringMatch `json:"method,omitempty"`
// HTTP Authority
Authority *StringMatch `json:"authority,omitempty"`
// Headers to match
Headers map[string]StringMatch `json:"headers,omitempty"`
// Specifies the ports on the host that is being addressed.
Port uint32 `json:"port,omitempty"`
// SourceLabels for matching
SourceLabels map[string]string `json:"sourceLabels,omitempty"`
// Gateways for matching
Gateways []string `json:"gateways,omitempty"`
// Query parameters for matching.
QueryParams map[string]StringMatch `json:"query_params,omitempty"`
// Flag to specify whether the URI matching should be case-insensitive.
IgnoreURICase bool `json:"ignore_uri_case,omitempty"`
}
func (*HTTPMatchRequest) DeepCopy ¶
func (in *HTTPMatchRequest) DeepCopy() *HTTPMatchRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPMatchRequest.
func (*HTTPMatchRequest) DeepCopyInto ¶
func (in *HTTPMatchRequest) DeepCopyInto(out *HTTPMatchRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Host ¶
type Host struct {
// Name of the Host
Name string `json:"name"`
// The gateway associated with the host
Gateway string `json:"gateway"`
}
Host holds the name of host and gateway associated with it
func (*Host) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Host.
func (*Host) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManualOverride ¶
type ManualOverride struct {
// Action to perform
//+kubebuilder:validation:Enum={pause,resume,terminate}
Action ActionType `json:"action"`
// Traffic split status specification
// Applied to action terminate only
// example:
// reviews-v2:80
// reviews-v3:20
// +optional
TrafficSplit map[string]int32 `json:"trafficSplit,omitempty"`
}
ManualOverride defines actions that the user can perform to an experiment
func (*ManualOverride) DeepCopy ¶
func (in *ManualOverride) DeepCopy() *ManualOverride
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManualOverride.
func (*ManualOverride) DeepCopyInto ¶
func (in *ManualOverride) DeepCopyInto(out *ManualOverride)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Match ¶
type Match struct {
// Matching criteria for HTTP requests
// +optional
HTTP []*HTTPMatchRequest `json:"http,omitempty"`
}
Match contains matching criteria for requests
func (*Match) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Match.
func (*Match) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Metrics ¶
type Metrics struct {
// List of counter metrics definiton
// +optional
CounterMetrics []CounterMetric `json:"counter_metrics,omitempty"`
// List of ratio metrics definiton
// +optional
RatioMetrics []RatioMetric `json:"ratio_metrics,omitempty"`
}
Metrics contains definitions for metrics used in the experiment
func (*Metrics) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metrics.
func (*Metrics) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Networking ¶
type Networking struct {
// id of router
// +optional
ID *string `json:"id,omitempty"`
// List of hosts used to receive external traffic
// +optional
Hosts []Host `json:"hosts,omitempty"`
}
Networking describes how traffic network should be configured for the experiment
func (*Networking) DeepCopy ¶
func (in *Networking) DeepCopy() *Networking
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Networking.
func (*Networking) DeepCopyInto ¶
func (in *Networking) DeepCopyInto(out *Networking)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OnTerminationType ¶
type OnTerminationType string
OnTerminationType provides options for onTermination
const ( // OnTerminationToWinner indicates all traffic should go to winner candidate when experiment is terminated OnTerminationToWinner OnTerminationType = "to_winner" // OnTerminationToBaseline indicates all traffic should go to baseline when experiment is terminated OnTerminationToBaseline OnTerminationType = "to_baseline" // OnTerminationKeepLast keeps the last traffic status when experiment is terminated OnTerminationKeepLast OnTerminationType = "keep_last" )
type PhaseType ¶
type PhaseType string
PhaseType has options for phases that an experiment can be at
type RatioMetric ¶
type RatioMetric struct {
// name of metric
Name string `json:"name" yaml:"name"`
// Counter metric used in numerator
Numerator string `json:"numerator" yaml:"numerator"`
// Counter metric used in denominator
Denominator string `json:"denominator" yaml:"denominator"`
// Boolean flag indicating if the value of this metric is always in the range 0 to 1
// +optional
ZeroToOne *bool `json:"zero_to_one,omitempty" yaml:"zero_to_one,omitempty"`
// Preferred direction of the metric value
// +optional
PreferredDirection *string `json:"preferred_direction,omitempty" yaml:"preferred_direction,omitempty"`
}
RatioMetric is the definiton of Ratio Metric
func (*RatioMetric) DeepCopy ¶
func (in *RatioMetric) DeepCopy() *RatioMetric
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RatioMetric.
func (*RatioMetric) DeepCopyInto ¶
func (in *RatioMetric) DeepCopyInto(out *RatioMetric)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RatioMetric) IsZeroToOne ¶
func (r *RatioMetric) IsZeroToOne() bool
IsZeroToOne returns specified(or default) zeroToOne value
type Service ¶
type Service struct {
// defines the object reference to the service
*corev1.ObjectReference `json:",inline"`
// Name of the baseline deployment
Baseline string `json:"baseline"`
// List of names of candidate deployments
Candidates []string `json:"candidates"`
// Port number exposed by internal services
Port *int32 `json:"port,omitempty"`
}
Service is a reference to the service that this experiment is targeting at
func (*Service) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service.
func (*Service) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StrategyType ¶
type StrategyType string
StrategyType provides options for strategy used in experiment
const ( // StrategyProgressive is the progressive strategy StrategyProgressive StrategyType = "progressive" // StrategyTop2 is the top_2 strategy StrategyTop2 StrategyType = "top_2" // StrategyUniform is the uniform strategy StrategyUniform StrategyType = "uniform" )
type StringMatch ¶
type StringMatch struct {
Exact *string `json:"exact,omitempty"`
Prefix *string `json:"prefix,omitempty"`
Regex *string `json:"regex,omitempty"`
}
func (*StringMatch) DeepCopy ¶
func (in *StringMatch) DeepCopy() *StringMatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringMatch.
func (*StringMatch) DeepCopyInto ¶
func (in *StringMatch) DeepCopyInto(out *StringMatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StringMatch) IsValid ¶
func (s *StringMatch) IsValid() bool
type Threshold ¶
type Threshold struct {
// Type of threshold
// relative: value of threshold specifies the relative amount of changes
// absolute: value of threshold indicates an absolute value
//+kubebuilder:validation:Enum={relative,absolute}
Type string `json:"type"`
// Value of threshold
Value float32 `json:"value"`
// Once a target metric violates this threshold, traffic to the target should be cutoff or not
// +optional
CutoffTrafficOnViolation *bool `json:"cutoffTrafficOnViolation,omitempty"`
}
Threshold defines the value and type of a criterion threshold
func (*Threshold) CutOffOnViolation ¶
CutOffOnViolation indicates whether traffic should be cutoff to a target if threshold is violated
func (*Threshold) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Threshold.
func (*Threshold) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TrafficControl ¶
type TrafficControl struct {
// Strategy used to shift traffic
// default is progressive
// +kubebuilder:validation:Enum={progressive, top_2, uniform}
// +optional
Strategy *StrategyType `json:"strategy,omitempty"`
// OnTermination determines traffic split status at the end of experiment
// +kubebuilder:validation:Enum={to_winner,to_baseline,keep_last}
// +optional
OnTermination *OnTerminationType `json:"onTermination,omitempty"`
// Only requests fulfill the match section would be used in experiment
// Istio matching rules are used
// +optional
Match *Match `json:"match,omitempty"`
// Percentage specifies the amount of traffic to service that would be used in experiment
// default is 100
// +optional
Percentage *int32 `json:"percentage,omitempty"`
// MaxIncrement is the upperlimit of traffic increment for a target in one iteration
// default is 2
// +optional
MaxIncrement *int32 `json:"maxIncrement,omitempty"`
// RouterID refers to the id of router used to handle traffic for the experiment
// If it's not specified, the first entry of effictive host will be used as the id
// +optional
RouterID *string `json:"routerID,omitempty"`
}
TrafficControl specifies constrains on traffic and stratgy used to update the traffic
func (*TrafficControl) DeepCopy ¶
func (in *TrafficControl) DeepCopy() *TrafficControl
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrafficControl.
func (*TrafficControl) DeepCopyInto ¶
func (in *TrafficControl) DeepCopyInto(out *TrafficControl)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VersionAssessment ¶
type VersionAssessment struct {
// name of version
Name string `json:"name"`
// Weight of traffic
Weight int32 `json:"weight"`
// Assessment details from analytics
analyticsv1alpha2.VersionAssessment `json:",inline"`
// A flag indicates whether traffic to this target should be cutoff
// +optional
Rollback bool `json:"rollback,omitempty"`
}
VersionAssessment contains assessment details for each version
func (*VersionAssessment) DeepCopy ¶
func (in *VersionAssessment) DeepCopy() *VersionAssessment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionAssessment.
func (*VersionAssessment) DeepCopyInto ¶
func (in *VersionAssessment) DeepCopyInto(out *VersionAssessment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WinnerAssessment ¶
type WinnerAssessment struct {
// name of winner version
// +optional
Name *string `json:"name,omitempty"`
// Assessment details from analytics
*analyticsv1alpha2.WinnerAssessment `json:",inline,omitempty"`
}
WinnerAssessment shows assessment details for winner of an experiment
func (*WinnerAssessment) DeepCopy ¶
func (in *WinnerAssessment) DeepCopy() *WinnerAssessment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WinnerAssessment.
func (*WinnerAssessment) DeepCopyInto ¶
func (in *WinnerAssessment) DeepCopyInto(out *WinnerAssessment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.