v1beta1

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	// DeploymentStrategyAnnotation is annotation for deployment,
	// which is strategy fields of Advanced Deployment.
	DeploymentStrategyAnnotation = "rollouts.kruise.io/deployment-strategy"

	// DeploymentExtraStatusAnnotation is annotation for deployment,
	// which is extra status field of Advanced Deployment.
	DeploymentExtraStatusAnnotation = "rollouts.kruise.io/deployment-extra-status"

	// DeploymentStableRevisionLabel is label for deployment,
	// which record the stable revision during the current rolling process.
	DeploymentStableRevisionLabel = "rollouts.kruise.io/stable-revision"

	// AdvancedDeploymentControlLabel is label for deployment,
	// which labels whether the deployment is controlled by advanced-deployment-controller.
	AdvancedDeploymentControlLabel = "rollouts.kruise.io/controlled-by-advanced-deployment-controller"

	// OriginalDeploymentStrategyAnnotation is annotation for workload in BlueGreen Release,
	// it will store the original setting of the workload, which will be used to restore the workload
	OriginalDeploymentStrategyAnnotation = "rollouts.kruise.io/original-deployment-strategy"

	// MaxProgressSeconds is the value we set for ProgressDeadlineSeconds
	// MaxReadySeconds is the value we set for MinReadySeconds, which is one less than ProgressDeadlineSeconds
	// MaxInt32: 2147483647, ≈ 68 years
	MaxProgressSeconds = 1<<31 - 1
	MaxReadySeconds    = MaxProgressSeconds - 1
)
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"
)
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"

	// Finalise Reason
	// Finalise when the last batch is released and all pods will update to new version
	FinaliseReasonSuccess = "Success"
	// Finalise when rollback detected
	FinaliseReasonRollback = "Rollback"
	// Finalise when Continuous Release detected
	FinaliseReasonContinuous = "Continuous"
	// Finalise when Rollout is disabling
	FinaliseReasonDisalbed = "RolloutDisabled"
	// Finalise when Rollout is deleting
	FinaliseReasonDelete = "RolloutDeleting"
)

These are valid conditions of a rollout.

Variables

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

	// 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 IsRealPartition added in v0.6.0

func IsRealPartition(rollout *Rollout) bool

using single field EnableExtraWorkloadForCanary to distinguish partition-style from canary-style is not enough, for example, a v1alaph1 Rollout can be converted to v1beta1 Rollout with EnableExtraWorkloadForCanary set as true, even the objectRef is cloneset (which doesn't support canary release)

func Resource

func Resource(resource string) schema.GroupResource

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

func SetDefaultDeploymentStrategy

func SetDefaultDeploymentStrategy(strategy *DeploymentStrategy)

Types

type BatchRelease

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

	Spec   BatchReleaseSpec   `json:"spec,omitempty"`
	Status BatchReleaseStatus `json:"status,omitempty"`
}

func (*BatchRelease) DeepCopy

func (in *BatchRelease) DeepCopy() *BatchRelease

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

func (*BatchRelease) DeepCopyInto

func (in *BatchRelease) DeepCopyInto(out *BatchRelease)

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

func (*BatchRelease) DeepCopyObject

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

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

func (*BatchRelease) Hub

func (*BatchRelease) Hub()

type BatchReleaseBatchStateType

type BatchReleaseBatchStateType string
const (
	// UpgradingBatchState indicates that current batch is at upgrading pod state
	UpgradingBatchState BatchReleaseBatchStateType = "Upgrading"
	// VerifyingBatchState indicates that current batch is at verifying whether it's ready state
	VerifyingBatchState BatchReleaseBatchStateType = "Verifying"
	// ReadyBatchState indicates that current batch is at batch ready state
	ReadyBatchState BatchReleaseBatchStateType = "Ready"
)

type BatchReleaseCanaryStatus

type BatchReleaseCanaryStatus struct {
	// CurrentBatchState indicates the release state of the current batch.
	CurrentBatchState BatchReleaseBatchStateType `json:"batchState,omitempty"`
	// The current batch the rollout is working on/blocked, it starts from 0
	CurrentBatch int32 `json:"currentBatch"`
	// BatchReadyTime is the ready timestamp of the current batch or the last batch.
	// This field is updated once a batch ready, and the batches[x].pausedSeconds
	// relies on this field to calculate the real-time duration.
	BatchReadyTime *metav1.Time `json:"batchReadyTime,omitempty"`
	// UpdatedReplicas is the number of upgraded Pods.
	UpdatedReplicas int32 `json:"updatedReplicas,omitempty"`
	// UpdatedReadyReplicas is the number upgraded Pods that have a Ready Condition.
	UpdatedReadyReplicas int32 `json:"updatedReadyReplicas,omitempty"`
	// the number of pods that no need to rollback in rollback scene.
	NoNeedUpdateReplicas *int32 `json:"noNeedUpdateReplicas,omitempty"`
}

func (*BatchReleaseCanaryStatus) DeepCopy

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

func (*BatchReleaseCanaryStatus) DeepCopyInto

func (in *BatchReleaseCanaryStatus) DeepCopyInto(out *BatchReleaseCanaryStatus)

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

type BatchReleaseList

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

BatchReleaseList contains a list of BatchRelease +kubebuilder:object:root=true

func (*BatchReleaseList) DeepCopy

func (in *BatchReleaseList) DeepCopy() *BatchReleaseList

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

func (*BatchReleaseList) DeepCopyInto

func (in *BatchReleaseList) DeepCopyInto(out *BatchReleaseList)

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

func (*BatchReleaseList) DeepCopyObject

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

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

type BatchReleaseSpec

type BatchReleaseSpec struct {
	// WorkloadRef contains enough information to let you identify a workload for Rollout
	// Batch release of the bypass
	WorkloadRef ObjectRef `json:"workloadRef,omitempty"`
	// ReleasePlan is the details on how to rollout the resources
	ReleasePlan ReleasePlan `json:"releasePlan"`
}

BatchReleaseSpec defines how to describe an update between different compRevision

func (*BatchReleaseSpec) DeepCopy

func (in *BatchReleaseSpec) DeepCopy() *BatchReleaseSpec

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

func (*BatchReleaseSpec) DeepCopyInto

func (in *BatchReleaseSpec) DeepCopyInto(out *BatchReleaseSpec)

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

type BatchReleaseStatus

type BatchReleaseStatus struct {
	// Conditions represents the observed process state of each phase during executing the release plan.
	Conditions []RolloutCondition `json:"conditions,omitempty"`
	// CanaryStatus describes the state of the canary rollout.
	CanaryStatus BatchReleaseCanaryStatus `json:"canaryStatus,omitempty"`
	// StableRevision is the pod-template-hash of stable revision pod template.
	StableRevision string `json:"stableRevision,omitempty"`
	// UpdateRevision is the pod-template-hash of update revision pod template.
	UpdateRevision string `json:"updateRevision,omitempty"`
	// ObservedGeneration is the most recent generation observed for this BatchRelease.
	// It corresponds to this BatchRelease's generation, which is updated on mutation
	// by the API Server, and only if BatchRelease Spec was changed, its generation will increase 1.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// ObservedRolloutID is the most recent rollout-id observed for this BatchRelease.
	// If RolloutID was changed, we will restart to roll out from batch 0,
	// to ensure the batch-id and rollout-id labels of Pods are correct.
	ObservedRolloutID string `json:"observedRolloutID,omitempty"`
	// ObservedWorkloadReplicas is observed replicas of target referenced workload.
	// This field is designed to deal with scaling event during rollout, if this field changed,
	// it means that the workload is scaling during rollout.
	ObservedWorkloadReplicas int32 `json:"observedWorkloadReplicas,omitempty"`
	// Count of hash collisions for creating canary Deployment. The controller uses this
	// field as a collision avoidance mechanism when it needs to create the name for the
	// newest canary Deployment.
	// +optional
	CollisionCount *int32 `json:"collisionCount,omitempty"`
	// ObservedReleasePlanHash is a hash code of observed itself spec.releasePlan.
	ObservedReleasePlanHash string `json:"observedReleasePlanHash,omitempty"`
	// Phase is the release plan phase, which indicates the current state of release
	// plan state machine in BatchRelease controller.
	Phase RolloutPhase `json:"phase,omitempty"`
	// Message provides details on why the rollout is in its current phase
	Message string `json:"message,omitempty"`
}

BatchReleaseStatus defines the observed state of a release plan

func (*BatchReleaseStatus) DeepCopy

func (in *BatchReleaseStatus) DeepCopy() *BatchReleaseStatus

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

func (*BatchReleaseStatus) DeepCopyInto

func (in *BatchReleaseStatus) DeepCopyInto(out *BatchReleaseStatus)

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

type BlueGreenStatus added in v0.6.0

type BlueGreenStatus struct {
	CommonStatus `json:",inline"`
	// UpdatedRevision 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
	UpdatedRevision string `json:"updatedRevision"`
	// UpdatedReplicas the numbers of updated pods
	UpdatedReplicas int32 `json:"updatedReplicas"`
	// UpdatedReadyReplicas the numbers of updated ready pods
	UpdatedReadyReplicas int32 `json:"updatedReadyReplicas"`
}

BlueGreenStatus status fields that only pertain to the blueGreen rollout

func (*BlueGreenStatus) DeepCopy added in v0.6.0

func (in *BlueGreenStatus) DeepCopy() *BlueGreenStatus

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

func (*BlueGreenStatus) DeepCopyInto added in v0.6.0

func (in *BlueGreenStatus) DeepCopyInto(out *BlueGreenStatus)

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

type BlueGreenStrategy added in v0.6.0

type BlueGreenStrategy struct {
	// Steps define the order of phases to execute release in batches(20%, 40%, 60%, 80%, 100%)
	// +optional
	Steps []CanaryStep `json:"steps,omitempty"`
	// TrafficRoutings support ingress, gateway api and custom network resource(e.g. istio, apisix) 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"`
	// TrafficRoutingRef is TrafficRouting's Name
	TrafficRoutingRef string `json:"trafficRoutingRef,omitempty"`
	// canary service will not be generated if DisableGenerateCanaryService is true
	DisableGenerateCanaryService bool `json:"disableGenerateCanaryService,omitempty"`
}

BlueGreenStrategy defines parameters for Blue Green Release

func (*BlueGreenStrategy) DeepCopy added in v0.6.0

func (in *BlueGreenStrategy) DeepCopy() *BlueGreenStrategy

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

func (*BlueGreenStrategy) DeepCopyInto added in v0.6.0

func (in *BlueGreenStrategy) DeepCopyInto(out *BlueGreenStrategy)

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

type CanaryStatus

type CanaryStatus struct {
	// must be inline
	CommonStatus `json:",inline"`
	// 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"`
	// CanaryReplicas the numbers of canary revision pods
	CanaryReplicas int32 `json:"canaryReplicas"`
	// CanaryReadyReplicas the numbers of ready canary revision pods
	CanaryReadyReplicas int32 `json:"canaryReadyReplicas"`
}

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 (
	// the first step, handle some special cases before step upgrade, to prevent traffic loss
	CanaryStepStateInit            CanaryStepState = "BeforeStepUpgrade"
	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 support ingress, gateway api and custom network resource(e.g. istio, apisix) 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"`
	// If true, then it will create new deployment for canary, such as: workload-demo-canary.
	// When user verifies that the canary version is ready, we will remove the canary deployment and release the deployment workload-demo in full.
	// Current only support k8s native deployment
	EnableExtraWorkloadForCanary bool `json:"enableExtraWorkloadForCanary,omitempty"`
	// TrafficRoutingRef is TrafficRouting's Name
	TrafficRoutingRef string `json:"trafficRoutingRef,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 CommonStatus added in v0.6.0

type CommonStatus 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"`
	// pod template hash is used as service selector label
	PodTemplateHash string `json:"podTemplateHash"`
	// CurrentStepIndex defines the current step of the rollout is on.
	// +optional
	CurrentStepIndex int32 `json:"currentStepIndex"`
	// 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 useless and meaningless, which will be corrected
	// in the next reconciliation
	NextStepIndex int32 `json:"nextStepIndex"`
	// FinalisingStep the step of finalising
	FinalisingStep   FinalisingStepType `json:"finalisingStep"`
	CurrentStepState CanaryStepState    `json:"currentStepState"`
	Message          string             `json:"message,omitempty"`
	LastUpdateTime   *metav1.Time       `json:"lastUpdateTime,omitempty"`
}

fields in CommonStatus are shared between canary status and bluegreen status if a field is accessed in strategy-agnostic way, e.g. accessed from rollout_progressing.go, or rollout_status.go then it can be put into CommonStatus if a field is only accessed in strategy-specific way, e.g. accessed from rollout_canary.go or rollout_bluegreen.go then it should stay behind with CanaryStatus or BlueGreenStatus

func (*CommonStatus) DeepCopy added in v0.6.0

func (in *CommonStatus) DeepCopy() *CommonStatus

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

func (*CommonStatus) DeepCopyInto added in v0.6.0

func (in *CommonStatus) DeepCopyInto(out *CommonStatus)

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

type DeploymentExtraStatus

type DeploymentExtraStatus struct {
	// UpdatedReadyReplicas the number of pods that has been updated and ready.
	UpdatedReadyReplicas int32 `json:"updatedReadyReplicas,omitempty"`
	// ExpectedUpdatedReplicas is an absolute number calculated based on Partition
	// and Deployment.Spec.Replicas, means how many pods are expected be updated under
	// current strategy.
	// This field is designed to avoid users to fall into the details of algorithm
	// for Partition calculation.
	ExpectedUpdatedReplicas int32 `json:"expectedUpdatedReplicas,omitempty"`
}

DeploymentExtraStatus is extra status field for Advanced Deployment

func (*DeploymentExtraStatus) DeepCopy

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

func (*DeploymentExtraStatus) DeepCopyInto

func (in *DeploymentExtraStatus) DeepCopyInto(out *DeploymentExtraStatus)

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

type DeploymentStrategy

type DeploymentStrategy struct {
	// RollingStyle define the behavior of rolling for deployment.
	RollingStyle RollingStyleType `json:"rollingStyle,omitempty"`
	// original deployment strategy rolling update fields
	RollingUpdate *apps.RollingUpdateDeployment `json:"rollingUpdate,omitempty"`
	// Paused = true will block the upgrade of Pods
	Paused bool `json:"paused,omitempty"`
	// Partition describe how many Pods should be updated during rollout.
	// We use this field to implement partition-style rolling update.
	Partition intstr.IntOrString `json:"partition,omitempty"`
}

DeploymentStrategy is strategy field for Advanced Deployment

func (*DeploymentStrategy) DeepCopy

func (in *DeploymentStrategy) DeepCopy() *DeploymentStrategy

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

func (*DeploymentStrategy) DeepCopyInto

func (in *DeploymentStrategy) DeepCopyInto(out *DeploymentStrategy)

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

type FinalisingStepType added in v0.6.0

type FinalisingStepType string
const (
	// Route all traffic to new version (for bluegreen)
	FinalisingStepRouteTrafficToNew FinalisingStepType = "FinalisingStepRouteTrafficToNew"
	// Restore the GatewayAPI/Ingress/Istio
	FinalisingStepRouteTrafficToStable FinalisingStepType = "FinalisingStepRouteTrafficToStable"
	// Restore the stable Service, i.e. remove corresponding selector
	FinalisingStepRestoreStableService FinalisingStepType = "RestoreStableService"
	// Remove the Canary Service
	FinalisingStepRemoveCanaryService FinalisingStepType = "RemoveCanaryService"

	// Patch Batch Release to scale down (exception: the canary Deployment will be
	// scaled down in FinalisingStepTypeDeleteBR step)
	// For Both BlueGreenStrategy and CanaryStrategy:
	// set workload.pause=false, set workload.partition=0
	FinalisingStepResumeWorkload FinalisingStepType = "ResumeWorkload"
	// Delete Batch Release
	FinalisingStepReleaseWorkloadControl FinalisingStepType = "ReleaseWorkloadControl"
	// All needed work done
	FinalisingStepTypeEnd FinalisingStepType = "END"
	// Only for debugging use
	FinalisingStepWaitEndless FinalisingStepType = "WaitEndless"
)

type FinalizingPolicyType

type FinalizingPolicyType string
const (
	// WaitResumeFinalizingPolicyType will wait workload to be resumed, which means
	// controller will be hold at Finalizing phase until all pods of workload is upgraded.
	// WaitResumeFinalizingPolicyType only works in canary-style BatchRelease controller.
	WaitResumeFinalizingPolicyType FinalizingPolicyType = "WaitResume"
	// ImmediateFinalizingPolicyType will not to wait workload to be resumed.
	ImmediateFinalizingPolicyType FinalizingPolicyType = "Immediate"
)

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 {
	// Path specifies a HTTP request path matcher.
	// Supported list:
	// - Istio: https://istio.io/latest/docs/reference/config/networking/virtual-service/#HTTPMatchRequest
	// - GatewayAPI: If path is defined, the whole HttpRouteMatch will be used as a standalone matcher
	//
	// +optional
	Path *gatewayv1beta1.HTTPPathMatch `json:"path,omitempty"`

	// 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.
	//
	// +listType=map
	// +listMapKey=name
	// +optional
	// +kubebuilder:validation:MaxItems=16
	Headers []gatewayv1beta1.HTTPHeaderMatch `json:"headers,omitempty"`

	// QueryParams specifies HTTP query parameter matchers. Multiple match
	// values are ANDed together, meaning, a request must match all the
	// specified query parameters to select the route.
	// Supported list:
	// - Istio: https://istio.io/latest/docs/reference/config/networking/virtual-service/#HTTPMatchRequest
	// - MSE Ingress: https://help.aliyun.com/zh/ack/ack-managed-and-ack-dedicated/user-guide/annotations-supported-by-mse-ingress-gateways-1
	//   Header/Cookie > QueryParams
	// - Gateway API
	//
	// +listType=map
	// +listMapKey=name
	// +optional
	// +kubebuilder:validation:MaxItems=16
	QueryParams []gatewayv1beta1.HTTPQueryParamMatch `json:"queryParams,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 {
	// 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"`
}

ObjectRef holds a references to the Kubernetes object

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

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

func (*PatchPodTemplateMetadata) DeepCopy

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

func (*PatchPodTemplateMetadata) DeepCopyInto

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

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

type ReleaseBatch

type ReleaseBatch struct {
	// CanaryReplicas is the number of upgraded pods that should have in this batch.
	// it can be an absolute number (ex: 5) or a percentage of workload replicas.
	// batches[i].canaryReplicas should less than or equal to batches[j].canaryReplicas if i < j.
	CanaryReplicas intstr.IntOrString `json:"canaryReplicas"`
}

ReleaseBatch is used to describe how each batch release should be

func (*ReleaseBatch) DeepCopy

func (in *ReleaseBatch) DeepCopy() *ReleaseBatch

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

func (*ReleaseBatch) DeepCopyInto

func (in *ReleaseBatch) DeepCopyInto(out *ReleaseBatch)

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

type ReleasePlan

type ReleasePlan struct {
	// Batches is the details on each batch of the ReleasePlan.
	//Users can specify their batch plan in this field, such as:
	// batches:
	// - canaryReplicas: 1  # batches 0
	// - canaryReplicas: 2  # batches 1
	// - canaryReplicas: 5  # batches 2
	// Not that these canaryReplicas should be a non-decreasing sequence.
	// +optional
	Batches []ReleaseBatch `json:"batches"`
	// All pods in the batches up to the batchPartition (included) will have
	// the target resource specification while the rest still is the stable revision.
	// This is designed for the operators to manually rollout.
	// Default is nil, which means no partition and will release all batches.
	// BatchPartition start from 0.
	// +optional
	BatchPartition *int32 `json:"batchPartition,omitempty"`
	// RolloutID indicates an id for each rollout progress
	RolloutID string `json:"rolloutID,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"`
	// FinalizingPolicy define the behavior of controller when phase enter Finalizing
	// Defaults to "Immediate"
	FinalizingPolicy FinalizingPolicyType `json:"finalizingPolicy,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"`
	// RollingStyle can be "Canary", "Partiton" or "BlueGreen"
	RollingStyle RollingStyleType `json:"rollingStyle,omitempty"`
	// EnableExtraWorkloadForCanary indicates whether to create extra workload for canary
	// True corresponds to RollingStyle "Canary".
	// False corresponds to RollingStyle "Partiton".
	// Ignored in BlueGreen-style.
	// This field is about to deprecate, use RollingStyle instead.
	// If both of them are set, controller will only consider this
	// filed when RollingStyle is empty
	EnableExtraWorkloadForCanary bool `json:"enableExtraWorkloadForCanary"`
}

ReleasePlan fines the details of the release plan

func (*ReleasePlan) DeepCopy

func (in *ReleasePlan) DeepCopy() *ReleasePlan

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

func (*ReleasePlan) DeepCopyInto

func (in *ReleasePlan) DeepCopyInto(out *ReleasePlan)

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

type RollingStyleType

type RollingStyleType string
const (
	// PartitionRollingStyle means rolling in batches just like CloneSet, and will NOT create any extra Deployment;
	PartitionRollingStyle RollingStyleType = "Partition"
	// CanaryRollingStyle means rolling in canary way, and will create a canary Deployment.
	CanaryRollingStyle RollingStyleType = "Canary"
	// BlueGreenRollingStyle means rolling in blue-green way, and will NOT create a extra Deployment.
	BlueGreenRollingStyle RollingStyleType = "BlueGreen"
)

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.

func (*Rollout) Hub

func (*Rollout) Hub()

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 (
	// RolloutPhasePreparing indicates a rollout is preparing for next progress.
	RolloutPhasePreparing RolloutPhase = "Preparing"
	// RolloutPhaseFinalizing indicates a rollout is finalizing
	RolloutPhaseFinalizing RolloutPhase = "Finalizing"
	// RolloutPhaseCompleted indicates a rollout is completed/cancelled/terminated
	RolloutPhaseCompleted RolloutPhase = "Completed"
)
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
	// WorkloadRef contains enough information to let you identify a workload for Rollout
	// Batch release of the bypass
	WorkloadRef ObjectRef `json:"workloadRef"`
	// rollout strategy
	Strategy RolloutStrategy `json:"strategy"`
	// 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"`
	// BlueGreen describes the state of the blueGreen rollout
	// +optional
	BlueGreenStatus *BlueGreenStatus `json:"blueGreenStatus,omitempty"`
	// Conditions a list of conditions a rollout can have.
	// +optional
	Conditions []RolloutCondition `json:"conditions,omitempty"`
	// +optional
	//BlueGreenStatus *BlueGreenStatus `json:"blueGreenStatus,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"`
	// These two values will be synchronized with the same fileds in CanaryStatus or BlueGreeenStatus
	// mainly used to provide info for kubectl get command
	CurrentStepIndex int32           `json:"currentStepIndex"`
	CurrentStepState CanaryStepState `json:"currentStepState"`
}

RolloutStatus defines the observed state of Rollout

func (*RolloutStatus) Clear added in v0.6.0

func (r *RolloutStatus) Clear()

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.

func (*RolloutStatus) GetCanaryReadyReplicas added in v0.6.0

func (r *RolloutStatus) GetCanaryReadyReplicas() int32

func (*RolloutStatus) GetCanaryReplicas added in v0.6.0

func (r *RolloutStatus) GetCanaryReplicas() int32

func (*RolloutStatus) GetCanaryRevision added in v0.6.0

func (r *RolloutStatus) GetCanaryRevision() string

func (*RolloutStatus) GetSubStatus added in v0.6.0

func (r *RolloutStatus) GetSubStatus() *CommonStatus

GetSubStatus returns the ethier canary or bluegreen status

func (*RolloutStatus) IsSubStatusEmpty added in v0.6.0

func (r *RolloutStatus) IsSubStatusEmpty() bool

func (*RolloutStatus) SetCanaryReadyReplicas added in v0.6.0

func (r *RolloutStatus) SetCanaryReadyReplicas(replicas int32)

func (*RolloutStatus) SetCanaryReplicas added in v0.6.0

func (r *RolloutStatus) SetCanaryReplicas(replicas int32)

func (*RolloutStatus) SetCanaryRevision added in v0.6.0

func (r *RolloutStatus) SetCanaryRevision(revision string)

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"`
	// +optional
	BlueGreen *BlueGreenStrategy `json:"blueGreen,omitempty" protobuf:"bytes,1,opt,name=blueGreen"`
}

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.

func (*RolloutStrategy) DisableGenerateCanaryService added in v0.6.0

func (r *RolloutStrategy) DisableGenerateCanaryService() bool

Check the value of DisableGenerateCanaryService

func (*RolloutStrategy) GetRollingStyle added in v0.6.0

func (r *RolloutStrategy) GetRollingStyle() RollingStyleType

Get the rolling style based on the strategy

func (*RolloutStrategy) GetSteps added in v0.6.0

func (r *RolloutStrategy) GetSteps() []CanaryStep

Get the steps based on the rolling style

func (*RolloutStrategy) GetTrafficRouting added in v0.6.0

func (r *RolloutStrategy) GetTrafficRouting() []TrafficRoutingRef

Get the traffic routing based on the rolling style

func (*RolloutStrategy) HasTrafficRoutings added in v0.6.0

func (r *RolloutStrategy) HasTrafficRoutings() bool

Check if there are traffic routings

func (*RolloutStrategy) IsBlueGreenRelease added in v0.6.0

func (r *RolloutStrategy) IsBlueGreenRelease() bool

r.GetRollingStyle() == BlueGreenRollingStyle

func (*RolloutStrategy) IsCanaryStragegy added in v0.6.0

func (r *RolloutStrategy) IsCanaryStragegy() bool

r.GetRollingStyle() == CanaryRollingStyle || r.GetRollingStyle() == PartitionRollingStyle

func (*RolloutStrategy) IsEmptyRelease added in v0.6.0

func (r *RolloutStrategy) IsEmptyRelease() bool

type TrafficRoutingRef

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 []ObjectRef `json:"customNetworkRefs,omitempty"`
}

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

func (*TrafficRoutingRef) DeepCopy

func (in *TrafficRoutingRef) DeepCopy() *TrafficRoutingRef

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

func (*TrafficRoutingRef) DeepCopyInto

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

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

type TrafficRoutingStrategy

type TrafficRoutingStrategy struct {
	// Traffic indicate how many percentage of traffic the canary pods should receive
	// Value is of string type and is a percentage, e.g. 5%.
	// +optional
	Traffic *string `json:"traffic,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.HTTPHeaderFilter `json:"requestHeaderModifier,omitempty"`
	// Matches define conditions used for matching incoming HTTP requests to the canary service.
	// Each match is independent, i.e. this rule will be matched as long as **any** one of the matches is satisfied.
	//
	// It cannot support Traffic (weight-based routing) and Matches simultaneously, if both are configured.
	// In such cases, Matches takes precedence.
	Matches []HttpRouteMatch `json:"matches,omitempty"`
}

func (*TrafficRoutingStrategy) DeepCopy

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

func (*TrafficRoutingStrategy) DeepCopyInto

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

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
JackTT - Gopher 🇻🇳