v1beta1

package
v1.38.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 11 Imported by: 16

Documentation

Overview

Package v1beta1 is the v1alpha3 version of the API. +groupName=flagger.app

Index

Constants

View Source
const (
	CanaryKind              = "Canary"
	ProgressDeadlineSeconds = 600
	AnalysisInterval        = 60 * time.Second
	PrimaryReadyThreshold   = 100
	CanaryReadyThreshold    = 100
	MetricInterval          = "1m"
)
View Source
const (
	ApisixProvider     string = "apisix"
	AppMeshProvider    string = "appmesh"
	LinkerdProvider    string = "linkerd"
	IstioProvider      string = "istio"
	SMIProvider        string = "smi"
	ContourProvider    string = "contour"
	GlooProvider       string = "gloo"
	NGINXProvider      string = "nginx"
	KubernetesProvider string = "kubernetes"
	SkipperProvider    string = "skipper"
	TraefikProvider    string = "traefik"
	OsmProvider        string = "osm"
	KumaProvider       string = "kuma"
	GatewayAPIProvider string = "gatewayapi"
)
View Source
const (
	AlertProviderKind = "AlertProvider"
)
View Source
const (
	MetricTemplateKind = "MetricTemplate"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: flagger.GroupName, Version: "v1beta1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AlertProvider

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

	Spec   AlertProviderSpec   `json:"spec"`
	Status AlertProviderStatus `json:"status,omitempty"`
}

AlertProvider is the configuration of alerting for a specific provider

func (*AlertProvider) DeepCopy

func (in *AlertProvider) DeepCopy() *AlertProvider

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

func (*AlertProvider) DeepCopyInto

func (in *AlertProvider) DeepCopyInto(out *AlertProvider)

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

func (*AlertProvider) DeepCopyObject

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

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

type AlertProviderCondition

type AlertProviderCondition struct {
	// Type of this condition
	Type string `json:"type"`

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

	// LastUpdateTime of this condition
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`

	// LastTransitionTime of this condition
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`

	// Reason for the current status of this condition
	Reason string `json:"reason,omitempty"`

	// Message associated with this condition
	Message string `json:"message,omitempty"`
}

func (*AlertProviderCondition) DeepCopy

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

func (*AlertProviderCondition) DeepCopyInto

func (in *AlertProviderCondition) DeepCopyInto(out *AlertProviderCondition)

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

type AlertProviderList

type AlertProviderList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []AlertProvider `json:"items"`
}

AlertProviderList is a list of alert provider resources

func (*AlertProviderList) DeepCopy

func (in *AlertProviderList) DeepCopy() *AlertProviderList

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

func (*AlertProviderList) DeepCopyInto

func (in *AlertProviderList) DeepCopyInto(out *AlertProviderList)

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

func (*AlertProviderList) DeepCopyObject

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

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

type AlertProviderSpec

type AlertProviderSpec struct {
	// Type of provider
	Type string `json:"type"`

	// Alert channel for this provider
	// +optional
	Channel string `json:"channel,omitempty"`

	// Bot username for this provider
	// +optional
	Username string `json:"username,omitempty"`

	// HTTP(S) webhook address of this provider
	// +optional
	Address string `json:"address,omitempty"`

	// HTTP/S address of the proxy
	// +optional
	Proxy string `json:"proxy,omitempty"`

	// Secret reference containing the provider webhook URL
	// +optional
	SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
}

AlertProviderSpec is the specification of the desired behavior of the AlertProvider

func (*AlertProviderSpec) DeepCopy

func (in *AlertProviderSpec) DeepCopy() *AlertProviderSpec

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

func (*AlertProviderSpec) DeepCopyInto

func (in *AlertProviderSpec) DeepCopyInto(out *AlertProviderSpec)

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

type AlertProviderStatus

type AlertProviderStatus struct {
	// Conditions of this status
	Conditions []AlertProviderCondition `json:"conditions,omitempty"`
}

func (*AlertProviderStatus) DeepCopy

func (in *AlertProviderStatus) DeepCopy() *AlertProviderStatus

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

func (*AlertProviderStatus) DeepCopyInto

func (in *AlertProviderStatus) DeepCopyInto(out *AlertProviderStatus)

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

type AlertSeverity

type AlertSeverity string

AlertSeverity defines alert filtering based on severity levels

const (
	SeverityInfo  AlertSeverity = "info"
	SeverityWarn  AlertSeverity = "warn"
	SeverityError AlertSeverity = "error"
)

type AutoscalerRefernce added in v1.22.0

type AutoscalerRefernce struct {
	// API version of the scaler
	// +required
	APIVersion string `json:"apiVersion,omitempty"`

	// Kind of the scaler
	// +required
	Kind string `json:"kind,omitempty"`

	// Name of the scaler
	// +required
	Name string `json:"name"`

	// PrimaryScalerQueries maps a unique id to a query for the primary
	// scaler, if a scaler supports scaling using queries.
	// +optional
	PrimaryScalerQueries map[string]string `json:"primaryScalerQueries"`

	// PrimaryScalerReplicas defines overrides for the primary
	// autoscaler replicas.
	// +optional
	PrimaryScalerReplicas *ScalerReplicas `json:"primaryScalerReplicas,omitempty"`
}

func (*AutoscalerRefernce) DeepCopy added in v1.22.0

func (in *AutoscalerRefernce) DeepCopy() *AutoscalerRefernce

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

func (*AutoscalerRefernce) DeepCopyInto added in v1.22.0

func (in *AutoscalerRefernce) DeepCopyInto(out *AutoscalerRefernce)

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

type Canary

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

	Spec   CanarySpec   `json:"spec"`
	Status CanaryStatus `json:"status,omitempty"`
}

Canary is the configuration for a canary release, which automatically manages the bootstrap, analysis, traffic shifting, promotion or rollback of an app revision

func (*Canary) DeepCopy

func (in *Canary) DeepCopy() *Canary

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

func (*Canary) DeepCopyInto

func (in *Canary) DeepCopyInto(out *Canary)

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

func (*Canary) DeepCopyObject

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

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

func (*Canary) GetAnalysis

func (c *Canary) GetAnalysis() *CanaryAnalysis

GetAnalysis returns the analysis v1beta1 or v1alpha3 to be removed along with spec.canaryAnalysis in v1

func (*Canary) GetAnalysisCanaryReadyThreshold added in v1.18.0

func (c *Canary) GetAnalysisCanaryReadyThreshold() int

GetAnalysisCanaryReadyThreshold returns the canary canaryReadyThreshold (default 100)

func (*Canary) GetAnalysisInterval

func (c *Canary) GetAnalysisInterval() time.Duration

GetAnalysisInterval returns the canary analysis interval (default 60s)

func (*Canary) GetAnalysisPrimaryReadyThreshold added in v1.16.0

func (c *Canary) GetAnalysisPrimaryReadyThreshold() int

GetAnalysisPrimaryReadyThreshold returns the canary primaryReadyThreshold (default 100)

func (*Canary) GetAnalysisThreshold

func (c *Canary) GetAnalysisThreshold() int

GetAnalysisThreshold returns the canary threshold (default 1)

func (*Canary) GetMetricInterval

func (c *Canary) GetMetricInterval() string

GetMetricInterval returns the metric interval default value (1m)

func (*Canary) GetProgressDeadlineSeconds

func (c *Canary) GetProgressDeadlineSeconds() int

GetProgressDeadlineSeconds returns the progress deadline (default 600s)

func (*Canary) GetServiceNames

func (c *Canary) GetServiceNames() (apexName, primaryName, canaryName string)

GetServiceNames returns the apex, primary and canary Kubernetes service names

func (*Canary) SkipAnalysis

func (c *Canary) SkipAnalysis() bool

SkipAnalysis returns true if the analysis is nil or if spec.SkipAnalysis is true

type CanaryAlert

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

	// Severity level: info, warn, error (default info)
	Severity AlertSeverity `json:"severity,omitempty"`

	// Alert provider reference
	ProviderRef CrossNamespaceObjectReference `json:"providerRef"`
}

CanaryAlert defines an alert for this canary

func (*CanaryAlert) DeepCopy

func (in *CanaryAlert) DeepCopy() *CanaryAlert

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

func (*CanaryAlert) DeepCopyInto

func (in *CanaryAlert) DeepCopyInto(out *CanaryAlert)

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

type CanaryAnalysis

type CanaryAnalysis struct {
	// Schedule interval for this canary analysis
	Interval string `json:"interval"`

	// Number of checks to run for A/B Testing and Blue/Green
	// +optional
	Iterations int `json:"iterations,omitempty"`

	// Enable traffic mirroring for Blue/Green
	// +optional
	Mirror bool `json:"mirror,omitempty"`

	// Weight of the traffic to be mirrored in the range of [0, 100].
	// +optional
	MirrorWeight int `json:"mirrorWeight,omitempty"`

	// Max traffic weight routed to canary
	// +optional
	MaxWeight int `json:"maxWeight,omitempty"`

	// Incremental traffic weight step for analysis phase
	// +optional
	StepWeight int `json:"stepWeight,omitempty"`

	// Incremental traffic weight steps for analysis phase
	// +optional
	StepWeights []int `json:"stepWeights,omitempty"`

	// Incremental traffic weight step for promotion phase
	// +optional
	StepWeightPromotion int `json:"stepWeightPromotion,omitempty"`

	// Max number of failed checks before the canary is terminated
	Threshold int `json:"threshold"`

	// Percentage of pods that need to be available to consider primary as ready
	PrimaryReadyThreshold *int `json:"primaryReadyThreshold,omitempty"`

	// Percentage of pods that need to be available to consider canary as ready
	CanaryReadyThreshold *int `json:"canaryReadyThreshold,omitempty"`

	// Alert list for this canary analysis
	Alerts []CanaryAlert `json:"alerts,omitempty"`

	// Metric check list for this canary analysis
	// +optional
	Metrics []CanaryMetric `json:"metrics,omitempty"`

	// Webhook list for this canary  analysis
	// +optional
	Webhooks []CanaryWebhook `json:"webhooks,omitempty"`

	// A/B testing HTTP header match conditions
	// +optional
	Match []istiov1beta1.HTTPMatchRequest `json:"match,omitempty"`

	// SessionAffinity represents the session affinity settings for a canary run.
	// +optional
	SessionAffinity *SessionAffinity `json:"sessionAffinity,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 CanaryCondition

type CanaryCondition struct {
	// Type of this condition
	Type CanaryConditionType `json:"type"`

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

	// LastUpdateTime of this condition
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`

	// LastTransitionTime of this condition
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`

	// Reason for the current status of this condition
	Reason string `json:"reason,omitempty"`

	// Message associated with this condition
	Message string `json:"message,omitempty"`
}

CanaryCondition is a status condition for a Canary

func (*CanaryCondition) DeepCopy

func (in *CanaryCondition) DeepCopy() *CanaryCondition

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

func (*CanaryCondition) DeepCopyInto

func (in *CanaryCondition) DeepCopyInto(out *CanaryCondition)

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

type CanaryConditionType

type CanaryConditionType string

CanaryConditionType is the type of a CanaryCondition

const (
	// PromotedType refers to the result of the last canary analysis
	PromotedType CanaryConditionType = "Promoted"
)

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 of the metric
	Name string `json:"name"`

	// Interval represents the windows size
	Interval string `json:"interval,omitempty"`

	// Deprecated: Max value accepted for this metric (replaced by ThresholdRange)
	Threshold float64 `json:"threshold,omitempty"`

	// Range value accepted for this metric
	// +optional
	ThresholdRange *CanaryThresholdRange `json:"thresholdRange,omitempty"`

	// Deprecated: Prometheus query for this metric (replaced by TemplateRef)
	// +optional
	Query string `json:"query,omitempty"`

	// TemplateRef references a metric template object
	// +optional
	TemplateRef *CrossNamespaceObjectReference `json:"templateRef,omitempty"`

	// TemplateVariables provides a map of key/value pairs that can be used to inject variables into a metric query.
	// +optional
	TemplateVariables map[string]string `json:"templateVariables,omitempty"`
}

CanaryMetric holds the reference to 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 (
	// CanaryPhaseInitializing means the canary initializing is underway
	CanaryPhaseInitializing CanaryPhase = "Initializing"
	// CanaryPhaseInitialized means the primary deployment, hpa and ClusterIP services
	// have been created along with the service mesh or ingress objects
	CanaryPhaseInitialized CanaryPhase = "Initialized"
	// CanaryPhaseWaiting means the canary rollout is paused (waiting for confirmation to proceed)
	CanaryPhaseWaiting CanaryPhase = "Waiting"
	// CanaryPhaseProgressing means the canary analysis is underway
	CanaryPhaseProgressing CanaryPhase = "Progressing"
	// CanaryPhaseWaitingPromotion means the canary promotion is paused (waiting for confirmation to proceed)
	CanaryPhaseWaitingPromotion CanaryPhase = "WaitingPromotion"
	// CanaryPhasePromoting means the canary analysis is finished and the primary spec has been updated
	CanaryPhasePromoting CanaryPhase = "Promoting"
	// CanaryPhaseFinalising means the canary promotion is finished and traffic has been routed back to primary
	CanaryPhaseFinalising CanaryPhase = "Finalising"
	// CanaryPhaseSucceeded means the canary analysis has been successful
	// and the canary deployment has been promoted
	CanaryPhaseSucceeded CanaryPhase = "Succeeded"
	// CanaryPhaseFailed means the canary analysis failed
	// and the canary deployment has been scaled to zero
	CanaryPhaseFailed CanaryPhase = "Failed"
	// CanaryPhaseTerminating means the canary has been marked
	// for deletion and in the finalizing state
	CanaryPhaseTerminating CanaryPhase = "Terminating"
	// CanaryPhaseTerminated means the canary has been finalized
	// and successfully deleted
	CanaryPhaseTerminated CanaryPhase = "Terminated"
)

type CanaryService

type CanaryService struct {
	// Name of the Kubernetes service generated by Flagger
	// Defaults to CanarySpec.TargetRef.Name
	// +optional
	Name string `json:"name,omitempty"`

	// Port of the generated Kubernetes service
	Port int32 `json:"port"`

	// Port name of the generated Kubernetes service
	// Defaults to http
	// +optional
	PortName string `json:"portName,omitempty"`

	// Target port number or name of the generated Kubernetes service
	// Defaults to CanaryService.Port
	// +optional
	TargetPort intstr.IntOrString `json:"targetPort,omitempty"`

	// AppProtocol of the service
	// https://kubernetes.io/docs/concepts/services-networking/service/#application-protocol
	// +optional
	AppProtocol string `json:"appProtocol,omitempty"`

	// PortDiscovery adds all container ports to the generated Kubernetes service
	PortDiscovery bool `json:"portDiscovery"`

	// Timeout of the HTTP or gRPC request
	// +optional
	Timeout string `json:"timeout,omitempty"`

	// Gateways attached to the generated Istio virtual service
	// Defaults to the internal mesh gateway
	// +optional
	Gateways []string `json:"gateways,omitempty"`

	// Gateways that the HTTPRoute needs to attach itself to.
	// Must be specified while using the Gateway API as a provider.
	// +optional
	GatewayRefs []v1beta1.ParentReference `json:"gatewayRefs,omitempty"`

	// Hosts attached to the generated Istio virtual service or Gateway API HTTPRoute.
	// Defaults to the service name
	// +optional
	Hosts []string `json:"hosts,omitempty"`

	// If enabled, Flagger would generate Istio VirtualServices without hosts and gateway,
	// making the service compatible with Istio delegation. Note that pilot env
	// `PILOT_ENABLE_VIRTUAL_SERVICE_DELEGATE` must also be set.
	// +optional
	Delegation bool `json:"delegation,omitempty"`

	// TrafficPolicy attached to the generated Istio destination rules
	// +optional
	TrafficPolicy *istiov1beta1.TrafficPolicy `json:"trafficPolicy,omitempty"`

	// URI match conditions for the generated service
	// +optional
	Match []istiov1beta1.HTTPMatchRequest `json:"match,omitempty"`

	// Rewrite HTTP URIs for the generated service
	// +optional
	Rewrite *HTTPRewrite `json:"rewrite,omitempty"`

	// Retries policy for the generated virtual service
	// +optional
	Retries *istiov1beta1.HTTPRetry `json:"retries,omitempty"`

	// Headers operations for the generated Istio virtual service
	// +optional
	Headers *istiov1beta1.Headers `json:"headers,omitempty"`

	// Mirror specifies the destination for request mirroring.
	// Responses from this destination are dropped.
	Mirror []v1beta1.HTTPRequestMirrorFilter `json:"mirror,omitempty"`

	// Cross-Origin Resource Sharing policy for the generated Istio virtual service
	// +optional
	CorsPolicy *istiov1beta1.CorsPolicy `json:"corsPolicy,omitempty"`

	// Mesh name of the generated App Mesh virtual nodes and virtual service
	// +optional
	MeshName string `json:"meshName,omitempty"`

	// Backends of the generated App Mesh virtual nodes
	// +optional
	Backends []string `json:"backends,omitempty"`

	// Apex is metadata to add to the apex service
	// +optional
	Apex *CustomMetadata `json:"apex,omitempty"`

	// Primary is the metadata to add to the primary service
	// +optional
	Primary *CustomMetadata `json:"primary,omitempty"`

	// Canary is the metadata to add to the canary service
	// +optional
	Canary *CustomMetadata `json:"canary,omitempty"`
}

CanaryService defines how ClusterIP services, service mesh or ingress routing objects are generated

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.

func (*CanaryService) GetIstioRewrite added in v1.34.0

func (s *CanaryService) GetIstioRewrite() *istiov1beta1.HTTPRewrite

GetIstioRewrite returns a istiov1beta1.HTTPRewrite object.

type CanarySpec

type CanarySpec struct {
	// Provider overwrites the -mesh-provider flag for this particular canary
	// +optional
	Provider string `json:"provider,omitempty"`

	// MetricsServer overwrites the -metrics-server flag for this particular canary
	// +optional
	MetricsServer string `json:"metricsServer,omitempty"`

	// TargetRef references a target resource
	TargetRef LocalObjectReference `json:"targetRef"`

	// AutoscalerRef references an autoscaling resource
	// +optional
	AutoscalerRef *AutoscalerRefernce `json:"autoscalerRef,omitempty"`

	// Reference to NGINX ingress resource
	// +optional
	IngressRef *LocalObjectReference `json:"ingressRef,omitempty"`

	// Reference to APISIX route resource
	// +optional
	RouteRef *LocalObjectReference `json:"routeRef,omitempty"`

	// Reference to Gloo Upstream resource. Upstream config is copied from
	// the referenced upstream to the upstreams generated by flagger.
	// +optional
	UpstreamRef *CrossNamespaceObjectReference `json:"upstreamRef,omitempty"`

	// Service defines how ClusterIP services, service mesh or ingress routing objects are generated
	Service CanaryService `json:"service"`

	// Analysis defines the validation process of a release
	Analysis *CanaryAnalysis `json:"analysis,omitempty"`

	// Deprecated: replaced by Analysis
	CanaryAnalysis *CanaryAnalysis `json:"canaryAnalysis,omitempty"`

	// ProgressDeadlineSeconds represents the maximum time in seconds for a
	// canary deployment to make progress before it is considered to be failed
	// +optional
	ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"`

	// SkipAnalysis promotes the canary without analysing it
	// +optional
	SkipAnalysis bool `json:"skipAnalysis,omitempty"`

	// revert canary mutation on deletion of canary resource
	// +optional
	RevertOnDeletion bool `json:"revertOnDeletion,omitempty"`

	// Suspend, if set to true will suspend the Canary, disabling any canary runs
	// regardless of any changes to its target, services, etc. Note that if the
	// Canary is suspended during an analysis, its paused until the Canary is unsuspended.
	// +optional
	Suspend bool `json:"suspend,omitempty"`
}

CanarySpec is the specification of the desired behavior of the Canary

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
	PreviousSessionAffinityCookie string `json:"previousSessionAffinityCookie,omitempty"`
	// +optional
	SessionAffinityCookie string `json:"sessionAffinityCookie,omitempty"`
	// +optional
	TrackedConfigs *map[string]string `json:"trackedConfigs,omitempty"`
	// +optional
	LastAppliedSpec string `json:"lastAppliedSpec,omitempty"`
	// +optional
	LastPromotedSpec string `json:"lastPromotedSpec,omitempty"`
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// +optional
	Conditions []CanaryCondition `json:"conditions,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 CanaryThresholdRange

type CanaryThresholdRange struct {
	// Minimum value
	// +optional
	Min *float64 `json:"min,omitempty"`

	// Maximum value
	// +optional
	Max *float64 `json:"max,omitempty"`
}

CanaryThresholdRange defines the range used for metrics validation

func (*CanaryThresholdRange) DeepCopy

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

func (*CanaryThresholdRange) DeepCopyInto

func (in *CanaryThresholdRange) DeepCopyInto(out *CanaryThresholdRange)

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

type CanaryWebhook

type CanaryWebhook struct {
	// Type of this webhook
	Type HookType `json:"type"`

	// Name of this webhook
	Name string `json:"name"`

	// URL address of this webhook
	URL string `json:"url"`

	// MuteAlert mutes all alerts generated from this webhook, if any
	MuteAlert bool `json:"muteAlert"`

	// Request timeout for this webhook
	Timeout string `json:"timeout,omitempty"`

	// Metadata (key-value pairs) for this webhook
	// +optional
	Metadata *map[string]string `json:"metadata,omitempty"`

	// Number of retries for this webhook
	// +optional
	Retries int `json:"retries,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 of the canary
	Name string `json:"name"`

	// Namespace of the canary
	Namespace string `json:"namespace"`

	// Phase of the canary analysis
	Phase CanaryPhase `json:"phase"`

	// Hash from the TrackedConfigs and LastAppliedSpec of the Canary.
	// Can be used to identify a Canary for a specific configuration of the
	// deployed resources.
	Checksum string `json:"checksum"`

	// Metadata (key-value pairs) for this webhook
	Metadata map[string]string `json:"metadata,omitempty"`
}

CanaryWebhookPayload holds the deployment info and metadata sent to webhooks

func (*CanaryWebhookPayload) DeepCopy

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.

type CrossNamespaceObjectReference

type CrossNamespaceObjectReference struct {
	// API version of the referent
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`

	// Kind of the referent
	// +optional
	Kind string `json:"kind,omitempty"`

	// Name of the referent
	Name string `json:"name"`

	// Namespace of the referent
	// +optional
	Namespace string `json:"namespace,omitempty"`
}

CrossNamespaceObjectReference contains enough information to let you locate the typed referenced object at cluster level

func (*CrossNamespaceObjectReference) DeepCopy

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

func (*CrossNamespaceObjectReference) DeepCopyInto

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

type CustomMetadata

type CustomMetadata struct {
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
}

CustomMetadata holds labels and annotations to set on generated objects.

func (*CustomMetadata) DeepCopy

func (in *CustomMetadata) DeepCopy() *CustomMetadata

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

func (*CustomMetadata) DeepCopyInto

func (in *CustomMetadata) DeepCopyInto(out *CustomMetadata)

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

type HTTPRewrite added in v1.34.0

type HTTPRewrite struct {
	// rewrite the path (or the prefix) portion of the URI with this
	// value. If the original URI was matched based on prefix, the value
	// provided in this field will replace the corresponding matched prefix.
	Uri string `json:"uri,omitempty"`

	// rewrite the Authority/Host header with this value.
	Authority string `json:"authority,omitempty"`

	// Type is the type of path modification to make.
	// +optional
	Type string `json:"type,omitempty"`
}

HTTPRewrite holds information about how to modify a request URI during forwarding.

func (*HTTPRewrite) DeepCopy added in v1.34.0

func (in *HTTPRewrite) DeepCopy() *HTTPRewrite

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

func (*HTTPRewrite) DeepCopyInto added in v1.34.0

func (in *HTTPRewrite) DeepCopyInto(out *HTTPRewrite)

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

func (*HTTPRewrite) GetType added in v1.34.0

func (r *HTTPRewrite) GetType() string

GetType returns the type of HTTP path rewrite to be performed.

type HookType

type HookType string

HookType can be pre, post or during rollout

const (
	// RolloutHook execute webhook during the canary analysis
	RolloutHook HookType = "rollout"
	// PreRolloutHook execute webhook before routing traffic to canary
	PreRolloutHook HookType = "pre-rollout"
	// PostRolloutHook execute webhook after the canary analysis
	PostRolloutHook HookType = "post-rollout"
	// ConfirmRolloutHook halt canary analysis until webhook returns HTTP 200
	ConfirmRolloutHook HookType = "confirm-rollout"
	// ConfirmPromotionHook halt canary promotion until webhook returns HTTP 200
	ConfirmPromotionHook HookType = "confirm-promotion"
	// EventHook dispatches Flagger events to the specified endpoint
	EventHook HookType = "event"
	// RollbackHook rollback canary analysis if webhook returns HTTP 200
	RollbackHook HookType = "rollback"
	// ConfirmTrafficIncreaseHook increases traffic weight if webhook returns HTTP 200
	ConfirmTrafficIncreaseHook = "confirm-traffic-increase"
)

type LocalObjectReference added in v1.21.0

type LocalObjectReference struct {
	// API version of the referent
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`

	// Kind of the referent
	// +optional
	Kind string `json:"kind,omitempty"`

	// Name of the referent
	Name string `json:"name"`
}

LocalObjectReference contains enough information to let you locate the typed referenced object in the same namespace.

func (*LocalObjectReference) DeepCopy added in v1.21.0

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

func (*LocalObjectReference) DeepCopyInto added in v1.21.0

func (in *LocalObjectReference) DeepCopyInto(out *LocalObjectReference)

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

type MetricTemplate

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

	Spec   MetricTemplateSpec   `json:"spec"`
	Status MetricTemplateStatus `json:"status,omitempty"`
}

MetricTemplate is a specification for a canary analysis metric

func (*MetricTemplate) DeepCopy

func (in *MetricTemplate) DeepCopy() *MetricTemplate

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

func (*MetricTemplate) DeepCopyInto

func (in *MetricTemplate) DeepCopyInto(out *MetricTemplate)

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

func (*MetricTemplate) DeepCopyObject

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

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

type MetricTemplateCondition

type MetricTemplateCondition struct {
	// Type of this condition
	Type string `json:"type"`

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

	// LastUpdateTime of this condition
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`

	// LastTransitionTime of this condition
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`

	// Reason for the current status of this condition
	Reason string `json:"reason,omitempty"`

	// Message associated with this condition
	Message string `json:"message,omitempty"`
}

func (*MetricTemplateCondition) DeepCopy

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

func (*MetricTemplateCondition) DeepCopyInto

func (in *MetricTemplateCondition) DeepCopyInto(out *MetricTemplateCondition)

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

type MetricTemplateList

type MetricTemplateList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []MetricTemplate `json:"items"`
}

MetricTemplateList is a list of metric template resources

func (*MetricTemplateList) DeepCopy

func (in *MetricTemplateList) DeepCopy() *MetricTemplateList

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

func (*MetricTemplateList) DeepCopyInto

func (in *MetricTemplateList) DeepCopyInto(out *MetricTemplateList)

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

func (*MetricTemplateList) DeepCopyObject

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

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

type MetricTemplateModel

type MetricTemplateModel struct {
	Name      string            `json:"name"`
	Namespace string            `json:"namespace"`
	Target    string            `json:"target"`
	Service   string            `json:"service"`
	Ingress   string            `json:"ingress"`
	Route     string            `json:"route"`
	Interval  string            `json:"interval"`
	Variables map[string]string `json:"variables"`
}

MetricTemplateModel is the query template model

func (*MetricTemplateModel) DeepCopy

func (in *MetricTemplateModel) DeepCopy() *MetricTemplateModel

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

func (*MetricTemplateModel) DeepCopyInto

func (in *MetricTemplateModel) DeepCopyInto(out *MetricTemplateModel)

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

func (*MetricTemplateModel) TemplateFunctions

func (mtm *MetricTemplateModel) TemplateFunctions() template.FuncMap

TemplateFunctions returns a map of functions, one for each model field

type MetricTemplateProvider

type MetricTemplateProvider struct {
	// Type of provider
	Type string `json:"type,omitempty"`

	// HTTP(S) address of this provider
	// +optional
	Address string `json:"address,omitempty"`

	// Secret reference containing the provider credentials
	// +optional
	SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`

	// Region of the provider
	// +optional
	Region string `json:"region,omitempty"`

	// InsecureSkipVerify disables certificate verification for the provider
	// +optional
	InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"`
}

MetricProvider is the spec for a MetricProvider resource

func (*MetricTemplateProvider) DeepCopy

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

func (*MetricTemplateProvider) DeepCopyInto

func (in *MetricTemplateProvider) DeepCopyInto(out *MetricTemplateProvider)

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

type MetricTemplateSpec

type MetricTemplateSpec struct {
	// Provider of this metric
	Provider MetricTemplateProvider `json:"provider,omitempty"`

	// Query template for this metric
	Query string `json:"query,omitempty"`
}

MetricTemplateSpec is the spec for a metric template resource

func (*MetricTemplateSpec) DeepCopy

func (in *MetricTemplateSpec) DeepCopy() *MetricTemplateSpec

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

func (*MetricTemplateSpec) DeepCopyInto

func (in *MetricTemplateSpec) DeepCopyInto(out *MetricTemplateSpec)

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

type MetricTemplateStatus

type MetricTemplateStatus struct {
	// Conditions of this status
	Conditions []MetricTemplateCondition `json:"conditions,omitempty"`
}

func (*MetricTemplateStatus) DeepCopy

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

func (*MetricTemplateStatus) DeepCopyInto

func (in *MetricTemplateStatus) DeepCopyInto(out *MetricTemplateStatus)

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

type ScalerReplicas added in v1.28.0

type ScalerReplicas struct {
	// +optional
	MinReplicas *int32 `json:"minReplicas,omitempty"`
	// +optional
	MaxReplicas *int32 `json:"maxReplicas,omitempty"`
}

ScalerReplicas holds overrides for autoscaler replicas

func (*ScalerReplicas) DeepCopy added in v1.28.0

func (in *ScalerReplicas) DeepCopy() *ScalerReplicas

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

func (*ScalerReplicas) DeepCopyInto added in v1.28.0

func (in *ScalerReplicas) DeepCopyInto(out *ScalerReplicas)

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

type SessionAffinity added in v1.25.0

type SessionAffinity struct {
	// CookieName is the key that will be used for the session affinity cookie.
	CookieName string `json:"cookieName,omitempty"`
	// MaxAge indicates the number of seconds until the session affinity cookie will expire.
	// ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#attributes
	// The default value is 86,400 seconds, i.e. a day.
	// +optional
	MaxAge int `json:"maxAge,omitempty"`
}

func (*SessionAffinity) DeepCopy added in v1.25.0

func (in *SessionAffinity) DeepCopy() *SessionAffinity

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

func (*SessionAffinity) DeepCopyInto added in v1.25.0

func (in *SessionAffinity) DeepCopyInto(out *SessionAffinity)

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

func (*SessionAffinity) GetMaxAge added in v1.25.0

func (s *SessionAffinity) GetMaxAge() int

GetMaxAge returns the max age of a cookie in seconds.

Jump to

Keyboard shortcuts

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