Documentation ¶
Overview ¶
+k8s:openapi-gen=true +kubebuilder:object:generate=true
Index ¶
- Constants
- func GetInPlaceUpdateGrace(obj metav1.Object) (string, bool)
- func GetInPlaceUpdateState(obj metav1.Object) (string, bool)
- func RemoveInPlaceUpdateGrace(obj metav1.Object)
- type InPlaceUpdateContainerStatus
- type InPlaceUpdateState
- type InPlaceUpdateStrategy
- type Lifecycle
- type LifecycleHook
- type LifecycleStateType
- type UpdatePriorityOrderTerm
- type UpdatePriorityStrategy
- type UpdatePriorityWeightTerm
Constants ¶
const ( // InPlaceUpdateReady must be added into template.spec.readinessGates when pod podUpdatePolicy // is InPlaceIfPossible or InPlaceOnly. The condition in podStatus will be updated to False before in-place // updating and updated to True after the update is finished. This ensures pod to remain at NotReady state while // in-place update is happening. InPlaceUpdateReady v1.PodConditionType = "InPlaceUpdateReady" // InPlaceUpdateStateKey records the state of inplace-update. // The value of annotation is InPlaceUpdateState. InPlaceUpdateStateKey string = "apps.kruise.io/inplace-update-state" // TODO: will be removed since v1.0.0 InPlaceUpdateStateKeyOld string = "inplace-update-state" // InPlaceUpdateGraceKey records the spec that Pod should be updated when // grace period ends. InPlaceUpdateGraceKey string = "apps.kruise.io/inplace-update-grace" // TODO: will be removed since v1.0.0 InPlaceUpdateGraceKeyOld string = "inplace-update-grace" )
Variables ¶
This section is empty.
Functions ¶
func GetInPlaceUpdateGrace ¶ added in v0.8.0
func GetInPlaceUpdateState ¶ added in v0.8.0
func RemoveInPlaceUpdateGrace ¶ added in v0.8.0
Types ¶
type InPlaceUpdateContainerStatus ¶
type InPlaceUpdateContainerStatus struct {
ImageID string `json:"imageID,omitempty"`
}
InPlaceUpdateContainerStatus records the statuses of the container that are mainly used to determine whether the InPlaceUpdate is completed.
func (*InPlaceUpdateContainerStatus) DeepCopy ¶
func (in *InPlaceUpdateContainerStatus) DeepCopy() *InPlaceUpdateContainerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InPlaceUpdateContainerStatus.
func (*InPlaceUpdateContainerStatus) DeepCopyInto ¶
func (in *InPlaceUpdateContainerStatus) DeepCopyInto(out *InPlaceUpdateContainerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InPlaceUpdateState ¶
type InPlaceUpdateState struct { // Revision is the updated revision hash. Revision string `json:"revision"` // UpdateTimestamp is the time when the in-place update happens. UpdateTimestamp metav1.Time `json:"updateTimestamp"` // LastContainerStatuses records the before-in-place-update container statuses. It is a map from ContainerName // to InPlaceUpdateContainerStatus LastContainerStatuses map[string]InPlaceUpdateContainerStatus `json:"lastContainerStatuses"` }
InPlaceUpdateState records latest inplace-update state, including old statuses of containers.
func (*InPlaceUpdateState) DeepCopy ¶
func (in *InPlaceUpdateState) DeepCopy() *InPlaceUpdateState
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InPlaceUpdateState.
func (*InPlaceUpdateState) DeepCopyInto ¶
func (in *InPlaceUpdateState) DeepCopyInto(out *InPlaceUpdateState)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InPlaceUpdateStrategy ¶
type InPlaceUpdateStrategy struct { // GracePeriodSeconds is the timespan between set Pod status to not-ready and update images in Pod spec // when in-place update a Pod. GracePeriodSeconds int32 `json:"gracePeriodSeconds,omitempty"` }
InPlaceUpdateStrategy defines the strategies for in-place update.
func (*InPlaceUpdateStrategy) DeepCopy ¶
func (in *InPlaceUpdateStrategy) DeepCopy() *InPlaceUpdateStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InPlaceUpdateStrategy.
func (*InPlaceUpdateStrategy) DeepCopyInto ¶
func (in *InPlaceUpdateStrategy) DeepCopyInto(out *InPlaceUpdateStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Lifecycle ¶
type Lifecycle struct { // PreDelete is the hook before Pod to be deleted. PreDelete *LifecycleHook `json:"preDelete,omitempty"` // InPlaceUpdate is the hook before Pod to update and after Pod has been updated. InPlaceUpdate *LifecycleHook `json:"inPlaceUpdate,omitempty"` }
Lifecycle contains the hooks for Pod lifecycle.
func (*Lifecycle) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Lifecycle.
func (*Lifecycle) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LifecycleHook ¶
type LifecycleHook struct { LabelsHandler map[string]string `json:"labelsHandler,omitempty"` FinalizersHandler []string `json:"finalizersHandler,omitempty"` }
func (*LifecycleHook) DeepCopy ¶
func (in *LifecycleHook) DeepCopy() *LifecycleHook
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LifecycleHook.
func (*LifecycleHook) DeepCopyInto ¶
func (in *LifecycleHook) DeepCopyInto(out *LifecycleHook)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LifecycleStateType ¶
type LifecycleStateType string
const ( LifecycleStateKey = "lifecycle.apps.kruise.io/state" LifecycleTimestampKey = "lifecycle.apps.kruise.io/timestamp" LifecycleStateNormal LifecycleStateType = "Normal" LifecycleStatePreparingUpdate LifecycleStateType = "PreparingUpdate" LifecycleStateUpdating LifecycleStateType = "Updating" LifecycleStateUpdated LifecycleStateType = "Updated" LifecycleStatePreparingDelete LifecycleStateType = "PreparingDelete" )
type UpdatePriorityOrderTerm ¶
type UpdatePriorityOrderTerm struct { // Calculate priority by value of this key. // Values of this key, will be sorted by GetInt(val). GetInt method will find the last int in value, // such as getting 5 in value '5', getting 10 in value 'sts-10'. OrderedKey string `json:"orderedKey"` }
UpdatePriorityOrder defines order priority.
func (*UpdatePriorityOrderTerm) DeepCopy ¶
func (in *UpdatePriorityOrderTerm) DeepCopy() *UpdatePriorityOrderTerm
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdatePriorityOrderTerm.
func (*UpdatePriorityOrderTerm) DeepCopyInto ¶
func (in *UpdatePriorityOrderTerm) DeepCopyInto(out *UpdatePriorityOrderTerm)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UpdatePriorityStrategy ¶
type UpdatePriorityStrategy struct { // Order priority terms, pods will be sorted by the value of orderedKey. // For example: // “` // orderPriority: // - orderedKey: key1 // - orderedKey: key2 // “` // First, all pods which have key1 in labels will be sorted by the value of key1. // Then, the left pods which have no key1 but have key2 in labels will be sorted by // the value of key2 and put behind those pods have key1. OrderPriority []UpdatePriorityOrderTerm `json:"orderPriority,omitempty"` // Weight priority terms, pods will be sorted by the sum of all terms weight. WeightPriority []UpdatePriorityWeightTerm `json:"weightPriority,omitempty"` }
UpdatePriorityStrategy is the strategy to define priority for pods update. Only one of orderPriority and weightPriority can be set.
func (*UpdatePriorityStrategy) DeepCopy ¶
func (in *UpdatePriorityStrategy) DeepCopy() *UpdatePriorityStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdatePriorityStrategy.
func (*UpdatePriorityStrategy) DeepCopyInto ¶
func (in *UpdatePriorityStrategy) DeepCopyInto(out *UpdatePriorityStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*UpdatePriorityStrategy) FieldsValidation ¶
func (strategy *UpdatePriorityStrategy) FieldsValidation() error
FieldsValidation checks invalid fields in UpdatePriorityStrategy.
type UpdatePriorityWeightTerm ¶
type UpdatePriorityWeightTerm struct { // Weight associated with matching the corresponding matchExpressions, in the range 1-100. Weight int32 `json:"weight"` // MatchSelector is used to select by pod's labels. MatchSelector metav1.LabelSelector `json:"matchSelector"` }
UpdatePriorityWeightTerm defines weight priority.
func (*UpdatePriorityWeightTerm) DeepCopy ¶
func (in *UpdatePriorityWeightTerm) DeepCopy() *UpdatePriorityWeightTerm
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdatePriorityWeightTerm.
func (*UpdatePriorityWeightTerm) DeepCopyInto ¶
func (in *UpdatePriorityWeightTerm) DeepCopyInto(out *UpdatePriorityWeightTerm)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.