v1alpha1

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the iter8 v1alpha1 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 v1alpha1 contains API Schema definitions for the iter8 v1alpha1 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

View Source
const (
	// ExperimentConditionReady has status True when the Experiment has finished controlling traffic
	ExperimentConditionReady = duckv1alpha1.ConditionReady

	// ExperimentConditionTargetsProvided has status True when the Experiment detects all elements specified in targetService
	ExperimentConditionTargetsProvided duckv1alpha1.ConditionType = "TargetsProvided"

	// ExperimentConditionAnalyticsServiceNormal has status True when the analytics service is operating normally
	ExperimentConditionAnalyticsServiceNormal duckv1alpha1.ConditionType = "AnalyticsServiceNormal"

	// ExperimentConditionMetricsSynced has status True when metrics are successfully synced with config map
	ExperimentConditionMetricsSynced duckv1alpha1.ConditionType = "MetricsSynced"

	// ExperimentConditionExperimentCompleted has status True when the experiment is completed
	ExperimentConditionExperimentCompleted duckv1alpha1.ConditionType = "ExperimentCompleted"

	// ExperimentConditionExperimentSucceeded has status True when the experiment is succeeded
	ExperimentConditionExperimentSucceeded duckv1alpha1.ConditionType = "ExperimentSucceeded"

	// ExperimentConditionRoutingRulesReady has status True when routing rules are ready
	ExperimentConditionRoutingRulesReady duckv1alpha1.ConditionType = "RoutingRulesReady"
)
View Source
const (
	ReasonTargetsNotFound         = "TargetsNotFound"
	ReasonTargetsFound            = "TargetsFound"
	ReasonAnalyticsServiceError   = "AnalyticsServiceError"
	ReasonAnalyticsServiceRunning = "AnalyticsServiceRunning"
	ReasonIterationUpdate         = "IterationUpdate"
	ReasonIterationSucceeded      = "IterationSucceeded"
	ReasonIterationFailed         = "IterationFailed"
	ReasonExperimentSucceeded     = "ExperimentSucceeded"
	ReasonExperimentFailed        = "ExperimentFailed"
	ReasonSyncMetricsError        = "SyncMetricsError"
	ReasonSyncMetricsSucceeded    = "SyncMetricsSucceeded"
	ReasonRoutingRulesError       = "RoutingRulesError"
	ReasonRoutingRulesReady       = "RoutingRulesReady"
	ReasonActionPause             = "Pause"
	ReasonActionResume            = "Resume"
)

A set of reason setting the experiment condition status

Variables

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

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

	// AddToScheme is required by pkg/client/...
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource is required by pkg/client/listers/...

Types

type Analysis

type Analysis struct {
	// AnalyticsService endpoint
	AnalyticsService string `json:"analyticsService,omitempty"`

	// Grafana Dashboard endpoint
	GrafanaEndpoint string `json:"grafanaEndpoint,omitempty"`

	// List of criteria for assessing the candidate version
	SuccessCriteria []SuccessCriterion `json:"successCriteria,omitempty"`

	// The reward used by analytics to assess candidate
	Reward *Reward `json:"reward,omitempty"`
}

Analysis specifies the parameters for posting/reading the assessment from analytics server

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.

func (*Analysis) GetGrafanaEndpoint

func (a *Analysis) GetGrafanaEndpoint() string

GetGrafanaEndpoint returns the grafana endpoint; Default is "http://localhost:3000".

func (*Analysis) GetServiceEndpoint

func (a *Analysis) GetServiceEndpoint() string

GetServiceEndpoint returns the analytcis endpoint; Default is "http://iter8-analytics.iter8:8080".

type CleanUpType

type CleanUpType string

CleanUpType defines the possible input for cleanup

const (
	// CleanUpDelete indicates unused deployment should be removed on experiment completion
	CleanUpDelete CleanUpType = "delete"
	// CleanUpNull indicates no action should ne taken on experiment completion
	CleanUpNull CleanUpType = ""
)

type Experiment

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

	Spec    ExperimentSpec    `json:"spec,omitempty"`
	Status  ExperimentStatus  `json:"status,omitempty"`
	Metrics ExperimentMetrics `json:"metrics,omitempty"`
	// Action provides user an option to take action in the experiment
	// pause: pause the progress of experiment
	// resume: resume the experiment
	// override_failure: force the experiment to failure status
	// override_success: force the experiment to success status
	// +optional.
	//+kubebuilder:validation:Enum={pause,resume,override_failure,override_success}
	Action ExperimentAction `json:"action,omitempty"`
}

Experiment is the Schema for the experiments API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:categories=all,iter8 +kubebuilder:printcolumn:name="phase",type="string",JSONPath=".status.phase",description="Phase of the experiment",format="byte" +kubebuilder:printcolumn:name="status",type="string",JSONPath=".status.message",description="Detailed Status of the experiment",format="byte" +kubebuilder:printcolumn:name="baseline",type="string",JSONPath=".spec.targetService.baseline",description="Name of baseline",format="byte" +kubebuilder:printcolumn:name="percentage",type="integer",JSONPath=".status.trafficSplitPercentage.baseline",description="Traffic percentage for baseline",format="int32" +kubebuilder:printcolumn:name="candidate",type="string",JSONPath=".spec.targetService.candidate",description="Name of candidate",format="byte" +kubebuilder:printcolumn:name="percentage",type="integer",JSONPath=".status.trafficSplitPercentage.candidate",description="Traffic percentage for candidate",format="int32"

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) GetStrategy

func (e *Experiment) GetStrategy() string

GetStrategy returns the actual strategy of the experiment

func (*Experiment) ServiceNamespace added in v0.1.0

func (e *Experiment) ServiceNamespace() string

ServiceNamespace gets the namespace for targets

func (*Experiment) Succeeded

func (e *Experiment) Succeeded() bool

Succeeded determines whether experiment is a success or not

type ExperimentAction added in v0.1.0

type ExperimentAction string

ExperimentAction defines the external action that can be performed to the experiment

const (
	// ActionOverrideSuccess indicates that the experiment should be forced to a successful termination
	ActionOverrideSuccess ExperimentAction = "override_success"
	// ActionOverrideFailure indicates that the experiment should be forced to a failed termination
	ActionOverrideFailure ExperimentAction = "override_failure"
	// ActionPause indicates a request for pausing experiment
	ActionPause ExperimentAction = "pause"
	// ActionResume indicates a request for resuming experiment
	ActionResume ExperimentAction = "resume"
)

func (ExperimentAction) TerminateExperiment added in v0.1.0

func (a ExperimentAction) TerminateExperiment() bool

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 ExperimentMetric

type ExperimentMetric struct {
	// QueryTemplate is the query template for metric
	QueryTemplate string `json:"query_template"`

	// SampleSizeTemplate is the query template for sample size
	SampleSizeTemplate string `json:"sample_size_template"`

	// IsCounter indicates metric is a monotonically increasing counter
	IsCounter bool `json:"is_counter"`

	// AbsentValue  is default value when data source does not provide a value
	AbsentValue string `json:"absent_value"`
}

ExperimentMetric stores details of a metric query template to

func (*ExperimentMetric) DeepCopy

func (in *ExperimentMetric) DeepCopy() *ExperimentMetric

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

func (*ExperimentMetric) DeepCopyInto

func (in *ExperimentMetric) DeepCopyInto(out *ExperimentMetric)

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

type ExperimentMetrics

type ExperimentMetrics map[string]ExperimentMetric

ExperimentMetrics is a map from metric name to metric definition

func (ExperimentMetrics) DeepCopy

func (in ExperimentMetrics) DeepCopy() ExperimentMetrics

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

func (ExperimentMetrics) DeepCopyInto

func (in ExperimentMetrics) DeepCopyInto(out *ExperimentMetrics)

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

type ExperimentSpec

type ExperimentSpec struct {
	// TargetService is a reference to an object to use as target service
	TargetService TargetService `json:"targetService"`

	// TrafficControl defines parameters for controlling the traffic
	// +optional
	TrafficControl TrafficControl `json:"trafficControl,omitempty"`

	// Analysis parameters
	// +optional
	Analysis Analysis `json:"analysis,omitempty"`

	// CleanUp is a flag to determine the action to take at the end of experiment
	// +optional.
	//+kubebuilder:validation:Enum=delete
	CleanUp CleanUpType `json:"cleanup,omitempty"`

	// RoutingReference provides references to routing rules set by users
	// +optional
	RoutingReference *corev1.ObjectReference `json:"routingReference,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.

type ExperimentStatus

type ExperimentStatus struct {
	// inherits duck/v1alpha1 Status, which currently provides:
	// * ObservedGeneration - the 'Generation' of the Service that was last processed by the controller.
	// * Conditions - the latest available observations of a resource's current state.
	duckv1alpha1.Status `json:",inline"`

	// CreateTimestamp is the timestamp when the experiment is created
	CreateTimestamp int64 `json:"createTimestamp,omitempty"`

	// StartTimestamp is the timestamp when the experiment starts
	StartTimestamp int64 `json:"startTimestamp,omitempty"`

	// EndTimestamp is the timestamp when experiment completes
	EndTimestamp int64 `json:"endTimestamp,omitempty"`

	// LastIncrementTime is the last time the traffic has been incremented
	LastIncrementTime metav1.Time `json:"lastIncrementTime,omitempty"`

	// CurrentIteration is the current iteration number
	CurrentIteration int `json:"currentIteration,omitempty"`

	// AnalysisState is the last analysis state
	AnalysisState runtime.RawExtension `json:"analysisState,omitempty"`

	// GrafanaURL is the url to the Grafana Dashboard
	GrafanaURL string `json:"grafanaURL,omitempty"`

	// AssessmentSummary returned by the last analyis
	AssessmentSummary Summary `json:"assessment,omitempty"`

	// TrafficSplit tells the current traffic spliting between baseline and candidate
	TrafficSplit TrafficSplit `json:"trafficSplitPercentage,omitempty"`

	// Phase marks the Phase the experiment is at
	Phase Phase `json:"phase,omitempty"`

	// Message specifies message to show in the kubectl printer
	Message string `json:"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) Init

func (s *ExperimentStatus) Init()

Init initialize status values

func (*ExperimentStatus) MarkActionPause added in v0.1.0

func (s *ExperimentStatus) MarkActionPause() bool

MarkActionPause sets the phase and status that experiment is paused by action returns true if this is a newly-set operation

func (*ExperimentStatus) MarkActionResume added in v0.1.0

func (s *ExperimentStatus) MarkActionResume() bool

MarkActionResume sets the phase and status that experiment is resmued by action returns true if this is a newly-set operation

func (*ExperimentStatus) MarkAnalyticsServiceError

func (s *ExperimentStatus) MarkAnalyticsServiceError(reason, messageFormat string, messageA ...interface{}) bool

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() bool

MarkAnalyticsServiceRunning sets the condition that the analytics service is operating normally Return true if it's converted from false or unknown

func (*ExperimentStatus) MarkExperimentCompleted

func (s *ExperimentStatus) MarkExperimentCompleted()

MarkExperimentCompleted sets the condition that the experiemnt is completed

func (*ExperimentStatus) MarkExperimentFailed

func (s *ExperimentStatus) MarkExperimentFailed(reason, messageFormat string, messageA ...interface{})

MarkExperimentFailed sets the condition that the experiemnt is ongoing

func (*ExperimentStatus) MarkExperimentNotCompleted

func (s *ExperimentStatus) MarkExperimentNotCompleted(reason, messageFormat string, messageA ...interface{})

MarkExperimentNotCompleted sets the condition that the experiemnt is ongoing

func (*ExperimentStatus) MarkExperimentSucceeded

func (s *ExperimentStatus) MarkExperimentSucceeded(reason, messageFormat string, messageA ...interface{})

MarkExperimentSucceeded sets the condition that the experiemnt is completed

func (*ExperimentStatus) MarkMetricsSynced

func (s *ExperimentStatus) MarkMetricsSynced() bool

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(reason, messageFormat string, messageA ...interface{}) bool

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(reason, messageFormat string, messageA ...interface{}) bool

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() bool

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(reason, messageFormat string, messageA ...interface{}) bool

MarkTargetsError sets the condition that the target service hasn't been found. Return true if it's converted from true or unknown

func (*ExperimentStatus) MarkTargetsFound

func (s *ExperimentStatus) MarkTargetsFound() bool

MarkTargetsFound sets the condition that the all target have been found Return true if it's converted from false or unknown

func (*ExperimentStatus) TargetsFound added in v0.1.0

func (s *ExperimentStatus) TargetsFound() bool

type Host added in v0.2.0

type Host struct {
	// Name of the Host
	Name string `json:"name"`

	// The gateway
	Gateway string `json:"gateway"`
}

func (*Host) DeepCopy added in v0.2.0

func (in *Host) DeepCopy() *Host

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

func (*Host) DeepCopyInto added in v0.2.0

func (in *Host) DeepCopyInto(out *Host)

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

type MinMax

type MinMax struct {
	// Min minimum possible value of the metric
	Min float64 `json:"min"`

	//Max maximum possible value of the metric
	Max float64 `json:"max"`
}

MinMax captures minimum and maximum values of the metric

func (*MinMax) DeepCopy

func (in *MinMax) DeepCopy() *MinMax

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

func (*MinMax) DeepCopyInto

func (in *MinMax) DeepCopyInto(out *MinMax)

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

type Phase

type Phase string

Phase the experiment is in

const (
	// PhasePause indicates experiment is paused
	PhasePause Phase = "Pause"
	// PhaseProgressing indicates experiment is progressing
	PhaseProgressing Phase = "Progressing"
	// PhaseCompleted indicates experiment has competed (successfully or not)
	PhaseCompleted Phase = "Completed"
)

type Reward

type Reward struct {
	// Name of the metric to which the criterion applies. Options:
	MetricName string `json:"metricName"`

	// Minimum and maximum values of the metric
	MinMax *MinMax `json:"min_max,omitempty"`
}

Reward specifies the criteria for an experiment to succeed

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 SuccessCriterion

type SuccessCriterion struct {
	// Name of the metric to which the criterion applies. Options:
	MetricName string `json:"metricName"`

	// 	Tolerance type. Options:
	// "delta": compares the candidate against the baseline version with respect to the metric;
	// "threshold": checks the candidate with respect to the metric
	//+kubebuilder:validation:Enum={threshold,delta}
	ToleranceType ToleranceType `json:"toleranceType"`

	// Value to check
	Tolerance float64 `json:"tolerance"`

	// Minimum number of data points required to make a decision based on this criterion;
	// If not specified, the default value is 10
	// +optional
	SampleSize *int `json:"sampleSize,omitempty"`

	// Minimum and maximum values of the metric
	MinMax *MinMax `json:"min_max,omitempty"`

	// Indicates whether or not the experiment must finish if this criterion is not satisfied;
	// defaults to false
	// +optional
	StopOnFailure *bool `json:"stopOnFailure,omitempty"`
}

SuccessCriterion specifies the criteria for an experiment to succeed

func (*SuccessCriterion) DeepCopy

func (in *SuccessCriterion) DeepCopy() *SuccessCriterion

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

func (*SuccessCriterion) DeepCopyInto

func (in *SuccessCriterion) DeepCopyInto(out *SuccessCriterion)

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

func (*SuccessCriterion) GetSampleSize

func (s *SuccessCriterion) GetSampleSize() int

GetSampleSize returns the sample size for analytics in each iteration; Default is 10.

func (*SuccessCriterion) GetStopOnFailure

func (s *SuccessCriterion) GetStopOnFailure() bool

GetStopOnFailure returns the sample size for analytics in each iteration; Default is false.

type SuccessCriterionStatus

type SuccessCriterionStatus struct {
	// Name of the metric to which the criterion applies
	// example: iter8_latency
	MetricName string `json:"metric_name"`

	// Assessment of this success criteria in plain English
	Conclusions []string `json:"conclusions"`

	// Indicates whether or not the success criterion for the corresponding metric has been met
	SuccessCriterionMet bool `json:"success_criterion_met"`

	// Indicates whether or not the experiment must be aborted on the basis of the criterion for this metric
	AbortExperiment bool `json:"abort_experiment"`
}

SuccessCriterionStatus contains assessment for a specific success criteria

func (*SuccessCriterionStatus) DeepCopy

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

func (*SuccessCriterionStatus) DeepCopyInto

func (in *SuccessCriterionStatus) DeepCopyInto(out *SuccessCriterionStatus)

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

type Summary

type Summary struct {
	// Overall summary based on all success criteria
	Conclusions []string `json:"conclusions,omitempty"`

	// Indicates whether or not all success criteria for assessing the candidate version
	// have been met
	AllSuccessCriteriaMet bool `json:"all_success_criteria_met,omitempty"`

	// Indicates whether or not the experiment must be aborted based on the success criteria
	AbortExperiment bool `json:"abort_experiment,omitempty"`

	// The list of status for all success criteria applied
	SuccessCriteriaStatus []SuccessCriterionStatus `json:"success_criteria,omitempty"`
}

Summary contains assessment summary from the analytics service

func (*Summary) Assessment2String

func (s *Summary) Assessment2String() string

Assessment2String prints formatted output of assessment summary

func (*Summary) DeepCopy

func (in *Summary) DeepCopy() *Summary

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

func (*Summary) DeepCopyInto

func (in *Summary) DeepCopyInto(out *Summary)

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

type TargetService

type TargetService struct {
	// defines the characteristics of the service
	*corev1.ObjectReference `json:",inline"`

	// Baseline tells the name of baseline
	Baseline string `json:"baseline,omitempty"`

	// Candidate tells the name of candidate
	Candidate string `json:"candidate,omitempty"`

	// List of hosts related to this service
	Hosts []Host `json:"hosts,omitempty"`

	// Port number exposed by internal services
	Port *int32 `json:"port,omitempty"`
}

TargetService defines what to watch in the controller

func (*TargetService) DeepCopy

func (in *TargetService) DeepCopy() *TargetService

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

func (*TargetService) DeepCopyInto

func (in *TargetService) DeepCopyInto(out *TargetService)

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

type ToleranceType

type ToleranceType string
const (
	// ToleranceTypeDelta constant string for tolerances of type "delta"
	ToleranceTypeDelta ToleranceType = "delta"
	// ToleranceTypeThreshold constant string for tolerances of type "threshhold"
	ToleranceTypeThreshold ToleranceType = "threshold"
)

type TrafficControl

type TrafficControl struct {
	// Strategy is the strategy used for experiment. Options:
	// "check_and_increment": get decision on traffic increament from analytics
	// "increment_without_check": increase traffic each interval without calling analytics
	// +optional. Default is "check_and_increment".
	//+kubebuilder:validation:Enum={check_and_increment,increment_without_check,epsilon_greedy,posterior_bayesian_routing,optimistic_bayesian_routing}
	Strategy *string `json:"strategy,omitempty"`

	// MaxTrafficPercentage is the maximum traffic ratio to send to the candidate. Default is 50
	// +optional
	MaxTrafficPercentage *float64 `json:"maxTrafficPercentage,omitempty"`

	// TrafficStepSize is the traffic increment per interval. Default is 2.0
	// +optional
	TrafficStepSize *float64 `json:"trafficStepSize,omitempty"`

	// Interval is the time in second before the next increment. Default is 1mn
	// +optional
	Interval *string `json:"interval,omitempty"`

	// Maximum number of iterations for this experiment. Default to 100.
	// +optional
	MaxIterations *int `json:"maxIterations,omitempty"`

	// Determines how the traffic must be split at the end of the experiment; options:
	// "baseline": all traffic goes to the baseline version;
	// "candidate": all traffic goes to the candidate version;
	// "both": traffic is split across baseline and candidate.
	// Defaults to “candidate”
	// +optional
	//+kubebuilder:validation:Enum={baseline,candidate,both}
	OnSuccess *string `json:"onSuccess,omitempty"`

	// The required confidence in the recommeded traffic split. Defaults to 0.95
	// +optional
	Confidence *float64 `json:"confidence,omitempty"`
}

TrafficControl specifies how/when traffic between versioins should be altered

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.

func (*TrafficControl) GetConfidence

func (t *TrafficControl) GetConfidence() float64

GetConfidence retrieves the desired probability that all the success criteria are met

func (*TrafficControl) GetInterval

func (t *TrafficControl) GetInterval() string

GetInterval gets the specified interval or the default value (1m)

func (*TrafficControl) GetIntervalDuration

func (t *TrafficControl) GetIntervalDuration() (time.Duration, error)

GetIntervalDuration gets the specified interval or the default value (1mn)

func (*TrafficControl) GetMaxIterations

func (t *TrafficControl) GetMaxIterations() int

GetMaxIterations gets the number of iterations or the default value (100)

func (*TrafficControl) GetMaxTrafficPercentage

func (t *TrafficControl) GetMaxTrafficPercentage() float64

GetMaxTrafficPercentage gets the specified max traffic percent or the default value (50)

func (*TrafficControl) GetOnSuccess

func (t *TrafficControl) GetOnSuccess() string

GetOnSuccess describes how the traffic must be split at the end of the experiment; Default is "candidate"

func (*TrafficControl) GetStepSize

func (t *TrafficControl) GetStepSize() float64

GetStepSize gets the specified step size or the default value (2%)

func (*TrafficControl) GetStrategy

func (t *TrafficControl) GetStrategy() string

GetStrategy gets the strategy used for traffic control. Default is "check_and_increment".

type TrafficSplit

type TrafficSplit struct {
	Baseline  int `json:"baseline"`
	Candidate int `json:"candidate"`
}

TrafficSplit specifies percentage of traffic to baseline vs candidate

func (*TrafficSplit) DeepCopy

func (in *TrafficSplit) DeepCopy() *TrafficSplit

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

func (*TrafficSplit) DeepCopyInto

func (in *TrafficSplit) DeepCopyInto(out *TrafficSplit)

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