v1alpha1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

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

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

Index

Constants

View Source
const (
	// StatefulSetInPlaceUpdateReady must be added into template.spec.readinessGates when pod podUpdatePolicy
	// is InPlaceIfPossible or InPlaceOnly. The condition in podStatus will be updated to False before in-place
	// updating and updated to True after the update is finished. This ensures pod to remain at NotReady state while
	// in-place update is happening.
	StatefulSetInPlaceUpdateReady v1.PodConditionType = "InPlaceUpdateReady"

	// StatefulSetInPlaceUpdateStateAnnotation records the state of inplace-update.
	// The value of annotation is inPlaceUpdateState.
	StatefulSetInPlaceUpdateStateAnnotation string = "inplace-update-state"
)

Variables

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

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

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

Functions

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

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

func Resource

func Resource(resource string) schema.GroupResource

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

func SetDefaultsBroadcastJob

func SetDefaultsBroadcastJob(job *BroadcastJob)

SetDefaultsBroadcastJob sets any unspecified values to defaults.

Types

type BroadcastJob

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

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

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

func (*BroadcastJob) DeepCopy

func (in *BroadcastJob) DeepCopy() *BroadcastJob

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

func (*BroadcastJob) DeepCopyInto

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

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

func (*BroadcastJob) DeepCopyObject

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

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

type BroadcastJobList

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

BroadcastJobList contains a list of BroadcastJob

func (*BroadcastJobList) DeepCopy

func (in *BroadcastJobList) DeepCopy() *BroadcastJobList

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

func (*BroadcastJobList) DeepCopyInto

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

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

func (*BroadcastJobList) DeepCopyObject

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

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

type 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 *int32 `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"`
}

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

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

	// BackoffLimit specifies the number of retries before marking this job failed.
	// Not setting value means no limit.
	// Only works for Always type.
	// +optional
	BackoffLimit *int32 `json:"backoffLimit,omitempty" protobuf:"varint,3,opt,name=backoffLimit"`

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

type InPlaceUpdateContainerStatus struct {
	ImageID string `json:"imageID,omitempty"`
}

InPlaceUpdateContainerStatus records the statuses of the container that are mainly used to determine whether the InPlaceUpdate is completed.

func (*InPlaceUpdateContainerStatus) DeepCopy

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

func (*InPlaceUpdateContainerStatus) DeepCopyInto

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

type InPlaceUpdateState

type InPlaceUpdateState struct {
	// Revision is the updated statefulset revision hash.
	Revision string `json:"revision"`

	// UpdateTimestamp is the time when the in-place update happens.
	UpdateTimestamp metav1.Time `json:"updateTimestamp"`

	// LastContainerStatuses records the before-in-place-update container statuses. It is a map from ContainerName
	// to InPlaceUpdateContainerStatus
	LastContainerStatuses map[string]InPlaceUpdateContainerStatus `json:"lastContainerStatuses"`
}

InPlaceUpdateState records latest inplace-update state, including old statuses of containers.

func (*InPlaceUpdateState) DeepCopy

func (in *InPlaceUpdateState) DeepCopy() *InPlaceUpdateState

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

func (*InPlaceUpdateState) DeepCopyInto

func (in *InPlaceUpdateState) DeepCopyInto(out *InPlaceUpdateState)

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

type JobCondition

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

JobCondition describes current state of a job.

func (*JobCondition) DeepCopy

func (in *JobCondition) DeepCopy() *JobCondition

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

func (*JobCondition) DeepCopyInto

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

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

type JobConditionType

type JobConditionType string

JobConditionType indicates valid conditions type of a job

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

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

These are valid conditions of a job.

type 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 RollingUpdateStatefulSetStrategy

type RollingUpdateStatefulSetStrategy struct {
	// Partition indicates the ordinal at which the StatefulSet should be
	// partitioned.
	// 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"`
}

RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.

func (*RollingUpdateStatefulSetStrategy) DeepCopy

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

func (*RollingUpdateStatefulSetStrategy) DeepCopyInto

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

type SidecarContainer

type SidecarContainer struct {
	corev1.Container
}

SidecarContainer defines the container of Sidecar

func (*SidecarContainer) DeepCopy

func (in *SidecarContainer) DeepCopy() *SidecarContainer

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

func (*SidecarContainer) DeepCopyInto

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

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

type SidecarSet

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

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

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

func (*SidecarSet) DeepCopy

func (in *SidecarSet) DeepCopy() *SidecarSet

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

func (*SidecarSet) DeepCopyInto

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

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

func (*SidecarSet) DeepCopyObject

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

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

type SidecarSetList

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

SidecarSetList contains a list of SidecarSet

func (*SidecarSetList) DeepCopy

func (in *SidecarSetList) DeepCopy() *SidecarSetList

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

func (*SidecarSetList) DeepCopyInto

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

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

func (*SidecarSetList) DeepCopyObject

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

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

type SidecarSetSpec

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

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

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

SidecarSetSpec defines the desired state of SidecarSet

func (*SidecarSetSpec) DeepCopy

func (in *SidecarSetSpec) DeepCopy() *SidecarSetSpec

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

func (*SidecarSetSpec) DeepCopyInto

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

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

type SidecarSetStatus

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

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

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

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

SidecarSetStatus defines the observed state of SidecarSet

func (*SidecarSetStatus) DeepCopy

func (in *SidecarSetStatus) DeepCopy() *SidecarSetStatus

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

func (*SidecarSetStatus) DeepCopyInto

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

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

type StatefulSet

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

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

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

func (*StatefulSet) DeepCopy

func (in *StatefulSet) DeepCopy() *StatefulSet

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

func (*StatefulSet) DeepCopyInto

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

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

func (*StatefulSet) DeepCopyObject

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

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

type StatefulSetList

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

StatefulSetList contains a list of StatefulSet

func (*StatefulSetList) DeepCopy

func (in *StatefulSetList) DeepCopy() *StatefulSetList

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

func (*StatefulSetList) DeepCopyInto

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

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

func (*StatefulSetList) DeepCopyObject

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

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

type StatefulSetSpec

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

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

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

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

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

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

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

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

StatefulSetSpec defines the desired state of StatefulSet

func (*StatefulSetSpec) DeepCopy

func (in *StatefulSetSpec) DeepCopy() *StatefulSetSpec

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

func (*StatefulSetSpec) DeepCopyInto

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

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

type StatefulSetStatus

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

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

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

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

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

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

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

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

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

StatefulSetStatus defines the observed state of StatefulSet

func (*StatefulSetStatus) DeepCopy

func (in *StatefulSetStatus) DeepCopy() *StatefulSetStatus

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

func (*StatefulSetStatus) DeepCopyInto

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

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

type 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.

Jump to

Keyboard shortcuts

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