v1alpha1

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the apps v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/openkruise/kruise/pkg/apis/apps +k8s:defaulter-gen=TypeMeta +groupName=apps.kruise.io

Package v1alpha1 contains API Schema definitions for the apps v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/openkruise/kruise/pkg/apis/apps +k8s:defaulter-gen=TypeMeta +groupName=apps.kruise.io

Index

Constants

View Source
const (
	// CloneSetInstanceID is a unique id for Pods and PVCs.
	// Each pod and the pvcs it owns have the same instance-id.
	CloneSetInstanceID = "apps.kruise.io/cloneset-instance-id"

	// DefaultCloneSetMaxUnavailable is the default value of maxUnavailable for CloneSet update strategy.
	DefaultCloneSetMaxUnavailable = "10%"
)
View Source
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 = "inplace-update-state"
)
View Source
const (
	FailedCreatePod apps.StatefulSetConditionType = "FailedCreatePod"
	FailedUpdatePod apps.StatefulSetConditionType = "FailedUpdatePod"
)

These are valid conditions of a statefulset.

View Source
const (
	// ControllerRevisionHashLabelKey is used to record the controller revision of current resource.
	ControllerRevisionHashLabelKey = "apps.kruise.io/controller-revision-hash"

	// SubSetNameLabelKey is used to record the name of current subset.
	SubSetNameLabelKey = "apps.kruise.io/subset-name"
)

Variables

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

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

	// AddToScheme is required by pkg/client/...
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func Resource

func Resource(resource string) schema.GroupResource

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

func SetDefaults_BroadcastJob added in v0.2.0

func SetDefaults_BroadcastJob(obj *BroadcastJob)

SetDefaults_BroadcastJob set default values for BroadcastJob.

func SetDefaults_CloneSet added in v0.3.0

func SetDefaults_CloneSet(obj *CloneSet)

SetDefaults_CloneSet set default values for CloneSet.

func SetDefaults_SidecarSet added in v0.2.0

func SetDefaults_SidecarSet(obj *SidecarSet)

SetDefaults_SidecarSet set default values for SidecarSet.

func SetDefaults_StatefulSet added in v0.2.0

func SetDefaults_StatefulSet(obj *StatefulSet)

SetDefaults_StatefulSet set default values for StatefulSet.

func SetDefaults_UnitedDeployment added in v0.3.0

func SetDefaults_UnitedDeployment(obj *UnitedDeployment)

SetDefaults_UnitedDeployment set default values for UnitedDeployment.

func SetObjectDefaults_BroadcastJob added in v0.2.0

func SetObjectDefaults_BroadcastJob(in *BroadcastJob)

func SetObjectDefaults_BroadcastJobList added in v0.2.0

func SetObjectDefaults_BroadcastJobList(in *BroadcastJobList)

func SetObjectDefaults_CloneSet added in v0.3.0

func SetObjectDefaults_CloneSet(in *CloneSet)

func SetObjectDefaults_CloneSetList added in v0.3.0

func SetObjectDefaults_CloneSetList(in *CloneSetList)

func SetObjectDefaults_SidecarSet added in v0.2.0

func SetObjectDefaults_SidecarSet(in *SidecarSet)

func SetObjectDefaults_SidecarSetList added in v0.2.0

func SetObjectDefaults_SidecarSetList(in *SidecarSetList)

func SetObjectDefaults_StatefulSet added in v0.2.0

func SetObjectDefaults_StatefulSet(in *StatefulSet)

func SetObjectDefaults_StatefulSetList added in v0.2.0

func SetObjectDefaults_StatefulSetList(in *StatefulSetList)

func SetObjectDefaults_UnitedDeployment added in v0.3.0

func SetObjectDefaults_UnitedDeployment(in *UnitedDeployment)

func SetObjectDefaults_UnitedDeploymentList added in v0.3.0

func SetObjectDefaults_UnitedDeploymentList(in *UnitedDeploymentList)

Types

type BroadcastJob

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

	Spec   BroadcastJobSpec   `json:"spec,omitempty"`
	Status BroadcastJobStatus `json:"status,omitempty"`
}

BroadcastJob is the Schema for the broadcastjobs API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:shortName=bj +kubebuilder:printcolumn:name="Desired",type="integer",JSONPath=".status.desired",description="The desired number of pods. This is typically equal to the number of nodes satisfied to run pods." +kubebuilder:printcolumn:name="Active",type="integer",JSONPath=".status.active",description="The number of actively running pods." +kubebuilder:printcolumn:name="Succeeded",type="integer",JSONPath=".status.succeeded",description="The number of pods which reached phase Succeeded." +kubebuilder:printcolumn:name="Failed",type="integer",JSONPath=".status.failed",description="The number of pods which reached phase Failed." +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC."

func (*BroadcastJob) DeepCopy

func (in *BroadcastJob) DeepCopy() *BroadcastJob

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

func (*BroadcastJob) DeepCopyInto

func (in *BroadcastJob) DeepCopyInto(out *BroadcastJob)

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

func (*BroadcastJob) DeepCopyObject

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

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

type BroadcastJobList

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

BroadcastJobList contains a list of BroadcastJob

func (*BroadcastJobList) DeepCopy

func (in *BroadcastJobList) DeepCopy() *BroadcastJobList

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

func (*BroadcastJobList) DeepCopyInto

func (in *BroadcastJobList) DeepCopyInto(out *BroadcastJobList)

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

func (*BroadcastJobList) DeepCopyObject

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

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

type BroadcastJobPhase added in v0.2.0

type BroadcastJobPhase string

BroadcastJobPhase indicates the phase of the job.

const (
	// PhaseCompleted means the job is completed.
	PhaseCompleted BroadcastJobPhase = "completed"

	// PhaseRunning means the job is running.
	PhaseRunning BroadcastJobPhase = "running"

	// PhasePaused means the job is paused.
	PhasePaused BroadcastJobPhase = "paused"

	// PhaseFailed means the job is failed.
	PhaseFailed BroadcastJobPhase = "failed"
)

type BroadcastJobSpec

type BroadcastJobSpec struct {
	// Parallelism specifies the maximum desired number of pods the job should
	// run at any given time. The actual number of pods running in steady state will
	// be less than this number when the work left to do is less than max parallelism.
	// Not setting this value means no limit.
	// +optional
	Parallelism *intstr.IntOrString `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"`

	// Template describes the pod that will be created when executing a job.
	Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,2,opt,name=template"`

	// CompletionPolicy indicates the completion policy of the job.
	// Default is Always CompletionPolicyType
	// +optional
	CompletionPolicy CompletionPolicy `json:"completionPolicy" protobuf:"bytes,3,opt,name=completionPolicy"`

	// Paused will pause the job.
	// +optional
	Paused bool `json:"paused,omitempty" protobuf:"bytes,4,opt,name=paused"`

	// FailurePolicy indicates the behavior of the job, when failed pod is found.
	// +optional
	FailurePolicy FailurePolicy `json:"failurePolicy,omitempty" protobuf:"bytes,5,opt,name=failurePolicy"`
}

BroadcastJobSpec defines the desired state of BroadcastJob

func (*BroadcastJobSpec) DeepCopy

func (in *BroadcastJobSpec) DeepCopy() *BroadcastJobSpec

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

func (*BroadcastJobSpec) DeepCopyInto

func (in *BroadcastJobSpec) DeepCopyInto(out *BroadcastJobSpec)

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

type BroadcastJobStatus

type BroadcastJobStatus struct {
	// The latest available observations of an object's current state.
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`

	// Represents time when the job was acknowledged by the job controller.
	// It is not guaranteed to be set in happens-before order across separate operations.
	// It is represented in RFC3339 form and is in UTC.
	// +optional
	StartTime *metav1.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"`

	// Represents time when the job was completed. It is not guaranteed to
	// be set in happens-before order across separate operations.
	// It is represented in RFC3339 form and is in UTC.
	// +optional
	CompletionTime *metav1.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"`

	// The number of actively running pods.
	// +optional
	Active int32 `json:"active" protobuf:"varint,4,opt,name=active"`

	// The number of pods which reached phase Succeeded.
	// +optional
	Succeeded int32 `json:"succeeded" protobuf:"varint,5,opt,name=succeeded"`

	// The number of pods which reached phase Failed.
	// +optional
	Failed int32 `json:"failed" protobuf:"varint,6,opt,name=failed"`

	// The desired number of pods, this is typically equal to the number of nodes satisfied to run pods.
	// +optional
	Desired int32 `json:"desired" protobuf:"varint,7,opt,name=desired"`

	// The phase of the job.
	// +optional
	Phase BroadcastJobPhase `json:"phase" protobuf:"varint,8,opt,name=phase"`
}

BroadcastJobStatus defines the observed state of BroadcastJob

func (*BroadcastJobStatus) DeepCopy

func (in *BroadcastJobStatus) DeepCopy() *BroadcastJobStatus

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

func (*BroadcastJobStatus) DeepCopyInto

func (in *BroadcastJobStatus) DeepCopyInto(out *BroadcastJobStatus)

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

type CloneSet added in v0.3.0

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

	Spec   CloneSetSpec   `json:"spec,omitempty"`
	Status CloneSetStatus `json:"status,omitempty"`
}

CloneSet is the Schema for the clonesets API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.labelSelector +kubebuilder:resource:shortName=clone +kubebuilder:printcolumn:name="DESIRED",type="integer",JSONPath=".spec.replicas",description="The desired number of pods." +kubebuilder:printcolumn:name="UPDATED",type="integer",JSONPath=".status.updatedReplicas",description="The number of pods updated." +kubebuilder:printcolumn:name="UPDATED_READY",type="integer",JSONPath=".status.updatedReadyReplicas",description="The number of pods updated and ready." +kubebuilder:printcolumn:name="READY",type="integer",JSONPath=".status.readyReplicas",description="The number of pods ready." +kubebuilder:printcolumn:name="TOTAL",type="integer",JSONPath=".status.replicas",description="The number of currently all pods." +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC."

func (*CloneSet) DeepCopy added in v0.3.0

func (in *CloneSet) DeepCopy() *CloneSet

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

func (*CloneSet) DeepCopyInto added in v0.3.0

func (in *CloneSet) DeepCopyInto(out *CloneSet)

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

func (*CloneSet) DeepCopyObject added in v0.3.0

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

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

type CloneSetCondition added in v0.3.0

type CloneSetCondition struct {
	// Type of CloneSet condition.
	Type CloneSetConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status v1.ConditionStatus `json:"status"`
	// 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,omitempty"`
	// A human readable message indicating details about the transition.
	Message string `json:"message,omitempty"`
}

CloneSetCondition describes the state of a CloneSet at a certain point.

func (*CloneSetCondition) DeepCopy added in v0.3.0

func (in *CloneSetCondition) DeepCopy() *CloneSetCondition

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

func (*CloneSetCondition) DeepCopyInto added in v0.3.0

func (in *CloneSetCondition) DeepCopyInto(out *CloneSetCondition)

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

type CloneSetConditionType added in v0.3.0

type CloneSetConditionType string

CloneSetConditionType is type for CloneSet conditions.

const (
	// CloneSetConditionFailedScale indicates cloneset controller failed to create or delete pods/pvc.
	CloneSetConditionFailedScale CloneSetConditionType = "FailedScale"
	// CloneSetConditionFailedUpdate indicates cloneset controller failed to update pods.
	CloneSetConditionFailedUpdate CloneSetConditionType = "FailedUpdate"
)

type CloneSetInPlaceUpdateStrategy added in v0.3.0

type CloneSetInPlaceUpdateStrategy struct {
}

CloneSetInPlaceUpdateStrategy defines the strategies for in-place update.

func (*CloneSetInPlaceUpdateStrategy) DeepCopy added in v0.3.0

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

func (*CloneSetInPlaceUpdateStrategy) DeepCopyInto added in v0.3.0

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

type CloneSetList added in v0.3.0

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

CloneSetList contains a list of CloneSet

func (*CloneSetList) DeepCopy added in v0.3.0

func (in *CloneSetList) DeepCopy() *CloneSetList

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

func (*CloneSetList) DeepCopyInto added in v0.3.0

func (in *CloneSetList) DeepCopyInto(out *CloneSetList)

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

func (*CloneSetList) DeepCopyObject added in v0.3.0

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

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

type CloneSetScaleStrategy added in v0.3.0

type CloneSetScaleStrategy struct {
	// PodsToDelete is the names of Pod should be deleted.
	// Note that this list will be truncated for non-existing pod names.
	PodsToDelete []string `json:"podsToDelete,omitempty"`
}

CloneSetScaleStrategy defines strategies for pods scale.

func (*CloneSetScaleStrategy) DeepCopy added in v0.3.0

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

func (*CloneSetScaleStrategy) DeepCopyInto added in v0.3.0

func (in *CloneSetScaleStrategy) DeepCopyInto(out *CloneSetScaleStrategy)

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

type CloneSetSpec added in v0.3.0

type CloneSetSpec struct {
	// Replicas is the desired number of replicas of the given Template.
	// These are replicas in the sense that they are instantiations of the
	// same Template.
	// If unspecified, defaults to 1.
	Replicas *int32 `json:"replicas"`

	// Selector is a label query over pods that should match the replica count.
	// It must match the pod template's labels.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
	Selector *metav1.LabelSelector `json:"selector"`

	// Template describes the pods that will be created.
	Template v1.PodTemplateSpec `json:"template"`

	// VolumeClaimTemplates is a list of claims that pods are allowed to reference.
	// Note that PVC will be deleted when its pod has been deleted.
	VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`

	// ScaleStrategy indicates the ScaleStrategy that will be employed to
	// create and delete Pods in the CloneSet.
	ScaleStrategy CloneSetScaleStrategy `json:"scaleStrategy,omitempty"`

	// UpdateStrategy indicates the UpdateStrategy that will be employed to
	// update Pods in the CloneSet when a revision is made to Template.
	UpdateStrategy CloneSetUpdateStrategy `json:"updateStrategy,omitempty"`

	// RevisionHistoryLimit is the maximum number of revisions that will
	// be maintained in the CloneSet's revision history. The revision history
	// consists of all revisions not represented by a currently applied
	// CloneSetSpec version. The default value is 10.
	RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
}

CloneSetSpec defines the desired state of CloneSet

func (*CloneSetSpec) DeepCopy added in v0.3.0

func (in *CloneSetSpec) DeepCopy() *CloneSetSpec

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

func (*CloneSetSpec) DeepCopyInto added in v0.3.0

func (in *CloneSetSpec) DeepCopyInto(out *CloneSetSpec)

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

type CloneSetStatus added in v0.3.0

type CloneSetStatus struct {
	// ObservedGeneration is the most recent generation observed for this CloneSet. It corresponds to the
	// CloneSet's generation, which is updated on mutation by the API Server.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Replicas is the number of Pods created by the CloneSet controller.
	Replicas int32 `json:"replicas"`

	// ReadyReplicas is the number of Pods created by the CloneSet controller that have a Ready Condition.
	ReadyReplicas int32 `json:"readyReplicas"`

	// UpdatedReplicas is the number of Pods created by the CloneSet controller from the CloneSet version
	// indicated by updateRevision.
	UpdatedReplicas int32 `json:"updatedReplicas"`

	// UpdatedReadyReplicas is the number of Pods created by the CloneSet controller from the CloneSet version
	// indicated by updateRevision and have a Ready Condition.
	UpdatedReadyReplicas int32 `json:"updatedReadyReplicas"`

	// UpdateRevision, if not empty, indicates the latest revision of the CloneSet.
	UpdateRevision string `json:"updateRevision,omitempty"`

	// CollisionCount is the count of hash collisions for the CloneSet. The CloneSet controller
	// uses this field as a collision avoidance mechanism when it needs to create the name for the
	// newest ControllerRevision.
	CollisionCount *int32 `json:"collisionCount,omitempty"`

	// Conditions represents the latest available observations of a CloneSet's current state.
	Conditions []CloneSetCondition `json:"conditions,omitempty"`
}

CloneSetStatus defines the observed state of CloneSet

func (*CloneSetStatus) DeepCopy added in v0.3.0

func (in *CloneSetStatus) DeepCopy() *CloneSetStatus

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

func (*CloneSetStatus) DeepCopyInto added in v0.3.0

func (in *CloneSetStatus) DeepCopyInto(out *CloneSetStatus)

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

type CloneSetUpdateStrategy added in v0.3.0

type CloneSetUpdateStrategy struct {
	// Type indicates the type of the CloneSetUpdateStrategy.
	// Default is ReCreate.
	Type CloneSetUpdateStrategyType `json:"type,omitempty"`
	// Partition is the desired number of pods in old revisions. It means when partition
	// is set during pods updating, (replicas - partition) number of pods will be updated.
	// Default value is 0.
	Partition *int32 `json:"partition,omitempty"`
	// Priorities are the rules for calculating the priority of updating pods.
	// Each pod to be updated, will pass through these terms and get a sum of weights.
	PriorityStrategy *UpdatePriorityStrategy `json:"priorityStrategy,omitempty"`
	// The maximum number of pods that can be unavailable during the update.
	// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
	// Absolute number is calculated from percentage by rounding down.
	// Defaults to 10%.
	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
	// Paused indicates that the CloneSet is paused.
	// Default value is false
	Paused bool `json:"paused,omitempty"`
	// InPlaceUpdateStrategy contains strategies for in-place update.
	InPlaceUpdateStrategy *CloneSetInPlaceUpdateStrategy `json:"inPlaceUpdateStrategy,omitempty"`
}

CloneSetUpdateStrategy defines strategies for pods update.

func (*CloneSetUpdateStrategy) DeepCopy added in v0.3.0

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

func (*CloneSetUpdateStrategy) DeepCopyInto added in v0.3.0

func (in *CloneSetUpdateStrategy) DeepCopyInto(out *CloneSetUpdateStrategy)

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

type CloneSetUpdateStrategyType added in v0.3.0

type CloneSetUpdateStrategyType string

CloneSetUpdateStrategyType defines strategies for pods in-place update.

const (
	// RecreateCloneSetUpdateStrategyType indicates that we always delete Pod and create new Pod
	// during Pod update, which is the default behavior.
	RecreateCloneSetUpdateStrategyType CloneSetUpdateStrategyType = "ReCreate"
	// InPlaceIfPossibleCloneSetUpdateStrategyType indicates that we try to in-place update Pod instead of
	// recreating Pod when possible. Currently, only image update of pod spec is allowed. Any other changes to the pod
	// spec will fall back to ReCreate CloneSetUpdateStrategyType where pod will be recreated.
	InPlaceIfPossibleCloneSetUpdateStrategyType CloneSetUpdateStrategyType = "InPlaceIfPossible"
	// InPlaceOnlyCloneSetUpdateStrategyType indicates that we will in-place update Pod instead of
	// recreating pod. Currently we only allow image update for pod spec. Any other changes to the pod spec will be
	// rejected by kube-apiserver
	InPlaceOnlyCloneSetUpdateStrategyType CloneSetUpdateStrategyType = "InPlaceOnly"
)

type CompletionPolicy

type CompletionPolicy struct {
	// Type indicates the type of the CompletionPolicy
	// Default is Always
	Type CompletionPolicyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=CompletionPolicyType"`

	// ActiveDeadlineSeconds specifies the duration in seconds relative to the startTime that the job may be active
	// before the system tries to terminate it; value must be positive integer.
	// Only works for Always type.
	// +optional
	ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,2,opt,name=activeDeadlineSeconds"`

	// ttlSecondsAfterFinished limits the lifetime of a Job that has finished
	// execution (either Complete or Failed). If this field is set,
	// ttlSecondsAfterFinished after the Job finishes, it is eligible to be
	// automatically deleted. When the Job is being deleted, its lifecycle
	// guarantees (e.g. finalizers) will be honored. If this field is unset,
	// the Job won't be automatically deleted. If this field is set to zero,
	// the Job becomes eligible to be deleted immediately after it finishes.
	// This field is alpha-level and is only honored by servers that enable the
	// TTLAfterFinished feature.
	// Only works for Always type
	// +optional
	TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty" protobuf:"varint,4,opt,name=ttlSecondsAfterFinished"`
}

CompletionPolicy indicates the completion policy for the job

func (*CompletionPolicy) DeepCopy

func (in *CompletionPolicy) DeepCopy() *CompletionPolicy

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

func (*CompletionPolicy) DeepCopyInto

func (in *CompletionPolicy) DeepCopyInto(out *CompletionPolicy)

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

type CompletionPolicyType

type CompletionPolicyType string

CompletionPolicyType indicates the type of completion policy

const (
	// Always means the job will eventually finish on these conditions:
	// 1) after all pods on the desired nodes are completed (regardless succeeded or failed),
	// 2) exceeds ActiveDeadlineSeconds,
	// 3) exceeds BackoffLimit.
	// This is the default CompletionPolicyType
	Always CompletionPolicyType = "Always"

	// Never means the job will be kept alive after all pods on the desired nodes are completed.
	// This is useful when new nodes are added after the job completes, the pods will be triggered automatically on those new nodes.
	Never CompletionPolicyType = "Never"
)

type FailurePolicy added in v0.2.0

type FailurePolicy struct {
	// Type indicates the type of FailurePolicyType.
	Type FailurePolicyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=FailurePolicyType"`

	// RestartLimit specifies the number of retries before marking the pod failed.
	RestartLimit int32 `json:"restartLimit,omitempty" protobuf:"varint,2,opt,name=restartLimit"`
}

FailurePolicy indicates the behavior of the job, when failed pod is found.

func (*FailurePolicy) DeepCopy added in v0.2.0

func (in *FailurePolicy) DeepCopy() *FailurePolicy

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

func (*FailurePolicy) DeepCopyInto added in v0.2.0

func (in *FailurePolicy) DeepCopyInto(out *FailurePolicy)

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

type FailurePolicyType added in v0.2.0

type FailurePolicyType string

FailurePolicyType indicates the type of FailurePolicyType.

const (
	// FailurePolicyTypeContinue means the job will be still running, when failed pod is found.
	FailurePolicyTypeContinue FailurePolicyType = "Continue"

	// FailurePolicyTypeFailFast means the job will be failed, when failed pod is found.
	FailurePolicyTypeFailFast FailurePolicyType = "FailFast"

	// FailurePolicyTypePause means the the job will be paused, when failed pod is found.
	FailurePolicyTypePause FailurePolicyType = "Pause"
)

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

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

func (*InPlaceUpdateContainerStatus) DeepCopyInto

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 JobCondition

type JobCondition struct {
	// Type of job condition, Complete or Failed.
	Type JobConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=JobConditionType"`
	// Status of the condition, one of True, False, Unknown.
	Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
	// Last time the condition was checked.
	// +optional
	LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
	// Last time the condition transit from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
	// (brief) reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
	// Human readable message indicating details about last transition.
	// +optional
	Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
}

JobCondition describes current state of a job.

func (*JobCondition) DeepCopy

func (in *JobCondition) DeepCopy() *JobCondition

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

func (*JobCondition) DeepCopyInto

func (in *JobCondition) DeepCopyInto(out *JobCondition)

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

type JobConditionType

type JobConditionType string

JobConditionType indicates valid conditions type of a job

const (
	// JobComplete means the job has completed its execution. A complete job means pods have been deployed on all
	// eligible nodes and all pods have reached succeeded or failed state. Note that the eligible nodes are defined at
	// the beginning of a reconciliation loop. If there are more nodes added within a reconciliation loop, those nodes will
	// not be considered to run pods.
	JobComplete JobConditionType = "Complete"

	// JobFailed means the job has failed its execution. A failed job means the job has either exceeded the
	// ActiveDeadlineSeconds limit, or the aggregated number of container restarts for all pods have exceeded the BackoffLimit.
	JobFailed JobConditionType = "Failed"
)

These are valid conditions of a job.

type ManualUpdate added in v0.3.0

type ManualUpdate struct {
	// Indicates number of subset partition.
	// +optional
	Partitions map[string]int32 `json:"partitions,omitempty"`
}

ManualUpdate is a update strategy which allows users to control the update progress by providing the partition of each subset.

func (*ManualUpdate) DeepCopy added in v0.3.0

func (in *ManualUpdate) DeepCopy() *ManualUpdate

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

func (*ManualUpdate) DeepCopyInto added in v0.3.0

func (in *ManualUpdate) DeepCopyInto(out *ManualUpdate)

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

type PodUpdateStrategyType

type PodUpdateStrategyType string

PodUpdateStrategyType is a string enumeration type that enumerates all possible ways we can update a Pod when updating application

const (
	// RecreatePodUpdateStrategyType indicates that we always delete Pod and create new Pod
	// during Pod update, which is the default behavior
	RecreatePodUpdateStrategyType PodUpdateStrategyType = "ReCreate"
	// InPlaceIfPossiblePodUpdateStrategyType indicates that we try to in-place update Pod instead of
	// recreating Pod when possible. Currently, only image update of pod spec is allowed. Any other changes to the pod
	// spec will fall back to ReCreate PodUpdateStrategyType where pod will be recreated.
	InPlaceIfPossiblePodUpdateStrategyType PodUpdateStrategyType = "InPlaceIfPossible"
	// InPlaceOnlyPodUpdateStrategyType indicates that we will in-place update Pod instead of
	// recreating pod. Currently we only allow image update for pod spec. Any other changes to the pod spec will be
	// rejected by kube-apiserver
	InPlaceOnlyPodUpdateStrategyType PodUpdateStrategyType = "InPlaceOnly"
)

type RollingUpdateSidecarSet added in v0.2.0

type RollingUpdateSidecarSet struct {
	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
}

RollingUpdateSidecarSet is used to communicate parameter

func (*RollingUpdateSidecarSet) DeepCopy added in v0.2.0

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

func (*RollingUpdateSidecarSet) DeepCopyInto added in v0.2.0

func (in *RollingUpdateSidecarSet) DeepCopyInto(out *RollingUpdateSidecarSet)

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

type RollingUpdateStatefulSetStrategy

type RollingUpdateStatefulSetStrategy struct {
	// Partition indicates the ordinal at which the StatefulSet should be partitioned by default.
	// But if unorderedUpdate has been set:
	//   - Partition indicates the number of pods with non-updated revisions when rolling update.
	//   - It means controller will update $(replicas - partition) number of pod.
	// Default value is 0.
	// +optional
	Partition *int32 `json:"partition,omitempty"`
	// The maximum number of pods that can be unavailable during the update.
	// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
	// Absolute number is calculated from percentage by rounding down.
	// Also, maxUnavailable can just be allowed to work with Parallel podManagementPolicy.
	// Defaults to 1.
	// +optional
	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
	// PodUpdatePolicy indicates how pods should be updated
	// Default value is "ReCreate"
	// +optional
	PodUpdatePolicy PodUpdateStrategyType `json:"podUpdatePolicy,omitempty"`
	// Paused indicates that the StatefulSet is paused.
	// Default value is false
	// +optional
	Paused bool `json:"paused,omitempty"`
	// UnorderedUpdate contains strategies for non-ordered update.
	// If it is not nil, pods will be updated with non-ordered sequence.
	// Noted that UnorderedUpdate can only be allowed to work with Parallel podManagementPolicy
	// +optional
	UnorderedUpdate *UnorderedUpdateStrategy `json:"unorderedUpdate,omitempty"`
}

RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.

func (*RollingUpdateStatefulSetStrategy) DeepCopy

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

func (*RollingUpdateStatefulSetStrategy) DeepCopyInto

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

type SidecarContainer

type SidecarContainer struct {
	corev1.Container
}

SidecarContainer defines the container of Sidecar

func (*SidecarContainer) DeepCopy

func (in *SidecarContainer) DeepCopy() *SidecarContainer

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

func (*SidecarContainer) DeepCopyInto

func (in *SidecarContainer) DeepCopyInto(out *SidecarContainer)

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

type SidecarSet

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

	Spec   SidecarSetSpec   `json:"spec,omitempty"`
	Status SidecarSetStatus `json:"status,omitempty"`
}

SidecarSet is the Schema for the sidecarsets API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="MATCHED",type="integer",JSONPath=".status.matchedPods",description="The number of pods matched." +kubebuilder:printcolumn:name="UPDATED",type="integer",JSONPath=".status.updatedPods",description="The number of pods matched and updated." +kubebuilder:printcolumn:name="READY",type="integer",JSONPath=".status.readyPods",description="The number of pods matched and ready." +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC."

func (*SidecarSet) DeepCopy

func (in *SidecarSet) DeepCopy() *SidecarSet

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

func (*SidecarSet) DeepCopyInto

func (in *SidecarSet) DeepCopyInto(out *SidecarSet)

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

func (*SidecarSet) DeepCopyObject

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

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

type SidecarSetList

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

SidecarSetList contains a list of SidecarSet

func (*SidecarSetList) DeepCopy

func (in *SidecarSetList) DeepCopy() *SidecarSetList

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

func (*SidecarSetList) DeepCopyInto

func (in *SidecarSetList) DeepCopyInto(out *SidecarSetList)

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

func (*SidecarSetList) DeepCopyObject

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

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

type SidecarSetSpec

type SidecarSetSpec struct {
	// selector is a label query over pods that should be injected
	Selector *metav1.LabelSelector `json:"selector,omitempty"`

	// Containers is the list of sidecar containers to be injected into the selected pod
	Containers []SidecarContainer `json:"containers,omitempty"`

	// List of volumes that can be mounted by sidecar containers
	Volumes []corev1.Volume `json:"volumes,omitempty"`

	// Paused indicates that the sidecarset is paused and will not be processed by the sidecarset controller.
	Paused bool `json:"paused,omitempty"`

	// The sidecarset strategy to use to replace existing pods with new ones.
	Strategy SidecarSetUpdateStrategy `json:"strategy,omitempty"`
}

SidecarSetSpec defines the desired state of SidecarSet

func (*SidecarSetSpec) DeepCopy

func (in *SidecarSetSpec) DeepCopy() *SidecarSetSpec

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

func (*SidecarSetSpec) DeepCopyInto

func (in *SidecarSetSpec) DeepCopyInto(out *SidecarSetSpec)

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

type SidecarSetStatus

type SidecarSetStatus struct {
	// observedGeneration is the most recent generation observed for this SidecarSet. It corresponds to the
	// SidecarSet's generation, which is updated on mutation by the API Server.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// matchedPods is the number of Pods whose labels are matched with this SidecarSet's selector and are created after sidecarset creates
	MatchedPods int32 `json:"matchedPods"`

	// updatedPods is the number of matched Pods that are injected with the latest SidecarSet's containers
	UpdatedPods int32 `json:"updatedPods"`

	// readyPods is the number of matched Pods that have a ready condition
	ReadyPods int32 `json:"readyPods"`
}

SidecarSetStatus defines the observed state of SidecarSet

func (*SidecarSetStatus) DeepCopy

func (in *SidecarSetStatus) DeepCopy() *SidecarSetStatus

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

func (*SidecarSetStatus) DeepCopyInto

func (in *SidecarSetStatus) DeepCopyInto(out *SidecarSetStatus)

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

type SidecarSetUpdateStrategy added in v0.2.0

type SidecarSetUpdateStrategy struct {
	RollingUpdate *RollingUpdateSidecarSet `json:"rollingUpdate,omitempty"`
}

SidecarSetUpdateStrategy indicates the strategy that the SidecarSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.

func (*SidecarSetUpdateStrategy) DeepCopy added in v0.2.0

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

func (*SidecarSetUpdateStrategy) DeepCopyInto added in v0.2.0

func (in *SidecarSetUpdateStrategy) DeepCopyInto(out *SidecarSetUpdateStrategy)

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

type StatefulSet

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

	Spec   StatefulSetSpec   `json:"spec,omitempty"`
	Status StatefulSetStatus `json:"status,omitempty"`
}

StatefulSet is the Schema for the statefulsets API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.labelSelector +kubebuilder:resource:shortName=sts +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.labelSelector +kubebuilder:printcolumn:name="DESIRED",type="integer",JSONPath=".spec.replicas",description="The desired number of pods." +kubebuilder:printcolumn:name="CURRENT",type="integer",JSONPath=".status.replicas",description="The number of currently all pods." +kubebuilder:printcolumn:name="UPDATED",type="integer",JSONPath=".status.updatedReplicas",description="The number of pods updated." +kubebuilder:printcolumn:name="READY",type="integer",JSONPath=".status.readyReplicas",description="The number of pods ready." +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC."

func (*StatefulSet) DeepCopy

func (in *StatefulSet) DeepCopy() *StatefulSet

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

func (*StatefulSet) DeepCopyInto

func (in *StatefulSet) DeepCopyInto(out *StatefulSet)

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

func (*StatefulSet) DeepCopyObject

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

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

type StatefulSetList

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

StatefulSetList contains a list of StatefulSet

func (*StatefulSetList) DeepCopy

func (in *StatefulSetList) DeepCopy() *StatefulSetList

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

func (*StatefulSetList) DeepCopyInto

func (in *StatefulSetList) DeepCopyInto(out *StatefulSetList)

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

func (*StatefulSetList) DeepCopyObject

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

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

type StatefulSetSpec

type StatefulSetSpec struct {
	// replicas is the desired number of replicas of the given Template.
	// These are replicas in the sense that they are instantiations of the
	// same Template, but individual replicas also have a consistent identity.
	// If unspecified, defaults to 1.
	// TODO: Consider a rename of this field.
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`

	// selector is a label query over pods that should match the replica count.
	// It must match the pod template's labels.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
	Selector *metav1.LabelSelector `json:"selector"`

	// template is the object that describes the pod that will be created if
	// insufficient replicas are detected. Each pod stamped out by the StatefulSet
	// will fulfill this Template, but have a unique identity from the rest
	// of the StatefulSet.
	Template v1.PodTemplateSpec `json:"template"`

	// volumeClaimTemplates is a list of claims that pods are allowed to reference.
	// The StatefulSet controller is responsible for mapping network identities to
	// claims in a way that maintains the identity of a pod. Every claim in
	// this list must have at least one matching (by name) volumeMount in one
	// container in the template. A claim in this list takes precedence over
	// any volumes in the template, with the same name.
	// TODO: Define the behavior if a claim already exists with the same name.
	// +optional
	VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`

	// serviceName is the name of the service that governs this StatefulSet.
	// This service must exist before the StatefulSet, and is responsible for
	// the network identity of the set. Pods get DNS/hostnames that follow the
	// pattern: pod-specific-string.serviceName.default.svc.cluster.local
	// where "pod-specific-string" is managed by the StatefulSet controller.
	ServiceName string `json:"serviceName,omitempty"`

	// podManagementPolicy controls how pods are created during initial scale up,
	// when replacing pods on nodes, or when scaling down. The default policy is
	// `OrderedReady`, where pods are created in increasing order (pod-0, then
	// pod-1, etc) and the controller will wait until each pod is ready before
	// continuing. When scaling down, the pods are removed in the opposite order.
	// The alternative policy is `Parallel` which will create pods in parallel
	// to match the desired scale without waiting, and on scale down will delete
	// all pods at once.
	// +optional
	PodManagementPolicy apps.PodManagementPolicyType `json:"podManagementPolicy,omitempty"`

	// updateStrategy indicates the StatefulSetUpdateStrategy that will be
	// employed to update Pods in the StatefulSet when a revision is made to
	// Template.
	UpdateStrategy StatefulSetUpdateStrategy `json:"updateStrategy,omitempty"`

	// revisionHistoryLimit is the maximum number of revisions that will
	// be maintained in the StatefulSet's revision history. The revision history
	// consists of all revisions not represented by a currently applied
	// StatefulSetSpec version. The default value is 10.
	RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
}

StatefulSetSpec defines the desired state of StatefulSet

func (*StatefulSetSpec) DeepCopy

func (in *StatefulSetSpec) DeepCopy() *StatefulSetSpec

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

func (*StatefulSetSpec) DeepCopyInto

func (in *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec)

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

type StatefulSetStatus

type StatefulSetStatus struct {
	// observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
	// StatefulSet's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// replicas is the number of Pods created by the StatefulSet controller.
	Replicas int32 `json:"replicas"`

	// readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
	ReadyReplicas int32 `json:"readyReplicas"`

	// currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
	// indicated by currentRevision.
	CurrentReplicas int32 `json:"currentReplicas"`

	// updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
	// indicated by updateRevision.
	UpdatedReplicas int32 `json:"updatedReplicas"`

	// currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
	// sequence [0,currentReplicas).
	CurrentRevision string `json:"currentRevision,omitempty"`

	// updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
	// [replicas-updatedReplicas,replicas)
	UpdateRevision string `json:"updateRevision,omitempty"`

	// collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller
	// uses this field as a collision avoidance mechanism when it needs to create the name for the
	// newest ControllerRevision.
	// +optional
	CollisionCount *int32 `json:"collisionCount,omitempty"`

	// Represents the latest available observations of a statefulset's current state.
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions []apps.StatefulSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}

StatefulSetStatus defines the observed state of StatefulSet

func (*StatefulSetStatus) DeepCopy

func (in *StatefulSetStatus) DeepCopy() *StatefulSetStatus

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

func (*StatefulSetStatus) DeepCopyInto

func (in *StatefulSetStatus) DeepCopyInto(out *StatefulSetStatus)

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

type StatefulSetTemplateSpec added in v0.3.0

type StatefulSetTemplateSpec struct {
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              appsv1.StatefulSetSpec `json:"spec"`
}

StatefulSetTemplateSpec defines the subset template of StatefulSet.

func (*StatefulSetTemplateSpec) DeepCopy added in v0.3.0

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

func (*StatefulSetTemplateSpec) DeepCopyInto added in v0.3.0

func (in *StatefulSetTemplateSpec) DeepCopyInto(out *StatefulSetTemplateSpec)

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

type StatefulSetUpdateStrategy

type StatefulSetUpdateStrategy struct {
	// Type indicates the type of the StatefulSetUpdateStrategy.
	// Default is RollingUpdate.
	// +optional
	Type apps.StatefulSetUpdateStrategyType `json:"type,omitempty"`
	// RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
	// +optional
	RollingUpdate *RollingUpdateStatefulSetStrategy `json:"rollingUpdate,omitempty"`
}

StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.

func (*StatefulSetUpdateStrategy) DeepCopy

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

func (*StatefulSetUpdateStrategy) DeepCopyInto

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

type Subset added in v0.3.0

type Subset struct {
	// Indicates subset name as a DNS_LABEL, which will be used to generate
	// subset workload name prefix in the format '<deployment-name>-<subset-name>-'.
	// Name should be unique between all of the subsets under one UnitedDeployment.
	Name string `json:"name"`

	// Indicates the node selector to form the subset. Depending on the node selector,
	// pods provisioned could be distributed across multiple groups of nodes.
	// A subset's nodeSelectorTerm is not allowed to be updated.
	// +optional
	NodeSelectorTerm corev1.NodeSelectorTerm `json:"nodeSelectorTerm,omitempty"`

	// Indicates the number of the pod to be created under this subset. Replicas could also be
	// percentage like '10%', which means 10% of UnitedDeployment replicas of pods will be distributed
	// under this subset. If nil, the number of replicas in this subset is determined by controller.
	// Controller will try to keep all the subsets with nil replicas have average pods.
	// +optional
	Replicas *intstr.IntOrString `json:"replicas,omitempty"`
}

Subset defines the detail of a subset.

func (*Subset) DeepCopy added in v0.3.0

func (in *Subset) DeepCopy() *Subset

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

func (*Subset) DeepCopyInto added in v0.3.0

func (in *Subset) DeepCopyInto(out *Subset)

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

type SubsetTemplate added in v0.3.0

type SubsetTemplate struct {
	// StatefulSet template
	// +optional
	StatefulSetTemplate *StatefulSetTemplateSpec `json:"statefulSetTemplate,omitempty"`
}

SubsetTemplate defines the subset template under the UnitedDeployment. UnitedDeployment will provision every subset based on one workload templates in SubsetTemplate.

func (*SubsetTemplate) DeepCopy added in v0.3.0

func (in *SubsetTemplate) DeepCopy() *SubsetTemplate

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

func (*SubsetTemplate) DeepCopyInto added in v0.3.0

func (in *SubsetTemplate) DeepCopyInto(out *SubsetTemplate)

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

type Topology added in v0.3.0

type Topology struct {
	// Contains the details of each subset. Each element in this array represents one subset
	// which will be provisioned and managed by UnitedDeployment.
	// +optional
	Subsets []Subset `json:"subsets,omitempty"`
}

Topology defines the spread detail of each subset under UnitedDeployment. A UnitedDeployment manages multiple homogeneous workloads which are called subset. Each of subsets under the UnitedDeployment is described in Topology.

func (*Topology) DeepCopy added in v0.3.0

func (in *Topology) DeepCopy() *Topology

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

func (*Topology) DeepCopyInto added in v0.3.0

func (in *Topology) DeepCopyInto(out *Topology)

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

type UnitedDeployment added in v0.3.0

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

	Spec   UnitedDeploymentSpec   `json:"spec,omitempty"`
	Status UnitedDeploymentStatus `json:"status,omitempty"`
}

UnitedDeployment is the Schema for the uniteddeployments API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector +kubebuilder:resource:shortName=ud +kubebuilder:printcolumn:name="DESIRED",type="integer",JSONPath=".spec.replicas",description="The desired number of pods." +kubebuilder:printcolumn:name="CURRENT",type="integer",JSONPath=".status.replicas",description="The number of currently all pods." +kubebuilder:printcolumn:name="UPDATED",type="integer",JSONPath=".status.updatedReplicas",description="The number of pods updated." +kubebuilder:printcolumn:name="READY",type="integer",JSONPath=".status.readyReplicas",description="The number of pods ready." +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC."

func (*UnitedDeployment) DeepCopy added in v0.3.0

func (in *UnitedDeployment) DeepCopy() *UnitedDeployment

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

func (*UnitedDeployment) DeepCopyInto added in v0.3.0

func (in *UnitedDeployment) DeepCopyInto(out *UnitedDeployment)

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

func (*UnitedDeployment) DeepCopyObject added in v0.3.0

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

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

type UnitedDeploymentCondition added in v0.3.0

type UnitedDeploymentCondition struct {
	// Type of in place set condition.
	Type UnitedDeploymentConditionType `json:"type,omitempty"`

	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status,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,omitempty"`

	// A human readable message indicating details about the transition.
	Message string `json:"message,omitempty"`
}

UnitedDeploymentCondition describes current state of a UnitedDeployment.

func (*UnitedDeploymentCondition) DeepCopy added in v0.3.0

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

func (*UnitedDeploymentCondition) DeepCopyInto added in v0.3.0

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

type UnitedDeploymentConditionType added in v0.3.0

type UnitedDeploymentConditionType string

UnitedDeploymentConditionType indicates valid conditions type of a UnitedDeployment.

const (
	// SubsetProvisioned means all the expected subsets are provisioned and unexpected subsets are deleted.
	SubsetProvisioned UnitedDeploymentConditionType = "SubsetProvisioned"
	// SubsetUpdated means all the subsets are updated.
	SubsetUpdated UnitedDeploymentConditionType = "SubsetUpdated"
	// SubsetFailure is added to a UnitedDeployment when one of its subsets has failure during its own reconciling.
	SubsetFailure UnitedDeploymentConditionType = "SubsetFailure"
)

type UnitedDeploymentList added in v0.3.0

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

UnitedDeploymentList contains a list of UnitedDeployment.

func (*UnitedDeploymentList) DeepCopy added in v0.3.0

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

func (*UnitedDeploymentList) DeepCopyInto added in v0.3.0

func (in *UnitedDeploymentList) DeepCopyInto(out *UnitedDeploymentList)

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

func (*UnitedDeploymentList) DeepCopyObject added in v0.3.0

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

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

type UnitedDeploymentSpec added in v0.3.0

type UnitedDeploymentSpec struct {
	// Replicas is the total desired replicas of all the subsets.
	// If unspecified, defaults to 1.
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`

	// Selector is a label query over pods that should match the replica count.
	// It must match the pod template's labels.
	Selector *metav1.LabelSelector `json:"selector"`

	// Template describes the subset that will be created.
	// +optional
	Template SubsetTemplate `json:"template,omitempty"`

	// Topology describes the pods distribution detail between each of subsets.
	// +optional
	Topology Topology `json:"topology,omitempty"`

	// UpdateStrategy indicates the strategy the UnitedDeployment use to preform the update,
	// when template is changed.
	// +optional
	UpdateStrategy UnitedDeploymentUpdateStrategy `json:"updateStrategy,omitempty"`

	// Indicates the number of histories to be conserved.
	// If unspecified, defaults to 10.
	// +optional
	RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
}

UnitedDeploymentSpec defines the desired state of UnitedDeployment.

func (*UnitedDeploymentSpec) DeepCopy added in v0.3.0

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

func (*UnitedDeploymentSpec) DeepCopyInto added in v0.3.0

func (in *UnitedDeploymentSpec) DeepCopyInto(out *UnitedDeploymentSpec)

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

type UnitedDeploymentStatus added in v0.3.0

type UnitedDeploymentStatus struct {
	// ObservedGeneration is the most recent generation observed for this UnitedDeployment. It corresponds to the
	// UnitedDeployment's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// The number of ready replicas.
	// +optional
	ReadyReplicas int32 `json:"readyReplicas,omitempty"`

	// Replicas is the most recently observed number of replicas.
	Replicas int32 `json:"replicas"`

	// The number of pods in current version.
	UpdatedReplicas int32 `json:"updatedReplicas"`

	// The number of ready current revision replicas for this UnitedDeployment.
	// +optional
	UpdatedReadyReplicas int32 `json:"updatedReadyReplicas,omitempty"`

	// Count of hash collisions for the UnitedDeployment. The UnitedDeployment controller
	// uses this field as a collision avoidance mechanism when it needs to
	// create the name for the newest ControllerRevision.
	// +optional
	CollisionCount *int32 `json:"collisionCount,omitempty"`

	// CurrentRevision, if not empty, indicates the current version of the UnitedDeployment.
	CurrentRevision string `json:"currentRevision"`

	// Records the topology detail information of the replicas of each subset.
	// +optional
	SubsetReplicas map[string]int32 `json:"subsetReplicas,omitempty"`

	// Represents the latest available observations of a UnitedDeployment's current state.
	// +optional
	Conditions []UnitedDeploymentCondition `json:"conditions,omitempty"`

	// Records the information of update progress.
	// +optional
	UpdateStatus *UpdateStatus `json:"updateStatus,omitempty"`
}

UnitedDeploymentStatus defines the observed state of UnitedDeployment.

func (*UnitedDeploymentStatus) DeepCopy added in v0.3.0

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

func (*UnitedDeploymentStatus) DeepCopyInto added in v0.3.0

func (in *UnitedDeploymentStatus) DeepCopyInto(out *UnitedDeploymentStatus)

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

type UnitedDeploymentUpdateStrategy added in v0.3.0

type UnitedDeploymentUpdateStrategy struct {
	// Type of UnitedDeployment update strategy.
	// Default is Manual.
	// +optional
	Type UpdateStrategyType `json:"type,omitempty"`
	// Includes all of the parameters a Manual update strategy needs.
	// +optional
	ManualUpdate *ManualUpdate `json:"manualUpdate,omitempty"`
}

UnitedDeploymentUpdateStrategy defines the update performance when template of UnitedDeployment is changed.

func (*UnitedDeploymentUpdateStrategy) DeepCopy added in v0.3.0

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

func (*UnitedDeploymentUpdateStrategy) DeepCopyInto added in v0.3.0

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

type UnorderedUpdateStrategy added in v0.3.1

type UnorderedUpdateStrategy struct {
	// Priorities are the rules for calculating the priority of updating pods.
	// Each pod to be updated, will pass through these terms and get a sum of weights.
	// +optional
	PriorityStrategy *UpdatePriorityStrategy `json:"priorityStrategy,omitempty"`
}

UnorderedUpdateStrategy defines strategies for non-ordered update.

func (*UnorderedUpdateStrategy) DeepCopy added in v0.3.1

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

func (*UnorderedUpdateStrategy) DeepCopyInto added in v0.3.1

func (in *UnorderedUpdateStrategy) DeepCopyInto(out *UnorderedUpdateStrategy)

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

type UpdatePriorityOrderTerm added in v0.3.0

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 added in v0.3.0

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

func (*UpdatePriorityOrderTerm) DeepCopyInto added in v0.3.0

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 added in v0.3.0

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 added in v0.3.0

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

func (*UpdatePriorityStrategy) DeepCopyInto added in v0.3.0

func (in *UpdatePriorityStrategy) DeepCopyInto(out *UpdatePriorityStrategy)

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

type UpdatePriorityWeightTerm added in v0.3.0

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 added in v0.3.0

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

func (*UpdatePriorityWeightTerm) DeepCopyInto added in v0.3.0

func (in *UpdatePriorityWeightTerm) DeepCopyInto(out *UpdatePriorityWeightTerm)

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

type UpdateStatus added in v0.3.0

type UpdateStatus struct {
	// Records the latest revision.
	// +optional
	UpdatedRevision string `json:"updatedRevision,omitempty"`

	// Records the current partition.
	// +optional
	CurrentPartitions map[string]int32 `json:"currentPartitions,omitempty"`
}

UpdateStatus defines the observed update state of UnitedDeployment.

func (*UpdateStatus) DeepCopy added in v0.3.0

func (in *UpdateStatus) DeepCopy() *UpdateStatus

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

func (*UpdateStatus) DeepCopyInto added in v0.3.0

func (in *UpdateStatus) DeepCopyInto(out *UpdateStatus)

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

type UpdateStrategyType added in v0.3.0

type UpdateStrategyType string

UpdateStrategyType is a string enumeration type that enumerates all possible update strategies for the UnitedDeployment controller.

const (
	// ManualUpdateStrategyType indicates the partition of each subset.
	// The update progress is able to be controlled by updating the partitions
	// of each subset.
	ManualUpdateStrategyType UpdateStrategyType = "Manual"
)

Jump to

Keyboard shortcuts

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