v1beta1

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: Apache-2.0 Imports: 10 Imported by: 17

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
	MetricInterval          = "1m"
)
View Source
const (
	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"
)
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"`
}

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"`

	// 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 Canary

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

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

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

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

GetAnalysisInterval returns the canary analysis interval (default 60s)

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"`

	// 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 []istiov1alpha3.HTTPMatchRequest `json:"match,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"`

	// 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"`
}

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"
	// 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"`

	// 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"`

	// Hosts attached to the generated Istio virtual service
	// 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 *istiov1alpha3.TrafficPolicy `json:"trafficPolicy,omitempty"`

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

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

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

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

	// Cross-Origin Resource Sharing policy for the generated Istio virtual service
	// +optional
	CorsPolicy *istiov1alpha3.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.

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 CrossNamespaceObjectReference `json:"targetRef"`

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

	// Reference to NGINX ingress resource
	// +optional
	IngressRef *CrossNamespaceObjectReference `json:"ingressRef,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"`
}

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
	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"`

	// 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"`
}

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"`

	// 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 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"
	// PreRolloutHook 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"
)

type MetricTemplate

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

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

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"`
	Interval  string `json:"interval"`
}

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"`
}

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.

Jump to

Keyboard shortcuts

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