v1alpha1

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

+k8s:openapi-gen=true +groupName=rollouts.kruise.io

Package v1alpha1 contains API Schema definitions for the apps v1alpha1 API group +kubebuilder:object:generate=true +groupName=rollouts.kruise.io

Index

Constants

View Source
const (
	// RolloutIDLabel is set to workload labels.
	// RolloutIDLabel is designed to distinguish each workload revision publications.
	// The value of RolloutIDLabel corresponds Rollout.Spec.RolloutID.
	RolloutIDLabel = "rollouts.kruise.io/rollout-id"

	// RolloutBatchIDLabel is patched in pod labels.
	// RolloutBatchIDLabel is the label key of batch id that will be patched to pods during rollout.
	// Only when RolloutIDLabel is set, RolloutBatchIDLabel will be patched.
	// Users can use RolloutIDLabel and RolloutBatchIDLabel to select the pods that are upgraded in some certain batch and release.
	RolloutBatchIDLabel = "rollouts.kruise.io/rollout-batch-id"

	// RollbackInBatchAnnotation is set to rollout annotations.
	// RollbackInBatchAnnotation allow use disable quick rollback, and will roll back in batch style.
	RollbackInBatchAnnotation = "rollouts.kruise.io/rollback-in-batch"

	// RolloutStyleAnnotation define the rolling behavior for Deployment.
	// must be "partition" or "canary":
	// * "partition" means rolling in batches just like CloneSet, and will NOT create any extra Workload;
	// * "canary" means rolling in canary way, and will create a canary Workload.
	// Currently, only Deployment support both "partition" and "canary" rolling styles.
	// For other workload types, they only support "partition" styles.
	// Defaults to "canary" to Deployment.
	// Defaults to "partition" to the others.
	RolloutStyleAnnotation = "rollouts.kruise.io/rolling-style"

	// TrafficRoutingAnnotation is the TrafficRouting Name, and it is the Rollout's TrafficRouting.
	// The Rollout release will trigger the TrafficRouting release. For example:
	// A microservice consists of three applications, and the invocation relationship is as follows: a -> b -> c,
	// and application(a, b, c)'s gateway is trafficRouting. Any application(a, b or b) release will trigger TrafficRouting release.
	TrafficRoutingAnnotation = "rollouts.kruise.io/trafficrouting"
)
View Source
const (
	// RolloutConditionProgressing means the rollout is progressing. Progress for a rollout is
	// considered when a new replica set is created or adopted, when pods scale
	// up or old pods scale down, or when the services are updated. Progress is not estimated
	// for paused rollouts.
	RolloutConditionProgressing RolloutConditionType = "Progressing"
	// Progressing Reason
	ProgressingReasonInitializing = "Initializing"
	ProgressingReasonInRolling    = "InRolling"
	ProgressingReasonFinalising   = "Finalising"
	ProgressingReasonCompleted    = "Completed"
	ProgressingReasonCancelling   = "Cancelling"
	ProgressingReasonPaused       = "Paused"

	// RolloutConditionSucceeded indicates whether rollout is succeeded or failed.
	RolloutConditionSucceeded RolloutConditionType = "Succeeded"

	// Terminating condition
	RolloutConditionTerminating RolloutConditionType = "Terminating"
	// Terminating Reason
	TerminatingReasonInTerminating = "InTerminating"
	TerminatingReasonCompleted     = "Completed"
)

These are valid conditions of a rollout.

View Source
const (
	ProgressingRolloutFinalizerPrefix = "progressing.rollouts.kruise.io"
)

Variables

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

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

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme

	SchemeGroupVersion = GroupVersion
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

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

Types

type CanaryStatus

type CanaryStatus struct {
	// observedWorkloadGeneration is the most recent generation observed for this Rollout ref workload generation.
	ObservedWorkloadGeneration int64 `json:"observedWorkloadGeneration,omitempty"`
	// ObservedRolloutID will record the newest spec.RolloutID if status.canaryRevision equals to workload.updateRevision
	ObservedRolloutID string `json:"observedRolloutID,omitempty"`
	// RolloutHash from rollout.spec object
	RolloutHash string `json:"rolloutHash,omitempty"`
	// StableRevision indicates the revision of stable pods
	StableRevision string `json:"stableRevision,omitempty"`
	// CanaryRevision is calculated by rollout based on podTemplateHash, and the internal logic flow uses
	// It may be different from rs podTemplateHash in different k8s versions, so it cannot be used as service selector label
	CanaryRevision string `json:"canaryRevision"`
	// pod template hash is used as service selector label
	PodTemplateHash string `json:"podTemplateHash"`
	// CanaryReplicas the numbers of canary revision pods
	CanaryReplicas int32 `json:"canaryReplicas"`
	// CanaryReadyReplicas the numbers of ready canary revision pods
	CanaryReadyReplicas int32 `json:"canaryReadyReplicas"`
	// NextStepIndex defines the next step of the rollout is on.
	// In normal case, NextStepIndex is equal to CurrentStepIndex + 1
	// If the current step is the last step, NextStepIndex is equal to -1
	// Before the release, NextStepIndex is also equal to -1
	// 0 is not used and won't appear in any case
	// It is allowed to patch NextStepIndex by design,
	// e.g. if CurrentStepIndex is 2, user can patch NextStepIndex to 3 (if exists) to
	// achieve batch jump, or patch NextStepIndex to 1 to implement a re-execution of step 1
	// Patching it with a non-positive value is meaningless, which will be corrected
	// in the next reconciliation
	// achieve batch jump, or patch NextStepIndex to 1 to implement a re-execution of step 1
	NextStepIndex int32 `json:"nextStepIndex"`
	// +optional
	CurrentStepIndex int32             `json:"currentStepIndex"`
	CurrentStepState CanaryStepState   `json:"currentStepState"`
	Message          string            `json:"message,omitempty"`
	LastUpdateTime   *metav1.Time      `json:"lastUpdateTime,omitempty"`
	FinalisingStep   FinalizeStateType `json:"finalisingStep"`
}

CanaryStatus status fields that only pertain to the canary rollout

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 CanaryStep

type CanaryStep struct {
	TrafficRoutingStrategy `json:",inline"`
	// Replicas is the number of expected canary pods in this batch
	// it can be an absolute number (ex: 5) or a percentage of total pods.
	Replicas *intstr.IntOrString `json:"replicas,omitempty"`
	// Pause defines a pause stage for a rollout, manual or auto
	// +optional
	Pause RolloutPause `json:"pause,omitempty"`
}

CanaryStep defines a step of a canary workload.

func (*CanaryStep) DeepCopy

func (in *CanaryStep) DeepCopy() *CanaryStep

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

func (*CanaryStep) DeepCopyInto

func (in *CanaryStep) DeepCopyInto(out *CanaryStep)

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

type CanaryStepState

type CanaryStepState string
const (
	CanaryStepStateUpgrade         CanaryStepState = "StepUpgrade"
	CanaryStepStateTrafficRouting  CanaryStepState = "StepTrafficRouting"
	CanaryStepStateMetricsAnalysis CanaryStepState = "StepMetricsAnalysis"
	CanaryStepStatePaused          CanaryStepState = "StepPaused"
	CanaryStepStateReady           CanaryStepState = "StepReady"
	CanaryStepStateCompleted       CanaryStepState = "Completed"
)

type CanaryStrategy

type CanaryStrategy struct {
	// Steps define the order of phases to execute release in batches(20%, 40%, 60%, 80%, 100%)
	// +optional
	Steps []CanaryStep `json:"steps,omitempty"`
	// TrafficRoutings hosts all the supported service meshes supported to enable more fine-grained traffic routing
	// and current only support one TrafficRouting
	TrafficRoutings []TrafficRoutingRef `json:"trafficRoutings,omitempty"`
	// FailureThreshold indicates how many failed pods can be tolerated in all upgraded pods.
	// Only when FailureThreshold are satisfied, Rollout can enter ready state.
	// If FailureThreshold is nil, Rollout will use the MaxUnavailable of workload as its
	// FailureThreshold.
	// Defaults to nil.
	FailureThreshold *intstr.IntOrString `json:"failureThreshold,omitempty"`
	// PatchPodTemplateMetadata indicates patch configuration(e.g. labels, annotations) to the canary deployment podTemplateSpec.metadata
	// only support for canary deployment
	// +optional
	PatchPodTemplateMetadata *PatchPodTemplateMetadata `json:"patchPodTemplateMetadata,omitempty"`
	// canary service will not be generated if DisableGenerateCanaryService is true
	DisableGenerateCanaryService bool `json:"disableGenerateCanaryService,omitempty"`
}

CanaryStrategy defines parameters for a Replica Based Canary

func (*CanaryStrategy) DeepCopy

func (in *CanaryStrategy) DeepCopy() *CanaryStrategy

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

func (*CanaryStrategy) DeepCopyInto

func (in *CanaryStrategy) DeepCopyInto(out *CanaryStrategy)

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

type CustomNetworkRef added in v0.5.1

type CustomNetworkRef struct {
	APIVersion string `json:"apiVersion"`
	Kind       string `json:"kind"`
	Name       string `json:"name"`
}

func (*CustomNetworkRef) DeepCopy added in v0.5.1

func (in *CustomNetworkRef) DeepCopy() *CustomNetworkRef

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

func (*CustomNetworkRef) DeepCopyInto added in v0.5.1

func (in *CustomNetworkRef) DeepCopyInto(out *CustomNetworkRef)

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

type FinalizeStateType added in v0.5.1

type FinalizeStateType string

type GatewayTrafficRouting

type GatewayTrafficRouting struct {
	// HTTPRouteName refers to the name of an `HTTPRoute` resource in the same namespace as the `Rollout`
	HTTPRouteName *string `json:"httpRouteName,omitempty"`
}

GatewayTrafficRouting configuration for gateway api

func (*GatewayTrafficRouting) DeepCopy

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

func (*GatewayTrafficRouting) DeepCopyInto

func (in *GatewayTrafficRouting) DeepCopyInto(out *GatewayTrafficRouting)

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

type HttpRouteMatch

type HttpRouteMatch struct {
	// Headers specifies HTTP request header matchers. Multiple match values are
	// ANDed together, meaning, a request must match all the specified headers
	// to select the route.
	// +kubebuilder:validation:MaxItems=16
	Headers []gatewayv1beta1.HTTPHeaderMatch `json:"headers,omitempty"`
}

func (*HttpRouteMatch) DeepCopy

func (in *HttpRouteMatch) DeepCopy() *HttpRouteMatch

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

func (*HttpRouteMatch) DeepCopyInto

func (in *HttpRouteMatch) DeepCopyInto(out *HttpRouteMatch)

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

type IngressTrafficRouting

type IngressTrafficRouting struct {
	// ClassType refers to the type of `Ingress`.
	// current support nginx, aliyun-alb. default is nginx.
	// +optional
	ClassType string `json:"classType,omitempty"`
	// Name refers to the name of an `Ingress` resource in the same namespace as the `Rollout`
	Name string `json:"name"`
}

IngressTrafficRouting configuration for ingress controller to control traffic routing

func (*IngressTrafficRouting) DeepCopy

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

func (*IngressTrafficRouting) DeepCopyInto

func (in *IngressTrafficRouting) DeepCopyInto(out *IngressTrafficRouting)

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

type ObjectRef

type ObjectRef struct {
	// WorkloadRef contains enough information to let you identify a workload for Rollout
	// Batch release of the bypass
	WorkloadRef *WorkloadRef `json:"workloadRef,omitempty"`
}

func (*ObjectRef) DeepCopy

func (in *ObjectRef) DeepCopy() *ObjectRef

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

func (*ObjectRef) DeepCopyInto

func (in *ObjectRef) DeepCopyInto(out *ObjectRef)

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

type PatchPodTemplateMetadata added in v0.4.2

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

func (*PatchPodTemplateMetadata) DeepCopy added in v0.4.2

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

func (*PatchPodTemplateMetadata) DeepCopyInto added in v0.4.2

func (in *PatchPodTemplateMetadata) DeepCopyInto(out *PatchPodTemplateMetadata)

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

type Rollout

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

	Spec   RolloutSpec   `json:"spec,omitempty"`
	Status RolloutStatus `json:"status,omitempty"`
}

Rollout is the Schema for the rollouts API

func (*Rollout) DeepCopy

func (in *Rollout) DeepCopy() *Rollout

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

func (*Rollout) DeepCopyInto

func (in *Rollout) DeepCopyInto(out *Rollout)

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

func (*Rollout) DeepCopyObject

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

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

type RolloutCondition

type RolloutCondition struct {
	// Type of rollout condition.
	Type RolloutConditionType `json:"type"`
	// Phase of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`
	// The last time this condition was updated.
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// The reason for the condition's last transition.
	Reason string `json:"reason"`
	// A human readable message indicating details about the transition.
	Message string `json:"message"`
}

RolloutCondition describes the state of a rollout at a certain point.

func (*RolloutCondition) DeepCopy

func (in *RolloutCondition) DeepCopy() *RolloutCondition

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

func (*RolloutCondition) DeepCopyInto

func (in *RolloutCondition) DeepCopyInto(out *RolloutCondition)

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

type RolloutConditionType

type RolloutConditionType string

RolloutConditionType defines the conditions of Rollout

type RolloutList

type RolloutList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Rollout `json:"items"`
}

RolloutList contains a list of Rollout

func (*RolloutList) DeepCopy

func (in *RolloutList) DeepCopy() *RolloutList

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

func (*RolloutList) DeepCopyInto

func (in *RolloutList) DeepCopyInto(out *RolloutList)

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

func (*RolloutList) DeepCopyObject

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

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

type RolloutPause

type RolloutPause struct {
	// Duration the amount of time to wait before moving to the next step.
	// +optional
	Duration *int32 `json:"duration,omitempty"`
}

RolloutPause defines a pause stage for a rollout

func (*RolloutPause) DeepCopy

func (in *RolloutPause) DeepCopy() *RolloutPause

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

func (*RolloutPause) DeepCopyInto

func (in *RolloutPause) DeepCopyInto(out *RolloutPause)

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

type RolloutPhase

type RolloutPhase string

RolloutPhase are a set of phases that this rollout

const (
	// RolloutPhaseInitial indicates a rollout is Initial
	RolloutPhaseInitial RolloutPhase = "Initial"
	// RolloutPhaseHealthy indicates a rollout is healthy
	RolloutPhaseHealthy RolloutPhase = "Healthy"
	// RolloutPhaseProgressing indicates a rollout is not yet healthy but still making progress towards a healthy state
	RolloutPhaseProgressing RolloutPhase = "Progressing"
	// RolloutPhaseTerminating indicates a rollout is terminated
	RolloutPhaseTerminating RolloutPhase = "Terminating"
	// RolloutPhaseDisabled indicates a rollout is disabled
	RolloutPhaseDisabled RolloutPhase = "Disabled"
	// RolloutPhaseDisabling indicates a rollout is disabling and releasing resources
	RolloutPhaseDisabling RolloutPhase = "Disabling"
)

type RolloutSpec

type RolloutSpec struct {
	// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	// ObjectRef indicates workload
	ObjectRef ObjectRef `json:"objectRef"`
	// rollout strategy
	Strategy RolloutStrategy `json:"strategy"`
	// DeprecatedRolloutID is the deprecated field.
	// It is recommended that configure RolloutId in workload.annotations[rollouts.kruise.io/rollout-id].
	// RolloutID should be changed before each workload revision publication.
	// It is to distinguish consecutive multiple workload publications and rollout progress.
	DeprecatedRolloutID string `json:"rolloutID,omitempty"`
	// if a rollout disabled, then the rollout would not watch changes of workload
	//+kubebuilder:validation:Optional
	//+kubebuilder:default=false
	Disabled bool `json:"disabled"`
}

RolloutSpec defines the desired state of Rollout

func (*RolloutSpec) DeepCopy

func (in *RolloutSpec) DeepCopy() *RolloutSpec

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

func (*RolloutSpec) DeepCopyInto

func (in *RolloutSpec) DeepCopyInto(out *RolloutSpec)

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

type RolloutStatus

type RolloutStatus struct {

	// observedGeneration is the most recent generation observed for this Rollout.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Canary describes the state of the canary rollout
	// +optional
	CanaryStatus *CanaryStatus `json:"canaryStatus,omitempty"`
	// Conditions a list of conditions a rollout can have.
	// +optional
	Conditions []RolloutCondition `json:"conditions,omitempty"`
	// Phase is the rollout phase.
	Phase RolloutPhase `json:"phase,omitempty"`
	// Message provides details on why the rollout is in its current phase
	Message string `json:"message,omitempty"`
}

RolloutStatus defines the observed state of Rollout

func (*RolloutStatus) DeepCopy

func (in *RolloutStatus) DeepCopy() *RolloutStatus

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

func (*RolloutStatus) DeepCopyInto

func (in *RolloutStatus) DeepCopyInto(out *RolloutStatus)

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

type RolloutStrategy

type RolloutStrategy struct {
	// Paused indicates that the Rollout is paused.
	// Default value is false
	Paused bool `json:"paused,omitempty"`
	// +optional
	Canary *CanaryStrategy `json:"canary,omitempty"`
}

RolloutStrategy defines strategy to apply during next rollout

func (*RolloutStrategy) DeepCopy

func (in *RolloutStrategy) DeepCopy() *RolloutStrategy

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

func (*RolloutStrategy) DeepCopyInto

func (in *RolloutStrategy) DeepCopyInto(out *RolloutStrategy)

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

type TrafficRouting

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

	Spec   TrafficRoutingSpec   `json:"spec,omitempty"`
	Status TrafficRoutingStatus `json:"status,omitempty"`
}

TrafficRouting is the Schema for the TrafficRoutings API

func (*TrafficRouting) DeepCopy

func (in *TrafficRouting) DeepCopy() *TrafficRouting

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

func (*TrafficRouting) DeepCopyInto

func (in *TrafficRouting) DeepCopyInto(out *TrafficRouting)

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

func (*TrafficRouting) DeepCopyObject added in v0.4.2

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

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

type TrafficRoutingList added in v0.4.2

type TrafficRoutingList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []TrafficRouting `json:"items"`
}

TrafficRoutingList contains a list of TrafficRouting

func (*TrafficRoutingList) DeepCopy added in v0.4.2

func (in *TrafficRoutingList) DeepCopy() *TrafficRoutingList

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

func (*TrafficRoutingList) DeepCopyInto added in v0.4.2

func (in *TrafficRoutingList) DeepCopyInto(out *TrafficRoutingList)

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

func (*TrafficRoutingList) DeepCopyObject added in v0.4.2

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

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

type TrafficRoutingPhase added in v0.4.2

type TrafficRoutingPhase string

TrafficRoutingPhase are a set of phases that this rollout

const (
	// TrafficRoutingPhaseInitial indicates a traffic routing is Initial
	TrafficRoutingPhaseInitial TrafficRoutingPhase = "Initial"
	// TrafficRoutingPhaseHealthy indicates a traffic routing is healthy.
	// This means that Ingress and Service Resources exist.
	TrafficRoutingPhaseHealthy TrafficRoutingPhase = "Healthy"
	// TrafficRoutingPhaseProgressing indicates a traffic routing is not yet healthy but still making progress towards a healthy state
	TrafficRoutingPhaseProgressing TrafficRoutingPhase = "Progressing"
	// TrafficRoutingPhaseFinalizing indicates the trafficRouting progress is complete, and is running recycle operations.
	TrafficRoutingPhaseFinalizing TrafficRoutingPhase = "Finalizing"
	// TrafficRoutingPhaseTerminating indicates a traffic routing is terminated
	TrafficRoutingPhaseTerminating TrafficRoutingPhase = "Terminating"
)

type TrafficRoutingRef added in v0.4.2

type TrafficRoutingRef struct {
	// Service holds the name of a service which selects pods with stable version and don't select any pods with canary version.
	Service string `json:"service"`
	// Optional duration in seconds the traffic provider(e.g. nginx ingress controller) consumes the service, ingress configuration changes gracefully.
	// +kubebuilder:default=3
	GracePeriodSeconds int32 `json:"gracePeriodSeconds,omitempty"`
	// Ingress holds Ingress specific configuration to route traffic, e.g. Nginx, Alb.
	Ingress *IngressTrafficRouting `json:"ingress,omitempty"`
	// Gateway holds Gateway specific configuration to route traffic
	// Gateway configuration only supports >= v0.4.0 (v1alpha2).
	Gateway *GatewayTrafficRouting `json:"gateway,omitempty"`
	// CustomNetworkRefs hold a list of custom providers to route traffic
	CustomNetworkRefs []CustomNetworkRef `json:"customNetworkRefs,omitempty"`
}

TrafficRoutingRef hosts all the different configuration for supported service meshes to enable more fine-grained traffic routing

func (*TrafficRoutingRef) DeepCopy added in v0.4.2

func (in *TrafficRoutingRef) DeepCopy() *TrafficRoutingRef

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

func (*TrafficRoutingRef) DeepCopyInto added in v0.4.2

func (in *TrafficRoutingRef) DeepCopyInto(out *TrafficRoutingRef)

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

type TrafficRoutingSpec added in v0.4.2

type TrafficRoutingSpec struct {

	// ObjectRef indicates trafficRouting ref
	ObjectRef []TrafficRoutingRef `json:"objectRef"`
	// trafficrouting strategy
	Strategy TrafficRoutingStrategy `json:"strategy"`
}

func (*TrafficRoutingSpec) DeepCopy added in v0.4.2

func (in *TrafficRoutingSpec) DeepCopy() *TrafficRoutingSpec

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

func (*TrafficRoutingSpec) DeepCopyInto added in v0.4.2

func (in *TrafficRoutingSpec) DeepCopyInto(out *TrafficRoutingSpec)

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

type TrafficRoutingStatus added in v0.4.2

type TrafficRoutingStatus struct {

	// observedGeneration is the most recent generation observed for this Rollout.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Phase is the trafficRouting phase.
	Phase TrafficRoutingPhase `json:"phase,omitempty"`
	// Message provides details on why the rollout is in its current phase
	Message string `json:"message,omitempty"`
}

func (*TrafficRoutingStatus) DeepCopy added in v0.4.2

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

func (*TrafficRoutingStatus) DeepCopyInto added in v0.4.2

func (in *TrafficRoutingStatus) DeepCopyInto(out *TrafficRoutingStatus)

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

type TrafficRoutingStrategy added in v0.4.2

type TrafficRoutingStrategy struct {
	// Weight indicate how many percentage of traffic the canary pods should receive
	// +optional
	Weight *int32 `json:"weight,omitempty"`
	// Set overwrites the request with the given header (name, value)
	// before the action.
	//
	// Input:
	//   GET /foo HTTP/1.1
	//   my-header: foo
	//
	// requestHeaderModifier:
	//   set:
	//   - name: "my-header"
	//     value: "bar"
	//
	// Output:
	//   GET /foo HTTP/1.1
	//   my-header: bar
	//
	// +optional
	RequestHeaderModifier *gatewayv1beta1.HTTPRequestHeaderFilter `json:"requestHeaderModifier,omitempty"`
	// Matches define conditions used for matching the incoming HTTP requests to canary service.
	// Each match is independent, i.e. this rule will be matched if **any** one of the matches is satisfied.
	// If Gateway API, current only support one match.
	// And cannot support both weight and matches, if both are configured, then matches takes precedence.
	Matches []HttpRouteMatch `json:"matches,omitempty"`
}

func (*TrafficRoutingStrategy) DeepCopy added in v0.4.2

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

func (*TrafficRoutingStrategy) DeepCopyInto added in v0.4.2

func (in *TrafficRoutingStrategy) DeepCopyInto(out *TrafficRoutingStrategy)

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

type WorkloadRef

type WorkloadRef struct {
	// API Version of the referent
	APIVersion string `json:"apiVersion"`
	// Kind of the referent
	Kind string `json:"kind"`
	// Name of the referent
	Name string `json:"name"`
}

WorkloadRef holds a references to the Kubernetes object

func (*WorkloadRef) DeepCopy

func (in *WorkloadRef) DeepCopy() *WorkloadRef

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

func (*WorkloadRef) DeepCopyInto

func (in *WorkloadRef) DeepCopyInto(out *WorkloadRef)

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