Documentation ¶
Overview ¶
Package v1alpha3 is the v1alpha3 version of the API. +groupName=flagger.app
Index ¶
Constants ¶
const ( CanaryKind = "Canary" ProgressDeadlineSeconds = 600 AnalysisInterval = 60 * time.Second MetricInterval = "1m" )
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: rollout.GroupName, Version: "v1alpha3"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type Canary ¶
type Canary struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec CanarySpec `json:"spec"` Status CanaryStatus `json:"status"` }
Canary is a specification for a Canary resource
func (*Canary) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Canary.
func (*Canary) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Canary) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Canary) GetAnalysisInterval ¶
GetAnalysisInterval returns the canary analysis interval (default 60s)
func (*Canary) GetMetricInterval ¶
GetMetricInterval returns the metric interval default value (1m)
func (*Canary) GetProgressDeadlineSeconds ¶
GetProgressDeadlineSeconds returns the progress deadline (default 600s)
type CanaryAnalysis ¶
type CanaryAnalysis struct { Interval string `json:"interval"` Threshold int `json:"threshold"` MaxWeight int `json:"maxWeight"` StepWeight int `json:"stepWeight"` Metrics []CanaryMetric `json:"metrics"` Webhooks []CanaryWebhook `json:"webhooks,omitempty"` Match []istiov1alpha3.HTTPMatchRequest `json:"match,omitempty"` Iterations int `json:"iterations,omitempty"` }
CanaryAnalysis is used to describe how the analysis should be done
func (*CanaryAnalysis) DeepCopy ¶
func (in *CanaryAnalysis) DeepCopy() *CanaryAnalysis
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanaryAnalysis.
func (*CanaryAnalysis) DeepCopyInto ¶
func (in *CanaryAnalysis) DeepCopyInto(out *CanaryAnalysis)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CanaryList ¶
type CanaryList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Canary `json:"items"` }
CanaryList is a list of Canary resources
func (*CanaryList) DeepCopy ¶
func (in *CanaryList) DeepCopy() *CanaryList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanaryList.
func (*CanaryList) DeepCopyInto ¶
func (in *CanaryList) DeepCopyInto(out *CanaryList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CanaryList) DeepCopyObject ¶
func (in *CanaryList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CanaryMetric ¶
type CanaryMetric struct { Name string `json:"name"` Interval string `json:"interval,omitempty"` Threshold float64 `json:"threshold"` // +optional Query string `json:"query,omitempty"` }
CanaryMetric holds the reference to Istio metrics used for canary analysis
func (*CanaryMetric) DeepCopy ¶
func (in *CanaryMetric) DeepCopy() *CanaryMetric
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanaryMetric.
func (*CanaryMetric) DeepCopyInto ¶
func (in *CanaryMetric) DeepCopyInto(out *CanaryMetric)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CanaryPhase ¶
type CanaryPhase string
CanaryPhase is a label for the condition of a canary at the current time
const ( // CanaryInitialized means the primary deployment, hpa and ClusterIP services // have been created along with the Istio virtual service CanaryInitialized CanaryPhase = "Initialized" // CanaryProgressing means the canary analysis is underway CanaryProgressing CanaryPhase = "Progressing" // CanarySucceeded means the canary analysis has been successful // and the canary deployment has been promoted CanarySucceeded CanaryPhase = "Succeeded" // CanaryFailed means the canary analysis failed // and the canary deployment has been scaled to zero CanaryFailed CanaryPhase = "Failed" )
type CanaryService ¶
type CanaryService struct { Port int32 `json:"port"` PortName string `json:"portName,omitempty"` Match []istiov1alpha3.HTTPMatchRequest `json:"match,omitempty"` Rewrite *istiov1alpha3.HTTPRewrite `json:"rewrite,omitempty"` Timeout string `json:"timeout,omitempty"` Retries *istiov1alpha3.HTTPRetry `json:"retries,omitempty"` Headers *istiov1alpha3.Headers `json:"headers,omitempty"` CorsPolicy *istiov1alpha3.CorsPolicy `json:"corsPolicy,omitempty"` //Istio Gateways []string `json:"gateways,omitempty"` Hosts []string `json:"hosts,omitempty"` // App Mesh MeshName string `json:"meshName,omitempty"` Backends []string `json:"backends,omitempty"` }
CanaryService is used to create ClusterIP services and Istio Virtual Service
func (*CanaryService) DeepCopy ¶
func (in *CanaryService) DeepCopy() *CanaryService
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanaryService.
func (*CanaryService) DeepCopyInto ¶
func (in *CanaryService) DeepCopyInto(out *CanaryService)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CanarySpec ¶
type CanarySpec struct { // reference to target resource TargetRef hpav1.CrossVersionObjectReference `json:"targetRef"` // reference to autoscaling resource // +optional AutoscalerRef *hpav1.CrossVersionObjectReference `json:"autoscalerRef,omitempty"` // virtual service spec Service CanaryService `json:"service"` // metrics and thresholds CanaryAnalysis CanaryAnalysis `json:"canaryAnalysis"` // the maximum time in seconds for a canary deployment to make progress // before it is considered to be failed. Defaults to ten minutes. ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"` // promote the canary without analysing it // +optional SkipAnalysis bool `json:"skipAnalysis,omitempty"` }
CanarySpec is the spec for a Canary resource
func (*CanarySpec) DeepCopy ¶
func (in *CanarySpec) DeepCopy() *CanarySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanarySpec.
func (*CanarySpec) DeepCopyInto ¶
func (in *CanarySpec) DeepCopyInto(out *CanarySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CanaryStatus ¶
type CanaryStatus struct { Phase CanaryPhase `json:"phase"` FailedChecks int `json:"failedChecks"` CanaryWeight int `json:"canaryWeight"` Iterations int `json:"iterations"` // +optional TrackedConfigs *map[string]string `json:"trackedConfigs,omitempty"` // +optional LastAppliedSpec string `json:"lastAppliedSpec,omitempty"` // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` }
CanaryStatus is used for state persistence (read-only)
func (*CanaryStatus) DeepCopy ¶
func (in *CanaryStatus) DeepCopy() *CanaryStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanaryStatus.
func (*CanaryStatus) DeepCopyInto ¶
func (in *CanaryStatus) DeepCopyInto(out *CanaryStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CanaryWebhook ¶
type CanaryWebhook struct { Name string `json:"name"` URL string `json:"url"` Timeout string `json:"timeout"` // +optional Metadata *map[string]string `json:"metadata,omitempty"` }
CanaryWebhook holds the reference to external checks used for canary analysis
func (*CanaryWebhook) DeepCopy ¶
func (in *CanaryWebhook) DeepCopy() *CanaryWebhook
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanaryWebhook.
func (*CanaryWebhook) DeepCopyInto ¶
func (in *CanaryWebhook) DeepCopyInto(out *CanaryWebhook)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CanaryWebhookPayload ¶
type CanaryWebhookPayload struct { Name string `json:"name"` Namespace string `json:"namespace"` Metadata map[string]string `json:"metadata,omitempty"` }
CanaryWebhookPayload holds the deployment info and metadata sent to webhooks
func (*CanaryWebhookPayload) DeepCopy ¶
func (in *CanaryWebhookPayload) DeepCopy() *CanaryWebhookPayload
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanaryWebhookPayload.
func (*CanaryWebhookPayload) DeepCopyInto ¶
func (in *CanaryWebhookPayload) DeepCopyInto(out *CanaryWebhookPayload)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.