Documentation ¶
Index ¶
- Constants
- func DurationFromInt(i int) *intstr.IntOrString
- func DurationFromString(s string) *intstr.IntOrString
- type AnalysisRunStrategy
- type AntiAffinity
- type ArgumentValueFrom
- type CanaryStatus
- type CanaryStep
- type CanaryStrategy
- type FieldRef
- type ObjectRef
- type PauseCondition
- type PauseReason
- type PingPongSpec
- type PingPongType
- type PodTemplateMetadata
- type PreferredDuringSchedulingIgnoredDuringExecution
- type ReplicaSetSpecRef
- type RequiredDuringSchedulingIgnoredDuringExecution
- type Rollout
- type RolloutCondition
- type RolloutConditionType
- type RolloutInterface
- type RolloutList
- type RolloutPause
- type RolloutPhase
- type RolloutSpec
- type RolloutStatus
- type RolloutStrategy
- type RolloutsGetter
- type SetCanaryScale
- type StickinessConfig
- type StringMatch
- type ValueFromPodTemplateHash
- type WeightDestination
Constants ¶
const ( // DefaultRolloutUniqueLabelKey is the default key of the selector that is added // to existing ReplicaSets (and label key that is added to its pods) to prevent the existing ReplicaSets // to select new pods (and old pods being select by new ReplicaSet). DefaultRolloutUniqueLabelKey string = "rollouts-pod-template-hash" // DefaultReplicaSetScaleDownDeadlineAnnotationKey is the default key attached to an old stable ReplicaSet after // the rollout transitioned to a new version. It contains the time when the controller can scale down the RS. DefaultReplicaSetScaleDownDeadlineAnnotationKey = "scale-down-deadline" // LabelKeyControllerInstanceID is the label the controller uses for the rollout, experiment, analysis segregation // between controllers. Controllers will only operate on objects with the same instanceID as the controller. LabelKeyControllerInstanceID = "argo-rollouts.argoproj.io/controller-instance-id" )
const ( // RolloutTypeLabel indicates how the rollout created the analysisRun RolloutTypeLabel = "rollout-type" // RolloutTypeStepLabel indicates that the analysisRun was created as a canary step RolloutTypeStepLabel = "Step" // RolloutTypeBackgroundRunLabel indicates that the analysisRun was created in Background to an execution RolloutTypeBackgroundRunLabel = "Background" // RolloutTypePrePromotionLabel indicates that the analysisRun was created before the active service promotion RolloutTypePrePromotionLabel = "PrePromotion" // RolloutTypePostPromotionLabel indicates that the analysisRun was created after the active service promotion RolloutTypePostPromotionLabel = "PostPromotion" // RolloutCanaryStepIndexLabel indicates which step created this analysisRun RolloutCanaryStepIndexLabel = "step-index" )
Variables ¶
This section is empty.
Functions ¶
func DurationFromInt ¶
func DurationFromInt(i int) *intstr.IntOrString
DurationFromInt creates duration in seconds from int value
func DurationFromString ¶
func DurationFromString(s string) *intstr.IntOrString
DurationFromString creates duration from string value must be a string representation of an int with optional time unit (see time.ParseDuration)
Types ¶
type AnalysisRunStrategy ¶
type AnalysisRunStrategy struct { // SuccessfulRunHistoryLimit limits the number of old successful analysis runs and experiments to be retained in a history SuccessfulRunHistoryLimit *int32 `json:"successfulRunHistoryLimit,omitempty" protobuf:"varint,1,opt,name=successfulRunHistoryLimit"` // UnsuccessfulRunHistoryLimit limits the number of old unsuccessful analysis runs and experiments to be retained in a history. // Stages for unsuccessful: "Error", "Failed", "Inconclusive" UnsuccessfulRunHistoryLimit *int32 `json:"unsuccessfulRunHistoryLimit,omitempty" protobuf:"varint,2,opt,name=unsuccessfulRunHistoryLimit"` }
AnalysisRunStrategy configuration for the analysis runs and experiments to retain
type AntiAffinity ¶
type AntiAffinity struct { // +optional PreferredDuringSchedulingIgnoredDuringExecution *PreferredDuringSchedulingIgnoredDuringExecution `` /* 140-byte string literal not displayed */ // +optional RequiredDuringSchedulingIgnoredDuringExecution *RequiredDuringSchedulingIgnoredDuringExecution `` /* 138-byte string literal not displayed */ }
AntiAffinity defines which inter-pod scheduling rule to use for anti-affinity injection
func (*AntiAffinity) DeepCopy ¶
func (in *AntiAffinity) DeepCopy() *AntiAffinity
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AntiAffinity.
func (*AntiAffinity) DeepCopyInto ¶
func (in *AntiAffinity) DeepCopyInto(out *AntiAffinity)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ArgumentValueFrom ¶
type ArgumentValueFrom struct { // PodTemplateHashValue gets the value from one of the children ReplicaSet's Pod Template Hash PodTemplateHashValue *ValueFromPodTemplateHash `json:"podTemplateHashValue,omitempty" protobuf:"bytes,1,opt,name=podTemplateHashValue,casttype=ValueFromPodTemplateHash"` //FieldRef FieldRef *FieldRef `json:"fieldRef,omitempty" protobuf:"bytes,2,opt,name=fieldRef"` }
ArgumentValueFrom defines references to fields within resources to grab for the value (i.e. Pod Template Hash)
type CanaryStatus ¶
type CanaryStatus struct{}
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 { // SetWeight 流量 + 副本数, 都需要根据这个做出调整,我们目前暂不支持流量,只支持副本数,所以目前和 SetCanaryScale.Weight 作用一样 SetWeight *int32 `json:"setWeight,omitempty" protobuf:"varint,1,opt,name=setWeight"` // Pause freezes the rollout by setting spec.Paused to true. // A Rollout will resume when spec.Paused is reset to false. // +optional Pause *RolloutPause `json:"pause,omitempty" protobuf:"bytes,2,opt,name=pause"` // SetCanaryScale defines how to scale the newRS without changing traffic weight // +optional SetCanaryScale *SetCanaryScale `json:"setCanaryScale,omitempty" protobuf:"bytes,5,opt,name=setCanaryScale"` }
CanaryStep defines a step of a canary deployment.
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 CanaryStrategy ¶
type CanaryStrategy struct { Steps []CanaryStep `json:"steps,omitempty" protobuf:"bytes,3,rep,name=steps"` MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,6,opt,name=maxSurge"` // CanaryMetadata specify labels and annotations which will be attached to the canary pods for // the duration which they act as a canary, and will be removed after CanaryMetadata *PodTemplateMetadata `json:"canaryMetadata,omitempty" protobuf:"bytes,9,opt,name=canaryMetadata"` // StableMetadata specify labels and annotations which will be attached to the stable pods for // the duration which they act as a canary, and will be removed after StableMetadata *PodTemplateMetadata `json:"stableMetadata,omitempty" protobuf:"bytes,10,opt,name=stableMetadata"` }
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 FieldRef ¶
type FieldRef struct { // Required: Path of the field to select in the specified API version FieldPath string `json:"fieldPath" protobuf:"bytes,1,opt,name=fieldPath"` }
func (*FieldRef) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FieldRef.
func (*FieldRef) DeepCopyInto ¶
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,omitempty" protobuf:"bytes,1,opt,name=apiVersion"` // Kind of the referent Kind string `json:"kind,omitempty" protobuf:"bytes,2,opt,name=kind"` // Name of the referent Name string `json:"name,omitempty" protobuf:"bytes,3,opt,name=name"` }
ObjectRef holds a references to the Kubernetes object
func (*ObjectRef) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectRef.
func (*ObjectRef) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PauseCondition ¶
type PauseCondition struct { Reason PauseReason `json:"reason" protobuf:"bytes,1,opt,name=reason,casttype=PauseReason"` StartTime metav1.Time `json:"startTime" protobuf:"bytes,2,opt,name=startTime"` }
PauseCondition the reason for a pause and when it started
func (*PauseCondition) DeepCopy ¶
func (in *PauseCondition) DeepCopy() *PauseCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PauseCondition.
func (*PauseCondition) DeepCopyInto ¶
func (in *PauseCondition) DeepCopyInto(out *PauseCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PauseReason ¶
type PauseReason string
PauseReason reasons that the rollout can pause
const ( // PauseReasonInconclusiveAnalysis pauses rollout when rollout has an inconclusive analysis run PauseReasonInconclusiveAnalysis PauseReason = "InconclusiveAnalysisRun" // PauseReasonCanaryPauseStep pause rollout for canary pause step PauseReasonCanaryPauseStep PauseReason = "CanaryPauseStep" )
type PingPongSpec ¶
type PingPongSpec struct { // name of the ping service PingService string `json:"pingService" protobuf:"bytes,1,opt,name=pingService"` // name of the pong service PongService string `json:"pongService" protobuf:"bytes,2,opt,name=pongService"` }
PingPongSpec holds the ping and pong service name.
func (*PingPongSpec) DeepCopy ¶
func (in *PingPongSpec) DeepCopy() *PingPongSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PingPongSpec.
func (*PingPongSpec) DeepCopyInto ¶
func (in *PingPongSpec) DeepCopyInto(out *PingPongSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PingPongType ¶
type PingPongType string
const ( PPPing PingPongType = "ping" PPPong PingPongType = "pong" )
type PodTemplateMetadata ¶
type PodTemplateMetadata struct { // Labels Additional labels to add to the experiment // +optional Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,1,rep,name=labels"` // Annotations additional annotations to add to the experiment // +optional Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,2,rep,name=annotations"` }
PodTemplateMetadata extra labels to add to the template
func (*PodTemplateMetadata) DeepCopy ¶
func (in *PodTemplateMetadata) DeepCopy() *PodTemplateMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodTemplateMetadata.
func (*PodTemplateMetadata) DeepCopyInto ¶
func (in *PodTemplateMetadata) DeepCopyInto(out *PodTemplateMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PreferredDuringSchedulingIgnoredDuringExecution ¶
type PreferredDuringSchedulingIgnoredDuringExecution struct { // Weight associated with matching the corresponding podAffinityTerm, in the range 1-100. Weight int32 `json:"weight" protobuf:"varint,1,opt,name=weight"` }
PreferredDuringSchedulingIgnoredDuringExecution defines the weight of the anti-affinity injection
func (*PreferredDuringSchedulingIgnoredDuringExecution) DeepCopy ¶
func (in *PreferredDuringSchedulingIgnoredDuringExecution) DeepCopy() *PreferredDuringSchedulingIgnoredDuringExecution
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PreferredDuringSchedulingIgnoredDuringExecution.
func (*PreferredDuringSchedulingIgnoredDuringExecution) DeepCopyInto ¶
func (in *PreferredDuringSchedulingIgnoredDuringExecution) DeepCopyInto(out *PreferredDuringSchedulingIgnoredDuringExecution)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReplicaSetSpecRef ¶
type ReplicaSetSpecRef string
ReplicaSetSpecRef defines which RS that the experiment's template will use.
const ( // CanarySpecRef indicates the RS template should be pulled from the newRS's template CanarySpecRef ReplicaSetSpecRef = "canary" // StableSpecRef indicates the RS template should be pulled from the stableRS's template StableSpecRef ReplicaSetSpecRef = "stable" )
type RequiredDuringSchedulingIgnoredDuringExecution ¶
type RequiredDuringSchedulingIgnoredDuringExecution struct{}
RequiredDuringSchedulingIgnoredDuringExecution defines inter-pod scheduling rule to be RequiredDuringSchedulingIgnoredDuringExecution
func (*RequiredDuringSchedulingIgnoredDuringExecution) DeepCopy ¶
func (in *RequiredDuringSchedulingIgnoredDuringExecution) DeepCopy() *RequiredDuringSchedulingIgnoredDuringExecution
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequiredDuringSchedulingIgnoredDuringExecution.
func (*RequiredDuringSchedulingIgnoredDuringExecution) DeepCopyInto ¶
func (in *RequiredDuringSchedulingIgnoredDuringExecution) DeepCopyInto(out *RequiredDuringSchedulingIgnoredDuringExecution)
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" protobuf:"bytes,1,opt,name=metadata"` Spec RolloutSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` Status RolloutStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` }
Rollout is a specification for a Rollout resource
func (*Rollout) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rollout.
func (*Rollout) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Rollout) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RolloutCondition ¶
type RolloutCondition struct { // Type of deployment condition. Type RolloutConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=RolloutConditionType"` // Phase of the condition, one of True, False, Unknown. Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` // The last time this condition was updated. LastUpdateTime metav1.Time `json:"lastUpdateTime" protobuf:"bytes,3,opt,name=lastUpdateTime"` // Last time the condition transitioned from one status to another. LastTransitionTime metav1.Time `json:"lastTransitionTime" protobuf:"bytes,4,opt,name=lastTransitionTime"` // The reason for the condition's last transition. Reason string `json:"reason" protobuf:"bytes,5,opt,name=reason"` // A human readable message indicating details about the transition. Message string `json:"message" protobuf:"bytes,6,opt,name=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
const ( // InvalidSpec 表示 Rollout 的 Spec 不合法,在我们的场景下不会出现,因为Spec校验回同步进行,并直接通过接口返回. InvalidSpec RolloutConditionType = "InvalidSpec" // RolloutAvailable means the rollout is available, ie. the active service is pointing at a // replicaset with the required replicas up and running for at least minReadySeconds. RolloutAvailable RolloutConditionType = "Available" // RolloutProgressing Rollout 处于中间状态,一般是新RS被创建,新pod正在扩容中,或老pod正在缩容中。 RolloutProgressing RolloutConditionType = "Progressing" // RolloutReplicaFailure ReplicaFailure is added in a deployment when one of its pods // fails to be created or deleted. RolloutReplicaFailure RolloutConditionType = "ReplicaFailure" // RolloutPaused 处于 Pause 状态,该状态一定是中间状态. 该状态下经过的时间,不会计入 Rollout 总时长 RolloutPaused RolloutConditionType = "Paused" // RolloutCompleted 表示 Rollout 完成,达到了预期的 Revision 并且不处于任何中间状态. RolloutCompleted RolloutConditionType = "Completed" // RolloutHealthy 表示 Rollout 完成,且副本数达到预期 且 所有 pod 可接受流量(不确定有没有判定 minReadySecond). RolloutHealthy RolloutConditionType = "Healthy" )
These are valid conditions of a rollout.
type RolloutInterface ¶
type RolloutInterface interface { Create(ctx context.Context, clusterCode string, rollout *Rollout) (*Rollout, error) Update(ctx context.Context, clusterCode string, rollout *Rollout) (*Rollout, error) UpdateStatus(ctx context.Context, clusterCode string, rollout *Rollout) (*Rollout, error) Delete(ctx context.Context, clusterCode, namespace, name string) error Get(ctx context.Context, clusterCode, namespace, name string) (*Rollout, error) }
RolloutInterface has methods to work with Rollout resources.
type RolloutList ¶
type RolloutList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` Items []Rollout `json:"items" protobuf:"bytes,2,rep,name=items"` }
RolloutList is a list of Rollout resources
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 *intstr.IntOrString `json:"duration,omitempty" protobuf:"bytes,1,opt,name=duration"` }
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.
func (RolloutPause) DurationSeconds ¶
func (p RolloutPause) DurationSeconds() int32
DurationSeconds converts the pause duration to seconds If Duration is nil 0 is returned if Duration values is string and does not contain a valid unit -1 is returned
type RolloutPhase ¶
type RolloutPhase string
RolloutPhase are a set of phases that this rollout
const ( // RolloutPhaseHealthy indicates a rollout is healthy RolloutPhaseHealthy RolloutPhase = "Healthy" // RolloutPhaseDegraded indicates a rollout is degraded (e.g. pod unavailability, misconfiguration) RolloutPhaseDegraded RolloutPhase = "Degraded" // RolloutPhaseProgressing indicates a rollout is not yet healthy but still making progress towards a healthy state RolloutPhaseProgressing RolloutPhase = "Progressing" // RolloutPhasePaused indicates a rollout is not yet healthy and will not make progress until unpaused RolloutPhasePaused RolloutPhase = "Paused" )
type RolloutSpec ¶
type RolloutSpec struct { TemplateResolvedFromRef bool `json:"-"` SelectorResolvedFromRef bool `json:"-"` // Number of desired pods. This is a pointer to distinguish between explicit // zero and not specified. Defaults to 1. // +optional Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` // Label selector for pods. Existing ReplicaSets whose pods are // selected by this will be the ones affected by this rollout. // It must match the pod template's labels. // +optional Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` // Template describes the pods that will be created. // +optional Template corev1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"` // Minimum number of seconds for which a newly created pod should be ready // without any of its container crashing, for it to be considered available. // Defaults to 0 (pod will be considered available as soon as it is ready) // +optional MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"` // The deployment strategy to use to replace existing pods with new ones. // +optional Strategy RolloutStrategy `json:"strategy" protobuf:"bytes,5,opt,name=strategy"` // The number of old ReplicaSets to retain. If unspecified, will retain 10 old ReplicaSets RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"` // Paused pauses the rollout at its current step. Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"` }
RolloutSpec is the spec for a Rollout resource
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.
func (*RolloutSpec) EmptyTemplate ¶
func (s *RolloutSpec) EmptyTemplate() bool
func (*RolloutSpec) MarshalJSON ¶
func (s *RolloutSpec) MarshalJSON() ([]byte, error)
func (*RolloutSpec) SetResolvedSelector ¶
func (s *RolloutSpec) SetResolvedSelector(selector *metav1.LabelSelector)
type RolloutStatus ¶
type RolloutStatus struct { // PauseConditions 表示 Rollout "自动" 暂停的原因 比如 CanaryPauseStep. 自动意味着列表中的元素是系统添加进去的,比如定时或者遇到 Pause step 等等。 // 如果该列表是空的,但是 controllerPause 是 true,则表示是用户手动恢复了 Rollout PauseConditions []PauseCondition `json:"pauseConditions,omitempty" protobuf:"bytes,2,rep,name=pauseConditions"` // ControllerPause 表示 Rollout 被系统"自动"暂停时会标记为true,同时会写入 PauseConditions。 当被系统自动暂停的 Rollout 被用户手动恢复时, PauseConditions 会被清空 // 但 ControllerPause 的值还是 true ControllerPause bool `json:"controllerPause,omitempty" protobuf:"varint,3,opt,name=controllerPause"` // CurrentPodHash 表示当前 pod template hash // +optional CurrentPodHash string `json:"currentPodHash,omitempty" protobuf:"bytes,5,opt,name=currentPodHash"` // CurrentStepHash 当前 step "列表" 的 hash(不是单个 step),用于检测 steps 是否发生了变化。 // +optional CurrentStepHash string `json:"currentStepHash,omitempty" protobuf:"bytes,6,opt,name=currentStepHash"` // 未终止的副本数总数, 和 label selector相匹配. // +optional Replicas int32 `json:"replicas,omitempty" protobuf:"varint,7,opt,name=replicas"` // 未终止的副本数总数 里面,已经更新到预期的 pod template的副本数. // +optional UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,8,opt,name=updatedReplicas"` // Ready的pod总数. // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,9,opt,name=readyReplicas"` // healthy 的pod总数,available 和 ready的区别是 pod进入并保持ready状态经过了 minReadySecond 之后,就认为是 available的 // 正常来讲,最终 AvailableReplicas = ReadyReplicas // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,10,opt,name=availableReplicas"` // CurrentStepIndex 表示当前 Rollout 在哪个 step, 为空时,表示还没开始. // +optional CurrentStepIndex *int32 `json:"currentStepIndex,omitempty" protobuf:"varint,11,opt,name=currentStepIndex"` // 用于避免hash冲突的参数,为 Rollout 生成新的 RS 的名称时,需要使用Hash算法生成. // +optional CollisionCount *int32 `json:"collisionCount,omitempty" protobuf:"varint,12,opt,name=collisionCount"` // k8s概念,正在被监听的 generation, 一般最终和 metadata.generation 一致, // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"bytes,13,opt,name=observedGeneration"` // Conditions 表示 当前 Rollout 的状态和原因列表. // +optional Conditions []RolloutCondition `json:"conditions,omitempty" protobuf:"bytes,14,rep,name=conditions"` // Canary 发布策略的状态, 暂时没用 Canary CanaryStatus `json:"canary,omitempty" protobuf:"bytes,15,opt,name=canary"` // HPAReplicas 可以接受流量的副本数, 具体使用时,是所有RS的 ReplicaSetStatus 中的 Replicas 数相加 // +optional HPAReplicas int32 `json:"HPAReplicas,omitempty" protobuf:"varint,17,opt,name=HPAReplicas"` // Selector 可以筛选出可接受流量的pod的选择器, 具体使用时,就是指 Rollout .Spec.Selector, 暂时还没看到哪里控制了是否可接受流量 // +optional Selector string `json:"selector,omitempty" protobuf:"bytes,18,opt,name=selector"` // StableRS stable rs 的 pod template hash, 也是 RS 的名称 // +optional // TODO 需要确认stable RS在status中的写入时机 StableRS string `json:"stableRS,omitempty" protobuf:"bytes,19,opt,name=stableRS"` // RestartedAt 表示该 Rollout 最后一次重启的时间 // Phase 表示 Rollout 的 Phase. 只有 ObservedGeneration == Metadata.Generation 时才可以拿来用 Phase RolloutPhase `json:"phase,omitempty" protobuf:"bytes,22,opt,name=phase,casttype=RolloutPhase"` // Message 是 Phase 的描述信息 Message string `json:"message,omitempty" protobuf:"bytes,23,opt,name=message"` }
RolloutStatus is the status for a Rollout resource
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 { // +optional Canary *CanaryStrategy `json:"canary,omitempty" protobuf:"bytes,2,opt,name=canary"` }
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 RolloutsGetter ¶
type RolloutsGetter interface {
Rollouts(namespace string) RolloutInterface
}
RolloutsGetter has a method to return a RolloutInterface. A group's client should implement this interface.
type SetCanaryScale ¶
type SetCanaryScale struct { // Weight sets the percentage of replicas the newRS should have // +optional Weight *int32 `json:"weight,omitempty" protobuf:"varint,1,opt,name=weight"` // Replicas sets the number of replicas the newRS should have // +optional Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"` }
SetCanaryScale defines how to scale the newRS without changing traffic weight
func (*SetCanaryScale) DeepCopy ¶
func (in *SetCanaryScale) DeepCopy() *SetCanaryScale
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SetCanaryScale.
func (*SetCanaryScale) DeepCopyInto ¶
func (in *SetCanaryScale) DeepCopyInto(out *SetCanaryScale)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StickinessConfig ¶
type StickinessConfig struct { Enabled bool `json:"enabled" protobuf:"varint,1,opt,name=enabled"` DurationSeconds int64 `json:"durationSeconds" protobuf:"varint,2,opt,name=durationSeconds"` }
func (*StickinessConfig) DeepCopy ¶
func (in *StickinessConfig) DeepCopy() *StickinessConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StickinessConfig.
func (*StickinessConfig) DeepCopyInto ¶
func (in *StickinessConfig) DeepCopyInto(out *StickinessConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StringMatch ¶
type StringMatch struct { // Exact The string must match exactly Exact string `json:"exact,omitempty" protobuf:"bytes,1,opt,name=exact"` // Prefix The string will be prefixed matched Prefix string `json:"prefix,omitempty" protobuf:"bytes,2,opt,name=prefix"` // Regex The string will be regular expression matched Regex string `json:"regex,omitempty" protobuf:"bytes,3,opt,name=regex"` }
StringMatch Used to define what type of matching we will use exact, prefix, or regular expression
func (*StringMatch) DeepCopy ¶
func (in *StringMatch) DeepCopy() *StringMatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringMatch.
func (*StringMatch) DeepCopyInto ¶
func (in *StringMatch) DeepCopyInto(out *StringMatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ValueFromPodTemplateHash ¶
type ValueFromPodTemplateHash string
ValueFromPodTemplateHash indicates which ReplicaSet pod template pod hash to use
const ( // Stable tells the Rollout to get the pod template hash from the stable ReplicaSet Stable ValueFromPodTemplateHash = "Stable" // Latest tells the Rollout to get the pod template hash from the latest ReplicaSet Latest ValueFromPodTemplateHash = "Latest" )
type WeightDestination ¶
type WeightDestination struct { // Weight is an percentage of traffic being sent to this destination Weight int32 `json:"weight" protobuf:"varint,1,opt,name=weight"` // ServiceName is the Kubernetes service name traffic is being sent to ServiceName string `json:"serviceName,omitempty" protobuf:"bytes,2,opt,name=serviceName"` // PodTemplateHash is the pod template hash label for this destination PodTemplateHash string `json:"podTemplateHash,omitempty" protobuf:"bytes,3,opt,name=podTemplateHash"` }
func (*WeightDestination) DeepCopy ¶
func (in *WeightDestination) DeepCopy() *WeightDestination
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WeightDestination.
func (*WeightDestination) DeepCopyInto ¶
func (in *WeightDestination) DeepCopyInto(out *WeightDestination)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.