v1alpha1

package
Version: v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: Apache-2.0 Imports: 12 Imported by: 40

Documentation

Overview

+k8s:openapi-gen=true +groupName=apps.kruise.io

Package v1alpha1 contains API Schema definitions for the apps v1alpha1 API group +kubebuilder:object:generate=true +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 = "20%"
)
View Source
const (
	// [Immutable] Pod name of this ContainerRecreateRequest.
	ContainerRecreateRequestPodNameKey = "crr.apps.kruise.io/pod-name"
	// [Immutable] Pod UID of this ContainerRecreateRequest.
	ContainerRecreateRequestPodUIDKey = "crr.apps.kruise.io/pod-uid"
	// [Immutable] Node name of this ContainerRecreateRequest.
	ContainerRecreateRequestNodeNameKey = "crr.apps.kruise.io/node-name"

	// ContainerRecreateRequestActiveKey indicates if this ContainerRecreateRequest is active.
	// It will be removed in labels since a ContainerRecreateRequest has completed.
	// We use it mainly to make kruise-daemon do not list watch those ContainerRecreateRequests that have completed.
	ContainerRecreateRequestActiveKey = "crr.apps.kruise.io/active"
	// ContainerRecreateRequestSyncContainerStatusesKey contains the container statuses in current Pod.
	// It is only synchronized during a ContainerRecreateRequest in Recreating phase.
	ContainerRecreateRequestSyncContainerStatusesKey = "crr.apps.kruise.io/sync-container-statuses"
	// ContainerRecreateRequestUnreadyAcquiredKey indicates the Pod has been forced to not-ready.
	// It is required if the unreadyGracePeriodSeconds is set in ContainerRecreateRequests.
	ContainerRecreateRequestUnreadyAcquiredKey = "crr.apps.kruise.io/unready-acquired"
)
View Source
const (
	// Replace the old daemons by new ones using rolling update i.e replace them on each node one after the other.
	RollingUpdateDaemonSetStrategyType DaemonSetUpdateStrategyType = "RollingUpdate"

	// Replace the old daemons only when it's killed
	OnDeleteDaemonSetStrategyType DaemonSetUpdateStrategyType = "OnDelete"

	// StandardRollingUpdateType replace the old daemons by new ones using rolling update i.e replace them on each node one after the other.
	// this is the default type for RollingUpdate.
	StandardRollingUpdateType RollingUpdateType = "Standard"

	// SurgingRollingUpdateType replaces the old daemons by new ones using rolling update i.e replace them on each node one
	// after the other, creating the new pod and then killing the old one.
	SurgingRollingUpdateType RollingUpdateType = "Surging"
)
View Source
const (
	ImagePreDownloadParallelismKey    = "apps.kruise.io/image-predownload-parallelism"
	ImagePreDownloadTimeoutSecondsKey = "apps.kruise.io/image-predownload-timeout-seconds"
)
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"

	// SpecifiedDeleteKey indicates this object should be deleted, and the value could be the deletion option.
	SpecifiedDeleteKey = "apps.kruise.io/specified-delete"

	// ImagePreDownloadCreatedKey indicates the images of this revision have been pre-downloaded
	ImagePreDownloadCreatedKey = "apps.kruise.io/pre-predownload-created"

	// ImagePreDownloadIgnoredKey indicates the images of this revision have been ignored to pre-download
	ImagePreDownloadIgnoredKey = "apps.kruise.io/image-predownload-ignored"
)
View Source
const AdvancedCronJobKind = "AdvancedCronJob"
View Source
const (
	// DefaultDaemonSetUniqueLabelKey is the default label key that is added
	// to existing DaemonSet pods to distinguish between old and new
	// DaemonSet pods during DaemonSet template updates.
	DefaultDaemonSetUniqueLabelKey = ControllerRevisionHashLabelKey
)
View Source
const (
	// MaxMinReadySeconds is the max value of MinReadySeconds
	MaxMinReadySeconds = 300
)

Variables

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

	SchemeGroupVersion = GroupVersion

	// 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
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

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

Types

type AdaptiveWorkloadSpreadStrategy added in v0.10.0

type AdaptiveWorkloadSpreadStrategy struct {
	// DisableSimulationSchedule indicates whether to disable the feature of simulation schedule.
	// Default is false.
	// Webhook can take a simple general predicates to check whether Pod can be scheduled into this subset,
	// but it just considers the Node resource and cannot replace scheduler to do richer predicates practically.
	// +optional
	DisableSimulationSchedule bool `json:"disableSimulationSchedule,omitempty"`

	// RescheduleCriticalSeconds indicates how long controller will reschedule a schedule failed Pod to the subset that has
	// redundant capacity after the subset where the Pod lives. If a Pod was scheduled failed and still in a unschedulabe status
	// over RescheduleCriticalSeconds duration, the controller will reschedule it to a suitable subset.
	// +optional
	RescheduleCriticalSeconds *int32 `json:"rescheduleCriticalSeconds,omitempty"`
}

AdaptiveWorkloadSpreadStrategy is used to communicate parameters when Type is AdaptiveWorkloadSpreadScheduleStrategyType.

func (*AdaptiveWorkloadSpreadStrategy) DeepCopy added in v0.10.0

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

func (*AdaptiveWorkloadSpreadStrategy) DeepCopyInto added in v0.10.0

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

type AdvancedCronJob added in v0.7.0

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

	Spec   AdvancedCronJobSpec   `json:"spec,omitempty"`
	Status AdvancedCronJobStatus `json:"status,omitempty"`
}

AdvancedCronJob is the Schema for the advancedcronjobs API

func (*AdvancedCronJob) DeepCopy added in v0.7.0

func (in *AdvancedCronJob) DeepCopy() *AdvancedCronJob

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

func (*AdvancedCronJob) DeepCopyInto added in v0.7.0

func (in *AdvancedCronJob) DeepCopyInto(out *AdvancedCronJob)

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

func (*AdvancedCronJob) DeepCopyObject added in v0.7.0

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

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

type AdvancedCronJobList added in v0.7.0

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

AdvancedCronJobList contains a list of AdvancedCronJob

func (*AdvancedCronJobList) DeepCopy added in v0.7.0

func (in *AdvancedCronJobList) DeepCopy() *AdvancedCronJobList

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

func (*AdvancedCronJobList) DeepCopyInto added in v0.7.0

func (in *AdvancedCronJobList) DeepCopyInto(out *AdvancedCronJobList)

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

func (*AdvancedCronJobList) DeepCopyObject added in v0.7.0

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

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

type AdvancedCronJobSpec added in v0.7.0

type AdvancedCronJobSpec struct {

	// The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
	Schedule string `json:"schedule" protobuf:"bytes,1,opt,name=schedule"`

	// Optional deadline in seconds for starting the job if it misses scheduled
	// time for any reason.  Missed jobs executions will be counted as failed ones.
	// +optional
	StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty" protobuf:"varint,2,opt,name=startingDeadlineSeconds"`

	// Specifies how to treat concurrent executions of a Job.
	// Valid values are:
	// - "Allow" (default): allows CronJobs to run concurrently;
	// - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
	// - "Replace": cancels currently running job and replaces it with a new one
	// +optional
	ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty" protobuf:"bytes,3,opt,name=concurrencyPolicy"`

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

	// The number of successful finished jobs to retain.
	// This is a pointer to distinguish between explicit zero and not specified.
	// +optional
	SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty" protobuf:"varint,5,opt,name=successfulJobsHistoryLimit"`

	// The number of failed finished jobs to retain.
	// This is a pointer to distinguish between explicit zero and not specified.
	// +optional
	FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty" protobuf:"varint,6,opt,name=failedJobsHistoryLimit"`

	// Specifies the job that will be created when executing a CronJob.
	Template CronJobTemplate `json:"template" protobuf:"bytes,7,opt,name=template"`
}

AdvancedCronJobSpec defines the desired state of AdvancedCronJob

func (*AdvancedCronJobSpec) DeepCopy added in v0.7.0

func (in *AdvancedCronJobSpec) DeepCopy() *AdvancedCronJobSpec

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

func (*AdvancedCronJobSpec) DeepCopyInto added in v0.7.0

func (in *AdvancedCronJobSpec) DeepCopyInto(out *AdvancedCronJobSpec)

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

type AdvancedCronJobStatus added in v0.7.0

type AdvancedCronJobStatus struct {
	Type TemplateKind `json:"type,omitempty"`

	// A list of pointers to currently running jobs.
	// +optional
	Active []corev1.ObjectReference `json:"active,omitempty"`

	// Information when was the last time the job was successfully scheduled.
	// +optional
	LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"`
}

AdvancedCronJobStatus defines the observed state of AdvancedCronJob

func (*AdvancedCronJobStatus) DeepCopy added in v0.7.0

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

func (*AdvancedCronJobStatus) DeepCopyInto added in v0.7.0

func (in *AdvancedCronJobStatus) DeepCopyInto(out *AdvancedCronJobStatus)

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

type AdvancedStatefulSetTemplateSpec

type AdvancedStatefulSetTemplateSpec struct {
	// +kubebuilder:validation:XPreserveUnknownFields
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              StatefulSetSpec `json:"spec"`
}

AdvancedStatefulSetTemplateSpec defines the subset template of AdvancedStatefulSet.

func (*AdvancedStatefulSetTemplateSpec) DeepCopy

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

func (*AdvancedStatefulSetTemplateSpec) DeepCopyInto

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

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

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

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

type BroadcastJobTemplateSpec struct {
	// Standard object's metadata of the jobs created from this template.
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Specification of the desired behavior of the broadcastjob.
	// +optional
	Spec BroadcastJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}

JobTemplateSpec describes the data a Job should have when created from a template

func (*BroadcastJobTemplateSpec) DeepCopy added in v0.7.0

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

func (*BroadcastJobTemplateSpec) DeepCopyInto added in v0.7.0

func (in *BroadcastJobTemplateSpec) DeepCopyInto(out *BroadcastJobTemplateSpec)

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

type CloneSet

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

func (*CloneSet) DeepCopy

func (in *CloneSet) DeepCopy() *CloneSet

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

func (*CloneSet) DeepCopyInto

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

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

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

type CloneSetCondition

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

func (in *CloneSetCondition) DeepCopy() *CloneSetCondition

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

func (*CloneSetCondition) DeepCopyInto

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

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 CloneSetList

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

func (in *CloneSetList) DeepCopy() *CloneSetList

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

func (*CloneSetList) DeepCopyInto

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

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

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

type CloneSetScaleStrategy

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

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

func (*CloneSetScaleStrategy) DeepCopyInto

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

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,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 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"`

	// Minimum number of seconds for which a newly created pod should be ready
	// without any of its container crashing, for it to be considered available.
	// Defaults to 0 (pod will be considered available as soon as it is ready)
	MinReadySeconds int32 `json:"minReadySeconds,omitempty"`

	// Lifecycle defines the lifecycle hooks for Pods pre-delete, in-place update.
	Lifecycle *appspub.Lifecycle `json:"lifecycle,omitempty"`
}

CloneSetSpec defines the desired state of CloneSet

func (*CloneSetSpec) DeepCopy

func (in *CloneSetSpec) DeepCopy() *CloneSetSpec

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

func (*CloneSetSpec) DeepCopyInto

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

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"`

	// AvailableReplicas is the number of Pods created by the CloneSet controller that have a Ready Condition for at least minReadySeconds.
	AvailableReplicas int32 `json:"availableReplicas"`

	// 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"`

	// currentRevision, if not empty, indicates the current revision version of the CloneSet.
	CurrentRevision string `json:"currentRevision,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"`

	// LabelSelector is label selectors for query over pods that should match the replica count used by HPA.
	LabelSelector string `json:"labelSelector,omitempty"`
}

CloneSetStatus defines the observed state of CloneSet

func (*CloneSetStatus) DeepCopy

func (in *CloneSetStatus) DeepCopy() *CloneSetStatus

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

func (*CloneSetStatus) DeepCopyInto

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

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

type CloneSetTemplateSpec added in v0.6.1

type CloneSetTemplateSpec struct {
	// +kubebuilder:validation:XPreserveUnknownFields
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              CloneSetSpec `json:"spec"`
}

CloneSetTemplateSpec defines the subset template of CloneSet.

func (*CloneSetTemplateSpec) DeepCopy added in v0.6.1

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

func (*CloneSetTemplateSpec) DeepCopyInto added in v0.6.1

func (in *CloneSetTemplateSpec) DeepCopyInto(out *CloneSetTemplateSpec)

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

type CloneSetUpdateStrategy

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.
	// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
	// Absolute number is calculated from percentage by rounding up by default.
	// It means when partition is set during pods updating, (replicas - partition value) number of pods will be updated.
	// Default value is 0.
	Partition *intstr.IntOrString `json:"partition,omitempty"`
	// The maximum number of pods that can be unavailable during update or scale.
	// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
	// Absolute number is calculated from percentage by rounding up by default.
	// When maxSurge > 0, absolute number is calculated from percentage by rounding down.
	// Defaults to 20%.
	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
	// The maximum number of pods that can be scheduled above the desired replicas during update or specified delete.
	// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
	// Absolute number is calculated from percentage by rounding up.
	// Defaults to 0.
	MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"`
	// Paused indicates that the CloneSet is paused.
	// Default value is false
	Paused bool `json:"paused,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 *appspub.UpdatePriorityStrategy `json:"priorityStrategy,omitempty"`
	// ScatterStrategy defines the scatter rules to make pods been scattered when update.
	// This will avoid pods with the same key-value to be updated in one batch.
	// - Note that pods will be scattered after priority sort. So, although priority strategy and scatter strategy can be applied together, we suggest to use either one of them.
	// - If scatterStrategy is used, we suggest to just use one term. Otherwise, the update order can be hard to understand.
	ScatterStrategy UpdateScatterStrategy `json:"scatterStrategy,omitempty"`
	// InPlaceUpdateStrategy contains strategies for in-place update.
	InPlaceUpdateStrategy *appspub.InPlaceUpdateStrategy `json:"inPlaceUpdateStrategy,omitempty"`
}

CloneSetUpdateStrategy defines strategies for pods update.

func (*CloneSetUpdateStrategy) DeepCopy

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

func (*CloneSetUpdateStrategy) DeepCopyInto

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

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

type ConcurrencyPolicy string

ConcurrencyPolicy describes how the job will be handled. Only one of the following concurrent policies may be specified. If none of the following policies is specified, the default one is AllowConcurrent. +kubebuilder:validation:Enum=Allow;Forbid;Replace

const (
	// AllowConcurrent allows CronJobs to run concurrently.
	AllowConcurrent ConcurrencyPolicy = "Allow"

	// ForbidConcurrent forbids concurrent runs, skipping next run if previous
	// hasn't finished yet.
	ForbidConcurrent ConcurrencyPolicy = "Forbid"

	// ReplaceConcurrent cancels currently running job and replaces it with a new one.
	ReplaceConcurrent ConcurrencyPolicy = "Replace"
)

type ContainerRecreateRequest added in v0.9.0

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

	Spec   ContainerRecreateRequestSpec   `json:"spec,omitempty"`
	Status ContainerRecreateRequestStatus `json:"status,omitempty"`
}

ContainerRecreateRequest is the Schema for the containerrecreaterequests API

func (*ContainerRecreateRequest) DeepCopy added in v0.9.0

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

func (*ContainerRecreateRequest) DeepCopyInto added in v0.9.0

func (in *ContainerRecreateRequest) DeepCopyInto(out *ContainerRecreateRequest)

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

func (*ContainerRecreateRequest) DeepCopyObject added in v0.9.0

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

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

type ContainerRecreateRequestContainer added in v0.9.0

type ContainerRecreateRequestContainer struct {
	// Name of the container that need to recreate.
	// It must be existing in the real pod.Spec.Containers.
	Name string `json:"name"`
	// PreStop is synced from the real container in Pod spec during this ContainerRecreateRequest creating.
	// Populated by the system.
	// Read-only.
	PreStop *v1.Handler `json:"preStop,omitempty"`
	// Ports is synced from the real container in Pod spec during this ContainerRecreateRequest creating.
	// Populated by the system.
	// Read-only.
	Ports []v1.ContainerPort `json:"ports,omitempty"`
	// StatusContext is synced from the real Pod status during this ContainerRecreateRequest creating.
	// Populated by the system.
	// Read-only.
	StatusContext *ContainerRecreateRequestContainerContext `json:"statusContext,omitempty"`
}

ContainerRecreateRequestContainer defines the container that need to recreate.

func (*ContainerRecreateRequestContainer) DeepCopy added in v0.9.0

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

func (*ContainerRecreateRequestContainer) DeepCopyInto added in v0.9.0

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

type ContainerRecreateRequestContainerContext added in v0.9.0

type ContainerRecreateRequestContainerContext struct {
	// Container's ID in the format 'docker://<container_id>'.
	ContainerID string `json:"containerID"`
	// The number of times the container has been restarted, currently based on
	// the number of dead containers that have not yet been removed.
	// Note that this is calculated from dead containers. But those containers are subject to
	// garbage collection. This value will get capped at 5 by GC.
	RestartCount int32 `json:"restartCount"`
}

ContainerRecreateRequestContainerContext contains context status of the container that need to recreate.

func (*ContainerRecreateRequestContainerContext) DeepCopy added in v0.9.0

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

func (*ContainerRecreateRequestContainerContext) DeepCopyInto added in v0.9.0

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

type ContainerRecreateRequestContainerRecreateState added in v0.9.0

type ContainerRecreateRequestContainerRecreateState struct {
	// Name of the container.
	Name string `json:"name"`
	// Phase indicates the recreation phase of the container.
	Phase ContainerRecreateRequestPhase `json:"phase"`
	// A human readable message indicating details about this state.
	Message string `json:"message,omitempty"`
}

ContainerRecreateRequestContainerRecreateState contains the recreation state of the container.

func (*ContainerRecreateRequestContainerRecreateState) DeepCopy added in v0.9.0

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

func (*ContainerRecreateRequestContainerRecreateState) DeepCopyInto added in v0.9.0

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

type ContainerRecreateRequestFailurePolicyType added in v0.9.0

type ContainerRecreateRequestFailurePolicyType string
const (
	ContainerRecreateRequestFailurePolicyFail   ContainerRecreateRequestFailurePolicyType = "Fail"
	ContainerRecreateRequestFailurePolicyIgnore ContainerRecreateRequestFailurePolicyType = "Ignore"
)

type ContainerRecreateRequestList added in v0.9.0

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

ContainerRecreateRequestList contains a list of ContainerRecreateRequest

func (*ContainerRecreateRequestList) DeepCopy added in v0.9.0

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

func (*ContainerRecreateRequestList) DeepCopyInto added in v0.9.0

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

func (*ContainerRecreateRequestList) DeepCopyObject added in v0.9.0

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

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

type ContainerRecreateRequestPhase added in v0.9.0

type ContainerRecreateRequestPhase string
const (
	ContainerRecreateRequestPending    ContainerRecreateRequestPhase = "Pending"
	ContainerRecreateRequestRecreating ContainerRecreateRequestPhase = "Recreating"
	ContainerRecreateRequestSucceeded  ContainerRecreateRequestPhase = "Succeeded"
	ContainerRecreateRequestFailed     ContainerRecreateRequestPhase = "Failed"
	ContainerRecreateRequestCompleted  ContainerRecreateRequestPhase = "Completed"
)

type ContainerRecreateRequestSpec added in v0.9.0

type ContainerRecreateRequestSpec struct {
	// PodName is name of the Pod that owns the recreated containers.
	PodName string `json:"podName"`
	// Containers contains the containers that need to recreate in the Pod.
	Containers []ContainerRecreateRequestContainer `json:"containers"`
	// Strategy defines strategies for containers recreation.
	Strategy *ContainerRecreateRequestStrategy `json:"strategy,omitempty"`
	// ActiveDeadlineSeconds is the deadline duration of this ContainerRecreateRequest.
	ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`
	// TTLSecondsAfterFinished is the TTL duration after this ContainerRecreateRequest has completed.
	TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"`
}

ContainerRecreateRequestSpec defines the desired state of ContainerRecreateRequest

func (*ContainerRecreateRequestSpec) DeepCopy added in v0.9.0

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

func (*ContainerRecreateRequestSpec) DeepCopyInto added in v0.9.0

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

type ContainerRecreateRequestStatus added in v0.9.0

type ContainerRecreateRequestStatus struct {
	// Phase of this ContainerRecreateRequest, e.g. Pending, Recreating, Completed
	Phase ContainerRecreateRequestPhase `json:"phase"`
	// Represents time when the ContainerRecreateRequest 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.
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`
	// A human readable message indicating details about this ContainerRecreateRequest.
	Message string `json:"message,omitempty"`
	// ContainerRecreateStates contains the recreation states of the containers.
	ContainerRecreateStates []ContainerRecreateRequestContainerRecreateState `json:"containerRecreateStates,omitempty"`
}

ContainerRecreateRequestStatus defines the observed state of ContainerRecreateRequest

func (*ContainerRecreateRequestStatus) DeepCopy added in v0.9.0

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

func (*ContainerRecreateRequestStatus) DeepCopyInto added in v0.9.0

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

type ContainerRecreateRequestStrategy added in v0.9.0

type ContainerRecreateRequestStrategy struct {
	// FailurePolicy decides whether to continue if one container fails to recreate
	FailurePolicy ContainerRecreateRequestFailurePolicyType `json:"failurePolicy,omitempty"`
	// OrderedRecreate indicates whether to recreate the next container only if the previous one has recreated completely.
	OrderedRecreate bool `json:"orderedRecreate,omitempty"`
	// TerminationGracePeriodSeconds is the optional duration in seconds to wait the container terminating gracefully.
	// Value must be non-negative integer. The value zero indicates delete immediately.
	// If this value is nil, we will use pod.Spec.TerminationGracePeriodSeconds as default value.
	TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
	// UnreadyGracePeriodSeconds is the optional duration in seconds to mark Pod as not ready over this duration before
	// executing preStop hook and stopping the container.
	UnreadyGracePeriodSeconds *int64 `json:"unreadyGracePeriodSeconds,omitempty"`
	// Minimum number of seconds for which a newly created container should be started and ready
	// without any of its container crashing, for it to be considered Succeeded.
	// Defaults to 0 (container will be considered Succeeded as soon as it is started and ready)
	MinStartedSeconds int32 `json:"minStartedSeconds,omitempty"`
}

ContainerRecreateRequestStrategy contains the strategies for containers recreation.

func (*ContainerRecreateRequestStrategy) DeepCopy added in v0.9.0

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

func (*ContainerRecreateRequestStrategy) DeepCopyInto added in v0.9.0

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

type ContainerRecreateRequestSyncContainerStatus added in v0.9.0

type ContainerRecreateRequestSyncContainerStatus struct {
	Name string `json:"name"`
	// Specifies whether the container has passed its readiness probe.
	Ready bool `json:"ready"`
	// The number of times the container has been restarted, currently based on
	// the number of dead containers that have not yet been removed.
	RestartCount int32 `json:"restartCount"`
	// Container's ID in the format 'docker://<container_id>'.
	ContainerID string `json:"containerID,omitempty"`
}

ContainerRecreateRequestSyncContainerStatus only uses in the annotation `crr.apps.kruise.io/sync-container-statuses`.

func (*ContainerRecreateRequestSyncContainerStatus) DeepCopy added in v0.9.0

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

func (*ContainerRecreateRequestSyncContainerStatus) DeepCopyInto added in v0.9.0

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

type CronJobTemplate added in v0.7.0

type CronJobTemplate struct {
	// Specifies the job that will be created when executing a CronJob.
	// +optional
	JobTemplate *batchv1beta1.JobTemplateSpec `json:"jobTemplate,omitempty" protobuf:"bytes,1,opt,name=jobTemplate"`

	// Specifies the broadcastjob that will be created when executing a BroadcastCronJob.
	// +optional
	BroadcastJobTemplate *BroadcastJobTemplateSpec `json:"broadcastJobTemplate,omitempty" protobuf:"bytes,2,opt,name=broadcastJobTemplate"`
}

func (*CronJobTemplate) DeepCopy added in v0.7.0

func (in *CronJobTemplate) DeepCopy() *CronJobTemplate

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

func (*CronJobTemplate) DeepCopyInto added in v0.7.0

func (in *CronJobTemplate) DeepCopyInto(out *CronJobTemplate)

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

type DaemonSet

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

	Spec   DaemonSetSpec   `json:"spec,omitempty"`
	Status DaemonSetStatus `json:"status,omitempty"`
}

DaemonSet is the Schema for the daemonsets API

func (*DaemonSet) DeepCopy

func (in *DaemonSet) DeepCopy() *DaemonSet

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

func (*DaemonSet) DeepCopyInto

func (in *DaemonSet) DeepCopyInto(out *DaemonSet)

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

func (*DaemonSet) DeepCopyObject

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

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

type DaemonSetCondition

type DaemonSetCondition struct {
	// Type of DaemonSet condition.
	Type DaemonSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DaemonSetConditionType"`
	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
	// Last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
	// The reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
	// A human readable message indicating details about the transition.
	// +optional
	Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
}

DaemonSetCondition describes the state of a DaemonSet at a certain point.

func (*DaemonSetCondition) DeepCopy

func (in *DaemonSetCondition) DeepCopy() *DaemonSetCondition

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

func (*DaemonSetCondition) DeepCopyInto

func (in *DaemonSetCondition) DeepCopyInto(out *DaemonSetCondition)

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

type DaemonSetConditionType

type DaemonSetConditionType string

type DaemonSetList

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

DaemonSetList contains a list of DaemonSet

func (*DaemonSetList) DeepCopy

func (in *DaemonSetList) DeepCopy() *DaemonSetList

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

func (*DaemonSetList) DeepCopyInto

func (in *DaemonSetList) DeepCopyInto(out *DaemonSetList)

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

func (*DaemonSetList) DeepCopyObject

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

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

type DaemonSetSpec

type DaemonSetSpec struct {

	// A label query over pods that are managed by the daemon set.
	// Must match in order to be controlled.
	// 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" protobuf:"bytes,1,opt,name=selector"`

	// An object that describes the pod that will be created.
	// The DaemonSet will create exactly one copy of this pod on every node
	// that matches the template's node selector (or on every node if no node
	// selector is specified).
	// More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
	Template corev1.PodTemplateSpec `json:"template" protobuf:"bytes,2,opt,name=template"`

	// An update strategy to replace existing DaemonSet pods with new pods.
	// +optional
	UpdateStrategy DaemonSetUpdateStrategy `json:"updateStrategy,omitempty" protobuf:"bytes,3,opt,name=updateStrategy"`

	// The minimum number of seconds for which a newly created DaemonSet pod should
	// be ready without any of its container crashing, for it to be considered
	// available. Defaults to 0 (pod will be considered available as soon as it
	// is ready).
	// +optional
	MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"`

	// BurstReplicas is a rate limiter for booting pods on a lot of pods.
	// The default value is 250
	BurstReplicas *intstr.IntOrString `json:"burstReplicas,omitempty" protobuf:"bytes,5,opt,name=burstReplicas"`

	// The number of old history to retain to allow rollback.
	// This is a pointer to distinguish between explicit zero and not specified.
	// Defaults to 10.
	// +optional
	RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"`
}

DaemonSetSpec defines the desired state of DaemonSet

func (*DaemonSetSpec) DeepCopy

func (in *DaemonSetSpec) DeepCopy() *DaemonSetSpec

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

func (*DaemonSetSpec) DeepCopyInto

func (in *DaemonSetSpec) DeepCopyInto(out *DaemonSetSpec)

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

type DaemonSetStatus

type DaemonSetStatus struct {

	// The number of nodes that are running at least 1
	// daemon pod and are supposed to run the daemon pod.
	// More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
	CurrentNumberScheduled int32 `json:"currentNumberScheduled" protobuf:"varint,1,opt,name=currentNumberScheduled"`

	// The number of nodes that are running the daemon pod, but are
	// not supposed to run the daemon pod.
	// More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
	NumberMisscheduled int32 `json:"numberMisscheduled" protobuf:"varint,2,opt,name=numberMisscheduled"`

	// The total number of nodes that should be running the daemon
	// pod (including nodes correctly running the daemon pod).
	// More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
	DesiredNumberScheduled int32 `json:"desiredNumberScheduled" protobuf:"varint,3,opt,name=desiredNumberScheduled"`

	// The number of nodes that should be running the daemon pod and have one
	// or more of the daemon pod running and ready.
	NumberReady int32 `json:"numberReady" protobuf:"varint,4,opt,name=numberReady"`

	// The most recent generation observed by the daemon set controller.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,5,opt,name=observedGeneration"`

	// The total number of nodes that are running updated daemon pod
	UpdatedNumberScheduled int32 `json:"updatedNumberScheduled" protobuf:"varint,6,opt,name=updatedNumberScheduled"`

	// The number of nodes that should be running the
	// daemon pod and have one or more of the daemon pod running and
	// available (ready for at least spec.minReadySeconds)
	// +optional
	NumberAvailable int32 `json:"numberAvailable,omitempty" protobuf:"varint,7,opt,name=numberAvailable"`

	// The number of nodes that should be running the
	// daemon pod and have none of the daemon pod running and available
	// (ready for at least spec.minReadySeconds)
	// +optional
	NumberUnavailable int32 `json:"numberUnavailable,omitempty" protobuf:"varint,8,opt,name=numberUnavailable"`

	// Count of hash collisions for the DaemonSet. The DaemonSet 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" protobuf:"varint,9,opt,name=collisionCount"`

	// Represents the latest available observations of a DaemonSet's current state.
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions []DaemonSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"`

	// DaemonSetHash is the controller-revision-hash, which represents the latest version of the DaemonSet.
	DaemonSetHash string `json:"daemonSetHash" protobuf:"bytes,11,opt,name=daemonSetHash"`
}

DaemonSetStatus defines the observed state of DaemonSet

func (*DaemonSetStatus) DeepCopy

func (in *DaemonSetStatus) DeepCopy() *DaemonSetStatus

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

func (*DaemonSetStatus) DeepCopyInto

func (in *DaemonSetStatus) DeepCopyInto(out *DaemonSetStatus)

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

type DaemonSetUpdateStrategy

type DaemonSetUpdateStrategy struct {
	// Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate.
	// +optional
	Type DaemonSetUpdateStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type"`

	// Rolling update config params. Present only if type = "RollingUpdate".
	// +optional
	RollingUpdate *RollingUpdateDaemonSet `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
}

DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.

func (*DaemonSetUpdateStrategy) DeepCopy

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

func (*DaemonSetUpdateStrategy) DeepCopyInto

func (in *DaemonSetUpdateStrategy) DeepCopyInto(out *DaemonSetUpdateStrategy)

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

type DaemonSetUpdateStrategyType

type DaemonSetUpdateStrategyType string

type DeploymentTemplateSpec added in v0.8.0

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

DeploymentTemplateSpec defines the subset template of Deployment.

func (*DeploymentTemplateSpec) DeepCopy added in v0.8.0

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

func (*DeploymentTemplateSpec) DeepCopyInto added in v0.8.0

func (in *DeploymentTemplateSpec) DeepCopyInto(out *DeploymentTemplateSpec)

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

type FailurePolicy

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

func (in *FailurePolicy) DeepCopy() *FailurePolicy

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

func (*FailurePolicy) DeepCopyInto

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

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 ImagePullJob

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

	Spec   ImagePullJobSpec   `json:"spec,omitempty"`
	Status ImagePullJobStatus `json:"status,omitempty"`
}

ImagePullJob is the Schema for the imagepulljobs API

func (*ImagePullJob) DeepCopy

func (in *ImagePullJob) DeepCopy() *ImagePullJob

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

func (*ImagePullJob) DeepCopyInto

func (in *ImagePullJob) DeepCopyInto(out *ImagePullJob)

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

func (*ImagePullJob) DeepCopyObject

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

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

type ImagePullJobList

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

ImagePullJobList contains a list of ImagePullJob

func (*ImagePullJobList) DeepCopy

func (in *ImagePullJobList) DeepCopy() *ImagePullJobList

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

func (*ImagePullJobList) DeepCopyInto

func (in *ImagePullJobList) DeepCopyInto(out *ImagePullJobList)

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

func (*ImagePullJobList) DeepCopyObject

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

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

type ImagePullJobNodeSelector added in v0.9.0

type ImagePullJobNodeSelector struct {
	// Names specify a set of nodes to execute the job.
	// +optional
	Names []string `json:"names,omitempty"`

	// LabelSelector is a label query over nodes that should match the job.
	// +optional
	metav1.LabelSelector `json:",inline"`
}

ImagePullJobNodeSelector is a selector over nodes

func (*ImagePullJobNodeSelector) DeepCopy added in v0.9.0

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

func (*ImagePullJobNodeSelector) DeepCopyInto added in v0.9.0

func (in *ImagePullJobNodeSelector) DeepCopyInto(out *ImagePullJobNodeSelector)

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

type ImagePullJobPodSelector added in v0.9.0

type ImagePullJobPodSelector struct {
	// LabelSelector is a label query over pods that should match the job.
	// +optional
	metav1.LabelSelector `json:",inline"`
}

ImagePullJobPodSelector is a selector over pods

func (*ImagePullJobPodSelector) DeepCopy added in v0.9.0

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

func (*ImagePullJobPodSelector) DeepCopyInto added in v0.9.0

func (in *ImagePullJobPodSelector) DeepCopyInto(out *ImagePullJobPodSelector)

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

type ImagePullJobSpec

type ImagePullJobSpec struct {
	// Image is the image to be pulled by the job
	Image string `json:"image"`

	// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling the image.
	// If specified, these secrets will be passed to individual puller implementations for them to use.  For example,
	// in the case of docker, only DockerConfig type secrets are honored.
	// +optional
	PullSecrets []string `json:"pullSecrets,omitempty"`

	// Selector is a query over nodes that should match the job.
	// nil to match all nodes.
	// +optional
	Selector *ImagePullJobNodeSelector `json:"selector,omitempty"`

	// PodSelector is a query over pods that should pull image on nodes of these pods.
	// Mutually exclusive with Selector.
	// +optional
	PodSelector *ImagePullJobPodSelector `json:"podSelector,omitempty"`

	// Parallelism is the requested parallelism, it can be set to any non-negative value. If it is unspecified,
	// it defaults to 1. If it is specified as 0, then the Job is effectively paused until it is increased.
	// +optional
	Parallelism *intstr.IntOrString `json:"parallelism,omitempty"`

	// PullPolicy is an optional field to set parameters of the pulling task. If not specified,
	// the system will use the default values.
	// +optional
	PullPolicy *PullPolicy `json:"pullPolicy,omitempty"`

	// CompletionPolicy indicates the completion policy of the job.
	// Default is Always CompletionPolicyType.
	CompletionPolicy CompletionPolicy `json:"completionPolicy"`
}

ImagePullJobSpec defines the desired state of ImagePullJob

func (*ImagePullJobSpec) DeepCopy

func (in *ImagePullJobSpec) DeepCopy() *ImagePullJobSpec

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

func (*ImagePullJobSpec) DeepCopyInto

func (in *ImagePullJobSpec) DeepCopyInto(out *ImagePullJobSpec)

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

type ImagePullJobStatus

type ImagePullJobStatus struct {
	// 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"`

	// 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"`

	// The desired number of pulling tasks, this is typically equal to the number of nodes satisfied.
	Desired int32 `json:"desired"`

	// The number of actively running pulling tasks.
	// +optional
	Active int32 `json:"active"`

	// The number of pulling tasks which reached phase Succeeded.
	// +optional
	Succeeded int32 `json:"succeeded"`

	// The number of pulling tasks  which reached phase Failed.
	// +optional
	Failed int32 `json:"failed"`

	// The text prompt for job running status.
	// +optional
	Message string `json:"message,omitempty"`

	// The nodes that failed to pull the image.
	// +optional
	FailedNodes []string `json:"failedNodes,omitempty"`
}

ImagePullJobStatus defines the observed state of ImagePullJob

func (*ImagePullJobStatus) DeepCopy

func (in *ImagePullJobStatus) DeepCopy() *ImagePullJobStatus

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

func (*ImagePullJobStatus) DeepCopyInto

func (in *ImagePullJobStatus) DeepCopyInto(out *ImagePullJobStatus)

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

type ImagePullPhase

type ImagePullPhase string

ImagePullPhase defines the tasks status

const (
	// ImagePhaseWaiting means the task has not started
	ImagePhaseWaiting ImagePullPhase = "Waiting"
	// ImagePhasePulling means the task has been started, but not completed
	ImagePhasePulling ImagePullPhase = "Pulling"
	// ImagePhaseSucceeded means the task has been completed
	ImagePhaseSucceeded ImagePullPhase = "Succeeded"
	// ImagePhaseFailed means the task has failed
	ImagePhaseFailed ImagePullPhase = "Failed"
)

type ImageSpec

type ImageSpec struct {
	// PullSecrets is an optional list of references to secrets in the same namespace to use for pulling the image.
	// If specified, these secrets will be passed to individual puller implementations for them to use.  For example,
	// in the case of docker, only DockerConfig type secrets are honored.
	// +optional
	PullSecrets []ReferenceObject `json:"pullSecrets,omitempty"`

	// Tags is a list of versions of this image
	Tags []ImageTagSpec `json:"tags"`
}

ImageSpec defines the pulling spec of an image

func (*ImageSpec) DeepCopy

func (in *ImageSpec) DeepCopy() *ImageSpec

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

func (*ImageSpec) DeepCopyInto

func (in *ImageSpec) DeepCopyInto(out *ImageSpec)

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

type ImageStatus

type ImageStatus struct {
	// Represents statuses of pulling tasks on this node
	Tags []ImageTagStatus `json:"tags"`
}

ImageStatus defines the pulling status of an image

func (*ImageStatus) DeepCopy

func (in *ImageStatus) DeepCopy() *ImageStatus

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

func (*ImageStatus) DeepCopyInto

func (in *ImageStatus) DeepCopyInto(out *ImageStatus)

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

type ImageTagPullPolicy

type ImageTagPullPolicy struct {
	// Specifies the timeout of the pulling task.
	// Defaults to 600
	// +optional
	TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`

	// Specifies the number of retries before marking the pulling task failed.
	// Defaults to 3
	// +optional
	BackoffLimit *int32 `json:"backoffLimit,omitempty"`

	// TTLSecondsAfterFinished limits the lifetime of a pulling task that has finished execution (either Complete or Failed).
	// If this field is set, ttlSecondsAfterFinished after the task finishes, it is eligible to be automatically deleted.
	// If this field is unset, the task won't be automatically deleted.
	// If this field is set to zero, the task becomes eligible to be deleted immediately after it finishes.
	// +optional
	TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"`

	// ActiveDeadlineSeconds specifies the duration in seconds relative to the startTime that the task may be active
	// before the system tries to terminate it; value must be positive integer.
	// if not specified, the system will never terminate it.
	// +optional
	ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`
}

ImageTagPullPolicy defines the policy of the pulling task

func (*ImageTagPullPolicy) DeepCopy

func (in *ImageTagPullPolicy) DeepCopy() *ImageTagPullPolicy

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

func (*ImageTagPullPolicy) DeepCopyInto

func (in *ImageTagPullPolicy) DeepCopyInto(out *ImageTagPullPolicy)

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

type ImageTagSpec

type ImageTagSpec struct {
	// Specifies the image tag
	Tag string `json:"tag"`

	// Specifies the create time of this tag
	// +optional
	CreatedAt *metav1.Time `json:"createdAt,omitempty"`

	// PullPolicy is an optional field to set parameters of the pulling task. If not specified,
	// the system will use the default values.
	// +optional
	PullPolicy *ImageTagPullPolicy `json:"pullPolicy,omitempty"`

	// List of objects depended by this object. If this image is managed by a controller,
	// then an entry in this list will point to this controller.
	// +optional
	OwnerReferences []v1.ObjectReference `json:"ownerReferences,omitempty"`

	// An opaque value that represents the internal version of this tag that can
	// be used by clients to determine when objects have changed. May be used for optimistic
	// concurrency, change detection, and the watch operation on a resource or set of resources.
	// Clients must treat these values as opaque and passed unmodified back to the server.
	//
	// Populated by the system.
	// Read-only.
	// Value must be treated as opaque by clients and .
	// +optional
	Version int64 `json:"version,omitempty"`
}

ImageTagSpec defines the pulling spec of an image tag

func (*ImageTagSpec) DeepCopy

func (in *ImageTagSpec) DeepCopy() *ImageTagSpec

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

func (*ImageTagSpec) DeepCopyInto

func (in *ImageTagSpec) DeepCopyInto(out *ImageTagSpec)

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

type ImageTagStatus

type ImageTagStatus struct {
	// Represents the image tag.
	Tag string `json:"tag"`

	// Represents the image pulling task phase.
	Phase ImagePullPhase `json:"phase"`

	// Represents the pulling progress of this tag, which is beetween 0-100. There is no guarantee
	// of monotonic consistency, and it may be a rollback due to retry during pulling.
	Progress int32 `json:"progress,omitempty"`

	// Represents time when the pulling task was acknowledged by the image puller.
	// 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"`

	// Represents time when the pulling task 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"`

	// Represents the internal version of this tag that the daemon handled.
	// +optional
	Version int64 `json:"version,omitempty"`

	// Represents the ID of this image.
	// +optional
	ImageID string `json:"imageID,omitempty"`

	// Represents the summary informations of this node
	// +optional
	Message string `json:"message,omitempty"`
}

ImageTagStatus defines the pulling status of an image tag

func (*ImageTagStatus) DeepCopy

func (in *ImageTagStatus) DeepCopy() *ImageTagStatus

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

func (*ImageTagStatus) DeepCopyInto

func (in *ImageTagStatus) DeepCopyInto(out *ImageTagStatus)

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

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

func (in *ManualUpdate) DeepCopy() *ManualUpdate

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

func (*ManualUpdate) DeepCopyInto

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

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

type NodeImage

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

	Spec   NodeImageSpec   `json:"spec,omitempty"`
	Status NodeImageStatus `json:"status,omitempty"`
}

NodeImage is the Schema for the nodeimages API

func (*NodeImage) DeepCopy

func (in *NodeImage) DeepCopy() *NodeImage

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

func (*NodeImage) DeepCopyInto

func (in *NodeImage) DeepCopyInto(out *NodeImage)

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

func (*NodeImage) DeepCopyObject

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

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

type NodeImageList

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

NodeImageList contains a list of NodeImage

func (*NodeImageList) DeepCopy

func (in *NodeImageList) DeepCopy() *NodeImageList

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

func (*NodeImageList) DeepCopyInto

func (in *NodeImageList) DeepCopyInto(out *NodeImageList)

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

func (*NodeImageList) DeepCopyObject

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

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

type NodeImageSpec

type NodeImageSpec struct {
	// Specifies images to be pulled on this node
	// It can not be more than 256 for each NodeImage
	Images map[string]ImageSpec `json:"images,omitempty"`
}

NodeImageSpec defines the desired state of NodeImage

func (*NodeImageSpec) DeepCopy

func (in *NodeImageSpec) DeepCopy() *NodeImageSpec

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

func (*NodeImageSpec) DeepCopyInto

func (in *NodeImageSpec) DeepCopyInto(out *NodeImageSpec)

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

type NodeImageStatus

type NodeImageStatus struct {
	// The desired number of pulling tasks, this is typically equal to the number of images in spec.
	Desired int32 `json:"desired"`

	// The number of pulling tasks which reached phase Succeeded.
	// +optional
	Succeeded int32 `json:"succeeded"`

	// The number of pulling tasks  which reached phase Failed.
	// +optional
	Failed int32 `json:"failed"`

	// The number of pulling tasks which are not finished.
	// +optional
	Pulling int32 `json:"pulling"`

	// all statuses of active image pulling tasks
	ImageStatuses map[string]ImageStatus `json:"imageStatuses,omitempty"`

	// The first of all job has finished on this node. When a node is added to the cluster, we want to know
	// the time when the node's image pulling is completed, and use it to trigger the operation of the upper system.
	// +optional
	FirstSyncStatus *SyncStatus `json:"firstSyncStatus,omitempty"`
}

NodeImageStatus defines the observed state of NodeImage

func (*NodeImageStatus) DeepCopy

func (in *NodeImageStatus) DeepCopy() *NodeImageStatus

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

func (*NodeImageStatus) DeepCopyInto

func (in *NodeImageStatus) DeepCopyInto(out *NodeImageStatus)

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

type PodInjectPolicyType added in v0.8.0

type PodInjectPolicyType string
const (
	BeforeAppContainerType PodInjectPolicyType = "BeforeAppContainer"
	AfterAppContainerType  PodInjectPolicyType = "AfterAppContainer"
)

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 PullPolicy

type PullPolicy struct {
	// Specifies the timeout of the pulling task.
	// Defaults to 600
	// +optional
	TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`

	// Specifies the number of retries before marking the pulling task failed.
	// Defaults to 3
	// +optional
	BackoffLimit *int32 `json:"backoffLimit,omitempty"`
}

PullPolicy defines the policy of the pulling task

func (*PullPolicy) DeepCopy

func (in *PullPolicy) DeepCopy() *PullPolicy

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

func (*PullPolicy) DeepCopyInto

func (in *PullPolicy) DeepCopyInto(out *PullPolicy)

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

type ReferenceObject

type ReferenceObject struct {
	Namespace string `json:"namespace,omitempty"`
	Name      string `json:"name,omitempty"`
}

ReferenceObject comprises a resource name, with a mandatory namespace, rendered as "<namespace>/<name>".

func (*ReferenceObject) DeepCopy

func (in *ReferenceObject) DeepCopy() *ReferenceObject

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

func (*ReferenceObject) DeepCopyInto

func (in *ReferenceObject) DeepCopyInto(out *ReferenceObject)

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

type ResourceDistribution added in v0.10.0

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

	Spec   ResourceDistributionSpec   `json:"spec,omitempty"`
	Status ResourceDistributionStatus `json:"status,omitempty"`
}

ResourceDistribution is the Schema for the resourcedistributions API.

func (*ResourceDistribution) DeepCopy added in v0.10.0

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

func (*ResourceDistribution) DeepCopyInto added in v0.10.0

func (in *ResourceDistribution) DeepCopyInto(out *ResourceDistribution)

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

func (*ResourceDistribution) DeepCopyObject added in v0.10.0

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

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

type ResourceDistributionCondition added in v0.10.0

type ResourceDistributionCondition struct {
	// Type of ResourceDistributionCondition.
	Type ResourceDistributionConditionType `json:"type"`

	// Status of the condition, one of True, False, Unknown.
	Status ResourceDistributionConditionStatus `json:"status"`

	// LastTransitionTime is the last time the condition transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`

	// Reason describe human readable message indicating details about last transition.
	Reason string `json:"reason,omitempty"`

	// FailedNamespaces describe all failed namespaces when Status is False
	FailedNamespaces []string `json:"failedNamespace,omitempty"`
}

ResourceDistributionCondition allows a row to be marked with additional information.

func (*ResourceDistributionCondition) DeepCopy added in v0.10.0

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

func (*ResourceDistributionCondition) DeepCopyInto added in v0.10.0

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

type ResourceDistributionConditionStatus added in v0.10.0

type ResourceDistributionConditionStatus string
const (
	// ResourceDistributionConditionTrue means a resource is in the condition.
	ResourceDistributionConditionTrue ResourceDistributionConditionStatus = "True"

	// ResourceDistributionConditionFalse means a resource is not in the condition.
	ResourceDistributionConditionFalse ResourceDistributionConditionStatus = "False"

	// ResourceDistributionConditionUnknown means kubernetes can't decide if a resource is in the condition or not.
	ResourceDistributionConditionUnknown ResourceDistributionConditionStatus = "Unknown"
)

These are valid condition statuses.

type ResourceDistributionConditionType added in v0.10.0

type ResourceDistributionConditionType string
const (
	// ResourceDistributionConflictOccurred means there are conflict with existing resources when reconciling.
	ResourceDistributionConflictOccurred ResourceDistributionConditionType = "ConflictOccurred"

	// ResourceDistributionNamespaceNotExists means some target namespaces not exist.
	ResourceDistributionNamespaceNotExists ResourceDistributionConditionType = "NamespaceNotExists"

	// ResourceDistributionGetResourceFailed means some get operations about Resource are failed.
	ResourceDistributionGetResourceFailed ResourceDistributionConditionType = "GetResourceFailed"

	// ResourceDistributionCreateResourceFailed means some create operations about Resource are failed.
	ResourceDistributionCreateResourceFailed ResourceDistributionConditionType = "CreateResourceFailed"

	// ResourceDistributionUpdateResourceFailed means some update operations about Resource are failed.
	ResourceDistributionUpdateResourceFailed ResourceDistributionConditionType = "UpdateResourceFailed"

	// ResourceDistributionDeleteResourceFailed means some delete operations about Resource are failed.
	ResourceDistributionDeleteResourceFailed ResourceDistributionConditionType = "DeleteResourceFailed"
)

These are valid conditions of a ResourceDistribution.

type ResourceDistributionList added in v0.10.0

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

ResourceDistributionList contains a list of ResourceDistribution.

func (*ResourceDistributionList) DeepCopy added in v0.10.0

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

func (*ResourceDistributionList) DeepCopyInto added in v0.10.0

func (in *ResourceDistributionList) DeepCopyInto(out *ResourceDistributionList)

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

func (*ResourceDistributionList) DeepCopyObject added in v0.10.0

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

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

type ResourceDistributionNamespace added in v0.10.0

type ResourceDistributionNamespace struct {
	// Namespace name
	Name string `json:"name,omitempty"`
}

ResourceDistributionNamespace contains a namespace name

func (*ResourceDistributionNamespace) DeepCopy added in v0.10.0

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

func (*ResourceDistributionNamespace) DeepCopyInto added in v0.10.0

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

type ResourceDistributionSpec added in v0.10.0

type ResourceDistributionSpec struct {

	// Resource must be the complete yaml that users want to distribute.
	Resource runtime.RawExtension `json:"resource"`

	// Targets defines the namespaces that users want to distribute to.
	Targets ResourceDistributionTargets `json:"targets"`
}

ResourceDistributionSpec defines the desired state of ResourceDistribution.

func (*ResourceDistributionSpec) DeepCopy added in v0.10.0

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

func (*ResourceDistributionSpec) DeepCopyInto added in v0.10.0

func (in *ResourceDistributionSpec) DeepCopyInto(out *ResourceDistributionSpec)

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

type ResourceDistributionStatus added in v0.10.0

type ResourceDistributionStatus struct {

	// Desired represents the number of total target namespaces.
	Desired int32 `json:"desired,omitempty"`

	// Succeeded represents the number of successful distributions.
	Succeeded int32 `json:"succeeded,omitempty"`

	// Failed represents the number of failed distributions.
	Failed int32 `json:"failed,omitempty"`

	// ObservedGeneration represents the .metadata.generation that the condition was set based upon.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Conditions describe the condition when Resource creating, updating and deleting.
	Conditions []ResourceDistributionCondition `json:"conditions,omitempty"`
}

ResourceDistributionStatus defines the observed state of ResourceDistribution. ResourceDistributionStatus is recorded by kruise, users' modification is invalid and meaningless.

func (*ResourceDistributionStatus) DeepCopy added in v0.10.0

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

func (*ResourceDistributionStatus) DeepCopyInto added in v0.10.0

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

type ResourceDistributionTargetNamespaces added in v0.10.0

type ResourceDistributionTargetNamespaces struct {

	// +optional
	List []ResourceDistributionNamespace `json:"list,omitempty"`
}

func (*ResourceDistributionTargetNamespaces) DeepCopy added in v0.10.0

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

func (*ResourceDistributionTargetNamespaces) DeepCopyInto added in v0.10.0

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

type ResourceDistributionTargets added in v0.10.0

type ResourceDistributionTargets struct {

	// If AllNamespaces is true, Resource will be distributed to the all namespaces
	// (except some forbidden namespaces, such as "kube-system" and "kube-public").
	// +optional
	AllNamespaces bool `json:"allNamespaces,omitempty"`

	// If ExcludedNamespaces is not empty, Resource will never be distributed to the listed namespaces.
	// ExcludedNamespaces has the highest priority.
	// +optional
	ExcludedNamespaces ResourceDistributionTargetNamespaces `json:"excludedNamespaces,omitempty"`

	// If IncludedNamespaces is not empty, Resource will be distributed to the listed namespaces.
	// +optional
	IncludedNamespaces ResourceDistributionTargetNamespaces `json:"includedNamespaces,omitempty"`

	// If NamespaceLabelSelector is not empty, Resource will be distributed to the matched namespaces.
	// +optional
	NamespaceLabelSelector metav1.LabelSelector `json:"namespaceLabelSelector,omitempty"`
}

ResourceDistributionTargets defines the targets of Resource. Four options are provided to select target namespaces.

func (*ResourceDistributionTargets) DeepCopy added in v0.10.0

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

func (*ResourceDistributionTargets) DeepCopyInto added in v0.10.0

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

type RollingUpdateDaemonSet

type RollingUpdateDaemonSet struct {
	// Type is to specify which kind of rollingUpdate.
	Type RollingUpdateType `json:"rollingUpdateType,omitempty" protobuf:"bytes,1,opt,name=rollingUpdateType"`

	// The maximum number of DaemonSet pods that can be unavailable during the
	// update. Value can be an absolute number (ex: 5) or a percentage of total
	// number of DaemonSet pods at the start of the update (ex: 10%). Absolute
	// number is calculated from percentage by rounding up.
	// This cannot be 0.
	// Default value is 1.
	// Example: when this is set to 30%, at most 30% of the total number of nodes
	// that should be running the daemon pod (i.e. status.desiredNumberScheduled)
	// can have their pods stopped for an update at any given
	// time. The update starts by stopping at most 30% of those DaemonSet pods
	// and then brings up new DaemonSet pods in their place. Once the new pods
	// are available, it then proceeds onto other DaemonSet pods, thus ensuring
	// that at least 70% of original number of DaemonSet pods are available at
	// all times during the update.
	// +optional
	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,2,opt,name=maxUnavailable"`

	// A label query over nodes that are managed by the daemon set RollingUpdate.
	// Must match in order to be controlled.
	// It must match the node's labels.
	Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,3,opt,name=selector"`

	// The number of DaemonSet pods remained to be old version.
	// Default value is 0.
	// Maximum value is status.DesiredNumberScheduled, which means no pod will be updated.
	// +optional
	Partition *int32 `json:"partition,omitempty" protobuf:"varint,4,opt,name=partition"`

	// Indicates that the daemon set is paused and will not be processed by the
	// daemon set controller.
	// +optional
	Paused *bool `json:"paused,omitempty" protobuf:"varint,5,opt,name=paused"`

	// Only when type=SurgingRollingUpdateType, it works.
	// The maximum number of DaemonSet pods that can be scheduled above the desired number of pods
	// during the update. Value can be an absolute number (ex: 5) or a percentage of the total number
	// of DaemonSet pods at the start of the update (ex: 10%). The absolute number is calculated from
	// the percentage by rounding up. This cannot be 0. The default value is 1. Example: when this is
	// set to 30%, at most 30% of the total number of nodes that should be running the daemon pod
	// (i.e. status.desiredNumberScheduled) can have 2 pods running at any given time. The update
	// starts by starting replacements for at most 30% of those DaemonSet pods. Once the new pods are
	// available it then stops the existing pods before proceeding onto other DaemonSet pods, thus
	// ensuring that at most 130% of the desired final number of DaemonSet  pods are running at all
	// times during the update.
	// +optional
	MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,7,opt,name=maxSurge"`
}

Spec to control the desired behavior of daemon set rolling update.

func (*RollingUpdateDaemonSet) DeepCopy

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

func (*RollingUpdateDaemonSet) DeepCopyInto

func (in *RollingUpdateDaemonSet) DeepCopyInto(out *RollingUpdateDaemonSet)

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"`
	// InPlaceUpdateStrategy contains strategies for in-place update.
	// +optional
	InPlaceUpdateStrategy *appspub.InPlaceUpdateStrategy `json:"inPlaceUpdateStrategy,omitempty"`
	// MinReadySeconds indicates how long will the pod be considered ready after it's updated.
	// MinReadySeconds works with both OrderedReady and Parallel podManagementPolicy.
	// It affects the pod scale up speed when the podManagementPolicy is set to be OrderedReady.
	// Combined with MaxUnavailable, it affects the pod update speed regardless of podManagementPolicy.
	// Default value is 0, max is 300.
	// +optional
	MinReadySeconds *int32 `json:"minReadySeconds,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 RollingUpdateType

type RollingUpdateType string

type ShareVolumePolicy added in v0.8.0

type ShareVolumePolicy struct {
	Type ShareVolumePolicyType `json:"type,omitempty"`
}

func (*ShareVolumePolicy) DeepCopy added in v0.8.0

func (in *ShareVolumePolicy) DeepCopy() *ShareVolumePolicy

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

func (*ShareVolumePolicy) DeepCopyInto added in v0.8.0

func (in *ShareVolumePolicy) DeepCopyInto(out *ShareVolumePolicy)

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

type ShareVolumePolicyType added in v0.8.0

type ShareVolumePolicyType string
const (
	ShareVolumePolicyEnabled  ShareVolumePolicyType = "enabled"
	ShareVolumePolicyDisabled ShareVolumePolicyType = "disabled"
)

type SidecarContainer

type SidecarContainer struct {
	corev1.Container `json:",inline"`

	// The rules that injected SidecarContainer into Pod.spec.containers,
	// not takes effect in initContainers
	// If BeforeAppContainer, the SidecarContainer will be injected in front of the pod.spec.containers
	// otherwise it will be injected into the back.
	// default BeforeAppContainerType
	PodInjectPolicy PodInjectPolicyType `json:"podInjectPolicy,omitempty"`

	// sidecarContainer upgrade strategy, include: ColdUpgrade, HotUpgrade
	UpgradeStrategy SidecarContainerUpgradeStrategy `json:"upgradeStrategy,omitempty"`

	// If ShareVolumePolicy is enabled, the sidecar container will share the other container's VolumeMounts
	// in the pod(don't contains the injected sidecar container).
	ShareVolumePolicy ShareVolumePolicy `json:"shareVolumePolicy,omitempty"`

	// TransferEnv will transfer env info from other container
	// SourceContainerName is pod.spec.container[x].name; EnvName is pod.spec.container[x].Env.name
	TransferEnv []TransferEnvVar `json:"transferEnv,omitempty"`
}

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

type SidecarContainerUpgradeStrategy struct {
	// when sidecar container is stateless, use ColdUpgrade
	// otherwise HotUpgrade are more HotUpgrade.
	// examples for istio envoy container is suitable for HotUpgrade
	// default is ColdUpgrade
	UpgradeType SidecarContainerUpgradeType `json:"upgradeType,omitempty"`

	// when HotUpgrade, HotUpgradeEmptyImage is used to complete the hot upgrading process
	// HotUpgradeEmptyImage is consistent of sidecar container in Command, Args, Liveness probe, etc.
	// but it does no actual work.
	HotUpgradeEmptyImage string `json:"hotUpgradeEmptyImage,omitempty"`
}

func (*SidecarContainerUpgradeStrategy) DeepCopy added in v0.8.0

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

func (*SidecarContainerUpgradeStrategy) DeepCopyInto added in v0.8.0

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

type SidecarContainerUpgradeType added in v0.8.0

type SidecarContainerUpgradeType string
const (
	SidecarContainerColdUpgrade SidecarContainerUpgradeType = "ColdUpgrade"
	SidecarContainerHotUpgrade  SidecarContainerUpgradeType = "HotUpgrade"
)

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

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

type SidecarSetInjectionStrategy struct {
	// Paused indicates that SidecarSet will suspend injection into Pods
	// If Paused is true, the sidecarSet will not be injected to newly created Pods,
	// but the injected sidecar container remains updating and running.
	// default is false
	Paused bool `json:"paused,omitempty"`
}

SidecarSetInjectionStrategy indicates the injection strategy of SidecarSet.

func (*SidecarSetInjectionStrategy) DeepCopy added in v0.10.0

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

func (*SidecarSetInjectionStrategy) DeepCopyInto added in v0.10.0

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

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"`

	// Namespace sidecarSet will only match the pods in the namespace
	// otherwise, match pods in all namespaces(in cluster)
	Namespace string `json:"namespace,omitempty"`

	// Containers is the list of init containers to be injected into the selected pod
	// We will inject those containers by their name in ascending order
	// We only inject init containers when a new pod is created, it does not apply to any existing pod
	InitContainers []SidecarContainer `json:"initContainers,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"`

	// The sidecarset updateStrategy to use to replace existing pods with new ones.
	UpdateStrategy SidecarSetUpdateStrategy `json:"updateStrategy,omitempty"`

	// InjectionStrategy describe the strategy when sidecarset is injected into pods
	InjectionStrategy SidecarSetInjectionStrategy `json:"injectionStrategy,omitempty"`

	// List of the names of secrets required by pulling sidecar container images
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,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"`

	// updatedReadyPods is the number of matched pods that updated and ready
	UpdatedReadyPods int32 `json:"updatedReadyPods,omitempty"`
}

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

type SidecarSetUpdateStrategy struct {
	// Type is NotUpdate, the SidecarSet don't update the injected pods,
	// it will only inject sidecar container into the newly created pods.
	// Type is RollingUpdate, the SidecarSet will update the injected pods to the latest version on RollingUpdate Strategy.
	// default is RollingUpdate
	Type SidecarSetUpdateStrategyType `json:"type,omitempty"`

	// Paused indicates that the SidecarSet is paused to update the injected pods,
	// but it don't affect the webhook inject sidecar container into the newly created pods.
	// default is false
	Paused bool `json:"paused,omitempty"`

	// If selector is not nil, this upgrade will only update the selected pods.
	Selector *metav1.LabelSelector `json:"selector,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 *intstr.IntOrString `json:"partition,omitempty"`

	// The maximum number of SidecarSet pods that can be unavailable during the
	// update. Value can be an absolute number (ex: 5) or a percentage of total
	// number of SidecarSet pods at the start of the update (ex: 10%). Absolute
	// number is calculated from percentage by rounding up.
	// This cannot be 0.
	// Default value is 1.
	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`

	// ScatterStrategy defines the scatter rules to make pods been scattered when update.
	// This will avoid pods with the same key-value to be updated in one batch.
	// - Note that pods will be scattered after priority sort. So, although priority strategy and scatter strategy can be applied together, we suggest to use either one of them.
	// - If scatterStrategy is used, we suggest to just use one term. Otherwise, the update order can be hard to understand.
	ScatterStrategy UpdateScatterStrategy `json:"scatterStrategy,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

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

func (*SidecarSetUpdateStrategy) DeepCopyInto

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

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

type SidecarSetUpdateStrategyType added in v0.8.0

type SidecarSetUpdateStrategyType string
const (
	NotUpdateSidecarSetStrategyType     SidecarSetUpdateStrategyType = "NotUpdate"
	RollingUpdateSidecarSetStrategyType SidecarSetUpdateStrategyType = "RollingUpdate"
)

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

func (*StatefulSet) ConvertFrom added in v0.7.0

func (sts *StatefulSet) ConvertFrom(src conversion.Hub) error

func (*StatefulSet) ConvertTo added in v0.7.0

func (sts *StatefulSet) ConvertTo(dst conversion.Hub) error

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"`

	// AvailableReplicas is the number of Pods created by the StatefulSet controller that have been ready for
	//minReadySeconds.
	AvailableReplicas int32 `json:"availableReplicas"`

	// 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"`

	// LabelSelector is label selectors for query over pods that should match the replica count used by HPA.
	LabelSelector string `json:"labelSelector,omitempty"`
}

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

type StatefulSetTemplateSpec struct {
	// +kubebuilder:validation:XPreserveUnknownFields
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              appsv1.StatefulSetSpec `json:"spec"`
}

StatefulSetTemplateSpec defines the subset template of StatefulSet.

func (*StatefulSetTemplateSpec) DeepCopy

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

func (*StatefulSetTemplateSpec) DeepCopyInto

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

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 tolerations the pods under this subset have.
	// A subset's tolerations is not allowed to be updated.
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,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

func (in *Subset) DeepCopy() *Subset

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

func (*Subset) DeepCopyInto

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

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

	// AdvancedStatefulSet template
	// +optional
	AdvancedStatefulSetTemplate *AdvancedStatefulSetTemplateSpec `json:"advancedStatefulSetTemplate,omitempty"`

	// CloneSet template
	// +optional
	CloneSetTemplate *CloneSetTemplateSpec `json:"cloneSetTemplate,omitempty"`

	// Deployment template
	// +optional
	DeploymentTemplate *DeploymentTemplateSpec `json:"deploymentTemplate,omitempty"`
}

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

func (*SubsetTemplate) DeepCopy

func (in *SubsetTemplate) DeepCopy() *SubsetTemplate

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

func (*SubsetTemplate) DeepCopyInto

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

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

type SyncStatus

type SyncStatus struct {
	SyncAt  metav1.Time     `json:"syncAt,omitempty"`
	Status  SyncStatusPhase `json:"status,omitempty"`
	Message string          `json:"message,omitempty"`
}

SyncStatus is summary of the status of all images pulling tasks on the node.

func (*SyncStatus) DeepCopy

func (in *SyncStatus) DeepCopy() *SyncStatus

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

func (*SyncStatus) DeepCopyInto

func (in *SyncStatus) DeepCopyInto(out *SyncStatus)

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

type SyncStatusPhase

type SyncStatusPhase string

SyncStatusPhase defines the node status

const (
	// SyncStatusSucceeded means all tasks has succeeded on this node
	SyncStatusSucceeded SyncStatusPhase = "Succeeded"
	// SyncStatusFailed means some task has failed on this node
	SyncStatusFailed SyncStatusPhase = "Failed"
)

type TargetReference added in v0.10.0

type TargetReference struct {
	// API version of the referent.
	APIVersion string `json:"apiVersion"`
	// Kind of the referent.
	Kind string `json:"kind"`
	// Name of the referent.
	Name string `json:"name"`
}

TargetReference contains enough information to let you identify an workload

func (*TargetReference) DeepCopy added in v0.10.0

func (in *TargetReference) DeepCopy() *TargetReference

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

func (*TargetReference) DeepCopyInto added in v0.10.0

func (in *TargetReference) DeepCopyInto(out *TargetReference)

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

type TemplateKind added in v0.7.0

type TemplateKind string
const (
	JobTemplate TemplateKind = "Job"

	BroadcastJobTemplate TemplateKind = "BroadcastJob"
)

type Topology

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

func (in *Topology) DeepCopy() *Topology

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

func (*Topology) DeepCopyInto

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

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

type TransferEnvVar added in v0.8.0

type TransferEnvVar struct {
	SourceContainerName string `json:"sourceContainerName,omitempty"`
	EnvName             string `json:"envName,omitempty"`
}

func (*TransferEnvVar) DeepCopy added in v0.8.0

func (in *TransferEnvVar) DeepCopy() *TransferEnvVar

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

func (*TransferEnvVar) DeepCopyInto added in v0.8.0

func (in *TransferEnvVar) DeepCopyInto(out *TransferEnvVar)

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

type UnitedDeployment

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

func (*UnitedDeployment) DeepCopy

func (in *UnitedDeployment) DeepCopy() *UnitedDeployment

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

func (*UnitedDeployment) DeepCopyInto

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

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

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

type UnitedDeploymentCondition

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

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

func (*UnitedDeploymentCondition) DeepCopyInto

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

type UnitedDeploymentConditionType

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

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

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

func (*UnitedDeploymentList) DeepCopyInto

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

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

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

type UnitedDeploymentSpec

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

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

func (*UnitedDeploymentSpec) DeepCopyInto

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

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

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

func (*UnitedDeploymentStatus) DeepCopyInto

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

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

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

func (*UnitedDeploymentUpdateStrategy) DeepCopyInto

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

type UnorderedUpdateStrategy

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 *appspub.UpdatePriorityStrategy `json:"priorityStrategy,omitempty"`
}

UnorderedUpdateStrategy defines strategies for non-ordered update.

func (*UnorderedUpdateStrategy) DeepCopy

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

func (*UnorderedUpdateStrategy) DeepCopyInto

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

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

type UpdateScatterStrategy added in v0.8.0

type UpdateScatterStrategy []UpdateScatterTerm

UpdateScatterStrategy defines a map for label key-value. Pods matches the key-value will be scattered when update.

Example1: [{"Key": "labelA", "Value": "AAA"}] It means all pods with label labelA=AAA will be scattered when update.

Example2: [{"Key": "labelA", "Value": "AAA"}, {"Key": "labelB", "Value": "BBB"}] Controller will calculate the two sums of pods with labelA=AAA and with labelB=BBB, pods with the label that has bigger amount will be scattered first, then pods with the other label will be scattered.

func (UpdateScatterStrategy) DeepCopy added in v0.8.0

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

func (UpdateScatterStrategy) DeepCopyInto added in v0.8.0

func (in UpdateScatterStrategy) DeepCopyInto(out *UpdateScatterStrategy)

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

func (UpdateScatterStrategy) FieldsValidation added in v0.8.0

func (strategy UpdateScatterStrategy) FieldsValidation() error

FieldsValidation checks invalid fields in UpdateScatterStrategy.

type UpdateScatterTerm added in v0.8.0

type UpdateScatterTerm struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

func (*UpdateScatterTerm) DeepCopy added in v0.8.0

func (in *UpdateScatterTerm) DeepCopy() *UpdateScatterTerm

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

func (*UpdateScatterTerm) DeepCopyInto added in v0.8.0

func (in *UpdateScatterTerm) DeepCopyInto(out *UpdateScatterTerm)

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

type UpdateStatus

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

func (in *UpdateStatus) DeepCopy() *UpdateStatus

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

func (*UpdateStatus) DeepCopyInto

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

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"
)

type WorkloadSpread added in v0.10.0

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

	Spec   WorkloadSpreadSpec   `json:"spec,omitempty"`
	Status WorkloadSpreadStatus `json:"status,omitempty"`
}

WorkloadSpread is the Schema for the WorkloadSpread API

func (*WorkloadSpread) DeepCopy added in v0.10.0

func (in *WorkloadSpread) DeepCopy() *WorkloadSpread

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

func (*WorkloadSpread) DeepCopyInto added in v0.10.0

func (in *WorkloadSpread) DeepCopyInto(out *WorkloadSpread)

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

func (*WorkloadSpread) DeepCopyObject added in v0.10.0

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

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

type WorkloadSpreadList added in v0.10.0

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

WorkloadSpreadList contains a list of WorkloadSpread

func (*WorkloadSpreadList) DeepCopy added in v0.10.0

func (in *WorkloadSpreadList) DeepCopy() *WorkloadSpreadList

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

func (*WorkloadSpreadList) DeepCopyInto added in v0.10.0

func (in *WorkloadSpreadList) DeepCopyInto(out *WorkloadSpreadList)

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

func (*WorkloadSpreadList) DeepCopyObject added in v0.10.0

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

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

type WorkloadSpreadScheduleStrategy added in v0.10.0

type WorkloadSpreadScheduleStrategy struct {
	// Type indicates the type of the WorkloadSpreadScheduleStrategy.
	// Default is Fixed
	// +optional
	Type WorkloadSpreadScheduleStrategyType `json:"type,omitempty"`

	// Adaptive is used to communicate parameters when Type is AdaptiveWorkloadSpreadScheduleStrategyType.
	// +optional
	Adaptive *AdaptiveWorkloadSpreadStrategy `json:"adaptive,omitempty"`
}

WorkloadSpreadScheduleStrategy defines the schedule performance of WorkloadSpread

func (*WorkloadSpreadScheduleStrategy) DeepCopy added in v0.10.0

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

func (*WorkloadSpreadScheduleStrategy) DeepCopyInto added in v0.10.0

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

type WorkloadSpreadScheduleStrategyType added in v0.10.0

type WorkloadSpreadScheduleStrategyType string

WorkloadSpreadScheduleStrategyType is a string enumeration type that enumerates all possible schedule strategies for the WorkloadSpread controller. +kubebuilder:validation:Enum=Adaptive;Fixed;""

const (
	// AdaptiveWorkloadSpreadScheduleStrategyType represents that user can permit that controller reschedule Pod
	// or simulate a schedule process to check whether Pod can run in some subset.
	AdaptiveWorkloadSpreadScheduleStrategyType WorkloadSpreadScheduleStrategyType = "Adaptive"
	// FixedWorkloadSpreadScheduleStrategyType represents to give up reschedule and simulation schedule feature.
	FixedWorkloadSpreadScheduleStrategyType WorkloadSpreadScheduleStrategyType = "Fixed"
)

type WorkloadSpreadSpec added in v0.10.0

type WorkloadSpreadSpec struct {
	// TargetReference is the target workload that WorkloadSpread want to control.
	TargetReference *TargetReference `json:"targetRef"`

	// Subsets describes the pods distribution details between each of subsets.
	Subsets []WorkloadSpreadSubset `json:"subsets"`

	// ScheduleStrategy indicates the strategy the WorkloadSpread used to preform the schedule between each of subsets.
	// +optional
	ScheduleStrategy WorkloadSpreadScheduleStrategy `json:"scheduleStrategy,omitempty"`
}

WorkloadSpreadSpec defines the desired state of WorkloadSpread.

func (*WorkloadSpreadSpec) DeepCopy added in v0.10.0

func (in *WorkloadSpreadSpec) DeepCopy() *WorkloadSpreadSpec

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

func (*WorkloadSpreadSpec) DeepCopyInto added in v0.10.0

func (in *WorkloadSpreadSpec) DeepCopyInto(out *WorkloadSpreadSpec)

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

type WorkloadSpreadStatus added in v0.10.0

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

	// Contains the status of each subset. Each element in this array represents one subset
	// +optional
	SubsetStatuses []WorkloadSpreadSubsetStatus `json:"subsetStatuses,omitempty"`
}

WorkloadSpreadStatus defines the observed state of WorkloadSpread.

func (*WorkloadSpreadStatus) DeepCopy added in v0.10.0

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

func (*WorkloadSpreadStatus) DeepCopyInto added in v0.10.0

func (in *WorkloadSpreadStatus) DeepCopyInto(out *WorkloadSpreadStatus)

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

type WorkloadSpreadSubset added in v0.10.0

type WorkloadSpreadSubset struct {
	// Name should be unique between all of the subsets under one WorkloadSpread.
	Name string `json:"name"`

	// Indicates the node required selector to form the subset.
	// +optional
	RequiredNodeSelectorTerm *corev1.NodeSelectorTerm `json:"requiredNodeSelectorTerm,omitempty"`

	// Indicates the node preferred selector to form the subset.
	// +optional
	PreferredNodeSelectorTerms []corev1.PreferredSchedulingTerm `json:"preferredNodeSelectorTerms,omitempty"`

	// Indicates the tolerations the pods under this subset have.
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// MaxReplicas indicates the desired max replicas of this subset.
	// +optional
	MaxReplicas *intstr.IntOrString `json:"maxReplicas,omitempty"`

	// Patch indicates patching podTemplate to the Pod.
	// +optional
	Patch runtime.RawExtension `json:"patch,omitempty"`
}

WorkloadSpreadSubset defines the details of a subset.

func (*WorkloadSpreadSubset) DeepCopy added in v0.10.0

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

func (*WorkloadSpreadSubset) DeepCopyInto added in v0.10.0

func (in *WorkloadSpreadSubset) DeepCopyInto(out *WorkloadSpreadSubset)

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

type WorkloadSpreadSubsetCondition added in v0.10.0

type WorkloadSpreadSubsetCondition struct {
	// Type of in place set condition.
	Type WorkloadSpreadSubsetConditionType `json:"type"`

	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`

	// Last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`

	// The reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty"`

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

func (*WorkloadSpreadSubsetCondition) DeepCopy added in v0.10.0

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

func (*WorkloadSpreadSubsetCondition) DeepCopyInto added in v0.10.0

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

type WorkloadSpreadSubsetConditionType added in v0.10.0

type WorkloadSpreadSubsetConditionType string
const (
	// SubsetSchedulable means the nodes in this subset have sufficient resources to schedule a fixed number of Pods of a workload.
	// When one or more one pods in a subset have condition[PodScheduled] = false, the subset is considered temporarily unschedulable.
	// The condition[PodScheduled] = false, which means the cluster does not have enough resources to schedule at this moment,
	// even if only single Pod scheduled fails.
	// After a period of time(e.g. 5m), the controller will recover the subset to be schedulable.
	SubsetSchedulable WorkloadSpreadSubsetConditionType = "Schedulable"
)

type WorkloadSpreadSubsetStatus added in v0.10.0

type WorkloadSpreadSubsetStatus struct {
	// Name should be unique between all of the subsets under one WorkloadSpread.
	Name string `json:"name"`

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

	// Conditions is an array of current observed subset conditions.
	// +optional
	Conditions []WorkloadSpreadSubsetCondition `json:"conditions,omitempty"`

	// MissingReplicas is the number of replicas belong to this subset not be found.
	// MissingReplicas > 0 indicates the subset is still missing MissingReplicas pods to create
	// MissingReplicas = 0 indicates the subset already has enough pods, there is no need to create
	// MissingReplicas = -1 indicates the subset's MaxReplicas not set, then there is no limit for pods number
	MissingReplicas int32 `json:"missingReplicas"`

	// CreatingPods contains information about pods whose creation was processed by
	// the webhook handler but not yet been observed by the WorkloadSpread controller.
	// A pod will be in this map from the time when the webhook handler processed the
	// creation request to the time when the pod is seen by controller.
	// The key in the map is the name of the pod and the value is the time when the webhook
	// handler process the creation request. If the real creation didn't happen and a pod is
	// still in this map, it will be removed from the list automatically by WorkloadSpread controller
	// after some time.
	// If everything goes smooth this map should be empty for the most of the time.
	// Large number of entries in the map may indicate problems with pod creations.
	// +optional
	CreatingPods map[string]metav1.Time `json:"creatingPods,omitempty"`

	// DeletingPods is similar with CreatingPods and it contains information about pod deletion.
	// +optional
	DeletingPods map[string]metav1.Time `json:"deletingPods,omitempty"`
}

WorkloadSpreadSubsetStatus defines the observed state of subset

func (*WorkloadSpreadSubsetStatus) DeepCopy added in v0.10.0

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

func (*WorkloadSpreadSubsetStatus) DeepCopyInto added in v0.10.0

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

Jump to

Keyboard shortcuts

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