v1alpha1

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the upgrademgr v1alpha1 API group +kubebuilder:object:generate=true +groupName=upgrademgr.keikoproj.io

Index

Constants

View Source
const (
	// Status
	StatusInit     = "init"
	StatusRunning  = "running"
	StatusComplete = "completed"
	StatusError    = "error"

	// Conditions
	UpgradeComplete UpgradeConditionType = "Complete"

	NodeRotationTotal RollingUpgradeStep = "total"

	NodeRotationKickoff          RollingUpgradeStep = "kickoff"
	NodeRotationDesiredNodeReady RollingUpgradeStep = "desired_node_ready"
	NodeRotationPredrainScript   RollingUpgradeStep = "predrain_script"
	NodeRotationDrain            RollingUpgradeStep = "drain"
	NodeRotationPostdrainScript  RollingUpgradeStep = "postdrain_script"
	NodeRotationPostWait         RollingUpgradeStep = "post_wait"
	NodeRotationTerminate        RollingUpgradeStep = "terminate"
	NodeRotationPostTerminate    RollingUpgradeStep = "post_terminate"
	NodeRotationTerminated       RollingUpgradeStep = "terminated"
	NodeRotationCompleted        RollingUpgradeStep = "completed"

	// Label keys
	LabelKeyRollingUpgradeCurrentStatus = "rollingupgrade.keikoproj.io/current-status"
)
View Source
const (
	RandomUpdateStrategy          UpdateStrategyType = "randomUpdate"
	UniformAcrossAzUpdateStrategy UpdateStrategyType = "uniformAcrossAzUpdate"

	UpdateStrategyModeLazy  UpdateStrategyMode = "lazy"
	UpdateStrategyModeEager UpdateStrategyMode = "eager"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "upgrademgr.keikoproj.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
)
View Source
var (
	FiniteStates        = []string{StatusComplete, StatusError}
	AllowedStrategyType = []string{string(RandomUpdateStrategy), string(UniformAcrossAzUpdateStrategy)}
	AllowedStrategyMode = []string{string(UpdateStrategyModeLazy), string(UpdateStrategyModeEager)}
	DefaultRequeueTime  = time.Second * 30
)

Functions

This section is empty.

Types

type NodeInProcessing

type NodeInProcessing struct {
	NodeName         string             `json:"nodeName,omitempty"`
	StepName         RollingUpgradeStep `json:"stepName,omitempty"`
	UpgradeStartTime metav1.Time        `json:"upgradeStartTime,omitempty"`
	StepStartTime    metav1.Time        `json:"stepStartTime,omitempty"`
	StepEndTime      metav1.Time        `json:"stepEndTime,omitempty"`
}

Node In-processing

func (*NodeInProcessing) DeepCopy

func (in *NodeInProcessing) DeepCopy() *NodeInProcessing

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

func (*NodeInProcessing) DeepCopyInto

func (in *NodeInProcessing) DeepCopyInto(out *NodeInProcessing)

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

type NodeReadinessGate

type NodeReadinessGate struct {
	MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"`
}

func (*NodeReadinessGate) DeepCopy

func (in *NodeReadinessGate) DeepCopy() *NodeReadinessGate

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

func (*NodeReadinessGate) DeepCopyInto

func (in *NodeReadinessGate) DeepCopyInto(out *NodeReadinessGate)

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

type NodeStepDuration

type NodeStepDuration struct {
	GroupName string             `json:"groupName,omitempty"`
	NodeName  string             `json:"nodeName,omitempty"`
	StepName  RollingUpgradeStep `json:"stepName,omitempty"`
	Duration  metav1.Duration    `json:"duration,omitempty"`
}

RollingUpgrade Node step information

func (*NodeStepDuration) DeepCopy

func (in *NodeStepDuration) DeepCopy() *NodeStepDuration

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

func (*NodeStepDuration) DeepCopyInto

func (in *NodeStepDuration) DeepCopyInto(out *NodeStepDuration)

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

type PostDrainSpec

type PostDrainSpec struct {
	Script         string `json:"script,omitempty"`
	WaitSeconds    int64  `json:"waitSeconds,omitempty"`
	PostWaitScript string `json:"postWaitScript,omitempty"`
}

PostDrainSpec contains the fields for actions taken after draining the node.

func (*PostDrainSpec) DeepCopy

func (in *PostDrainSpec) DeepCopy() *PostDrainSpec

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

func (*PostDrainSpec) DeepCopyInto

func (in *PostDrainSpec) DeepCopyInto(out *PostDrainSpec)

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

type PostTerminateSpec

type PostTerminateSpec struct {
	Script string `json:"script,omitempty"`
}

PostTerminateSpec contains the fields for actions taken after terminating the node.

func (*PostTerminateSpec) DeepCopy

func (in *PostTerminateSpec) DeepCopy() *PostTerminateSpec

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

func (*PostTerminateSpec) DeepCopyInto

func (in *PostTerminateSpec) DeepCopyInto(out *PostTerminateSpec)

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

type PreDrainSpec

type PreDrainSpec struct {
	Script string `json:"script,omitempty"`
}

PreDrainSpec contains the fields for actions taken before draining the node.

func (*PreDrainSpec) DeepCopy

func (in *PreDrainSpec) DeepCopy() *PreDrainSpec

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

func (*PreDrainSpec) DeepCopyInto

func (in *PreDrainSpec) DeepCopyInto(out *PreDrainSpec)

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

type RollingUpgrade

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

	Spec   RollingUpgradeSpec   `json:"spec,omitempty"`
	Status RollingUpgradeStatus `json:"status,omitempty"`
}

RollingUpgrade is the Schema for the rollingupgrades API

func (*RollingUpgrade) CurrentStatus

func (r *RollingUpgrade) CurrentStatus() string

func (*RollingUpgrade) DeepCopy

func (in *RollingUpgrade) DeepCopy() *RollingUpgrade

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

func (*RollingUpgrade) DeepCopyInto

func (in *RollingUpgrade) DeepCopyInto(out *RollingUpgrade)

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

func (*RollingUpgrade) DeepCopyObject

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

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

func (*RollingUpgrade) DrainTimeout

func (r *RollingUpgrade) DrainTimeout() *int

func (*RollingUpgrade) EndTime

func (r *RollingUpgrade) EndTime() string

func (*RollingUpgrade) GetStatus

func (r *RollingUpgrade) GetStatus() RollingUpgradeStatus

func (*RollingUpgrade) IsForceRefresh

func (r *RollingUpgrade) IsForceRefresh() bool

func (*RollingUpgrade) IsIgnoreDrainFailures

func (r *RollingUpgrade) IsIgnoreDrainFailures() *bool

func (*RollingUpgrade) LastNodeDrainTime

func (r *RollingUpgrade) LastNodeDrainTime() *metav1.Time

func (*RollingUpgrade) LastNodeTerminationTime

func (r *RollingUpgrade) LastNodeTerminationTime() *metav1.Time

func (*RollingUpgrade) MaxUnavailable

func (r *RollingUpgrade) MaxUnavailable() intstr.IntOrString

func (*RollingUpgrade) NamespacedName

func (r *RollingUpgrade) NamespacedName() string

NamespacedName returns namespaced name of the object.

func (*RollingUpgrade) NodeIntervalSeconds

func (r *RollingUpgrade) NodeIntervalSeconds() int

func (*RollingUpgrade) PostDrainDelaySeconds

func (r *RollingUpgrade) PostDrainDelaySeconds() int

func (*RollingUpgrade) PostDrainScript

func (r *RollingUpgrade) PostDrainScript() string

func (*RollingUpgrade) PostTerminateScript

func (r *RollingUpgrade) PostTerminateScript() string

func (*RollingUpgrade) PostWaitScript

func (r *RollingUpgrade) PostWaitScript() string

func (*RollingUpgrade) PreDrainScript

func (r *RollingUpgrade) PreDrainScript() string

func (*RollingUpgrade) ScalingGroupName

func (r *RollingUpgrade) ScalingGroupName() string

func (*RollingUpgrade) SetCompletePercentage

func (r *RollingUpgrade) SetCompletePercentage(n int)

func (*RollingUpgrade) SetCurrentStatus

func (r *RollingUpgrade) SetCurrentStatus(status string)

func (*RollingUpgrade) SetEndTime

func (r *RollingUpgrade) SetEndTime(t string)

func (*RollingUpgrade) SetLabel

func (r *RollingUpgrade) SetLabel(key, value string)

func (*RollingUpgrade) SetLastNodeDrainTime

func (r *RollingUpgrade) SetLastNodeDrainTime(t *metav1.Time)

func (*RollingUpgrade) SetLastNodeTerminationTime

func (r *RollingUpgrade) SetLastNodeTerminationTime(t *metav1.Time)

func (*RollingUpgrade) SetNodesProcessed

func (r *RollingUpgrade) SetNodesProcessed(n int)

func (*RollingUpgrade) SetStartTime

func (r *RollingUpgrade) SetStartTime(t string)

func (*RollingUpgrade) SetTotalNodes

func (r *RollingUpgrade) SetTotalNodes(n int)

func (*RollingUpgrade) SetTotalProcessingTime

func (r *RollingUpgrade) SetTotalProcessingTime(t string)

func (*RollingUpgrade) StartTime

func (r *RollingUpgrade) StartTime() string

func (*RollingUpgrade) StrategyMode

func (r *RollingUpgrade) StrategyMode() UpdateStrategyMode

func (*RollingUpgrade) UpdateStrategyType

func (r *RollingUpgrade) UpdateStrategyType() UpdateStrategyType

func (*RollingUpgrade) Validate

func (r *RollingUpgrade) Validate() (bool, error)

type RollingUpgradeCondition

type RollingUpgradeCondition struct {
	Type   UpgradeConditionType   `json:"type,omitempty"`
	Status corev1.ConditionStatus `json:"status,omitempty"`
}

RollingUpgradeCondition describes the state of the RollingUpgrade

func (*RollingUpgradeCondition) DeepCopy

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

func (*RollingUpgradeCondition) DeepCopyInto

func (in *RollingUpgradeCondition) DeepCopyInto(out *RollingUpgradeCondition)

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

type RollingUpgradeList

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

RollingUpgradeList contains a list of RollingUpgrade

func (*RollingUpgradeList) DeepCopy

func (in *RollingUpgradeList) DeepCopy() *RollingUpgradeList

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

func (*RollingUpgradeList) DeepCopyInto

func (in *RollingUpgradeList) DeepCopyInto(out *RollingUpgradeList)

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

func (*RollingUpgradeList) DeepCopyObject

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

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

type RollingUpgradeSpec

type RollingUpgradeSpec struct {
	PostDrainDelaySeconds int                 `json:"postDrainDelaySeconds,omitempty"`
	NodeIntervalSeconds   int                 `json:"nodeIntervalSeconds,omitempty"`
	AsgName               string              `json:"asgName,omitempty"`
	PreDrain              PreDrainSpec        `json:"preDrain,omitempty"`
	PostDrain             PostDrainSpec       `json:"postDrain,omitempty"`
	PostTerminate         PostTerminateSpec   `json:"postTerminate,omitempty"`
	Strategy              UpdateStrategy      `json:"strategy,omitempty"`
	IgnoreDrainFailures   *bool               `json:"ignoreDrainFailures,omitempty"`
	ForceRefresh          bool                `json:"forceRefresh,omitempty"`
	ReadinessGates        []NodeReadinessGate `json:"readinessGates,omitempty"`
}

RollingUpgradeSpec defines the desired state of RollingUpgrade

func (*RollingUpgradeSpec) DeepCopy

func (in *RollingUpgradeSpec) DeepCopy() *RollingUpgradeSpec

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

func (*RollingUpgradeSpec) DeepCopyInto

func (in *RollingUpgradeSpec) DeepCopyInto(out *RollingUpgradeSpec)

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

type RollingUpgradeStatistics

type RollingUpgradeStatistics struct {
	StepName      RollingUpgradeStep `json:"stepName,omitempty"`
	DurationSum   metav1.Duration    `json:"durationSum,omitempty"`
	DurationCount int32              `json:"durationCount,omitempty"`
}

RollingUpgrade Statistics, includes summary(sum/count) from each step

func (*RollingUpgradeStatistics) DeepCopy

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

func (*RollingUpgradeStatistics) DeepCopyInto

func (in *RollingUpgradeStatistics) DeepCopyInto(out *RollingUpgradeStatistics)

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

type RollingUpgradeStatus

type RollingUpgradeStatus struct {
	CurrentStatus           string                    `json:"currentStatus,omitempty"`
	StartTime               string                    `json:"startTime,omitempty"`
	EndTime                 string                    `json:"endTime,omitempty"`
	TotalProcessingTime     string                    `json:"totalProcessingTime,omitempty"`
	NodesProcessed          int                       `json:"nodesProcessed,omitempty"`
	TotalNodes              int                       `json:"totalNodes,omitempty"`
	CompletePercentage      string                    `json:"completePercentage,omitempty"`
	Conditions              []RollingUpgradeCondition `json:"conditions,omitempty"`
	LastNodeTerminationTime *metav1.Time              `json:"lastTerminationTime,omitempty"`
	LastNodeDrainTime       *metav1.Time              `json:"lastDrainTime,omitempty"`

	Statistics []*RollingUpgradeStatistics `json:"statistics,omitempty"`
	// For backward compatibility
	LastBatchNodes   []string                     `json:"lastBatchNodes,omitempty"`
	NodeInProcessing map[string]*NodeInProcessing `json:"nodeInProcessing,omitempty"`
}

RollingUpgradeStatus defines the observed state of RollingUpgrade

func (*RollingUpgradeStatus) DeepCopy

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

func (*RollingUpgradeStatus) DeepCopyInto

func (in *RollingUpgradeStatus) DeepCopyInto(out *RollingUpgradeStatus)

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

func (*RollingUpgradeStatus) SetCondition

func (s *RollingUpgradeStatus) SetCondition(cond RollingUpgradeCondition)

type RollingUpgradeStep

type RollingUpgradeStep string

type UpdateStrategy

type UpdateStrategy struct {
	Type           UpdateStrategyType `json:"type,omitempty"`
	Mode           UpdateStrategyMode `json:"mode,omitempty"`
	MaxUnavailable intstr.IntOrString `json:"maxUnavailable,omitempty"`
	DrainTimeout   *int               `json:"drainTimeout,omitempty"`
}

UpdateStrategy holds the information needed to perform update based on different update strategies

func (*UpdateStrategy) DeepCopy

func (in *UpdateStrategy) DeepCopy() *UpdateStrategy

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

func (*UpdateStrategy) DeepCopyInto

func (in *UpdateStrategy) DeepCopyInto(out *UpdateStrategy)

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

type UpdateStrategyMode

type UpdateStrategyMode string

func (UpdateStrategyMode) String

func (c UpdateStrategyMode) String() string

type UpdateStrategyType

type UpdateStrategyType string

type UpgradeConditionType

type UpgradeConditionType string

Jump to

Keyboard shortcuts

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