# Functions
Resource is required by pkg/client/listers/...
# Constants
AdaptiveUnitedDeploymentScheduleStrategyType represents that when a pod is stuck in the pending status and cannot be scheduled, allow it to be rescheduled to another subset.
AdaptiveWorkloadSpreadScheduleStrategyType represents that user can permit that controller reschedule Pod or simulate a schedule process to check whether Pod can run in some subset.
AllowConcurrent allows CronJobs to run concurrently.
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 RestartLimit.
AlwaysSidecarSetInjectRevisionPolicy means the SidecarSet will always inject the specific revision to Pods when pod creating, except matching UpdateStrategy.Selector.
AnnotationAutoGeneratePersistentPodState indicates kruise will auto generate PersistentPodState object Need to work with AnnotationRequiredPersistentTopology and AnnotationPreferredPersistentTopology.
AnnotationUsingEnhancedLiveness indicates the backup probe (json types) of the pod native container livnessprobe configuration.
AnnotationPersistentPodAnnotations Pod needs persistent annotations for example kruise.io/persistent-pod-annotations: cni.projectcalico.org/podIP[,xxx] optional.
AnnotationPreferredPersistentTopology Pod rebuilt topology preferred for node labels and default with 100 weight for example kruise.io/preferred-persistent-topology: kubernetes.io/hostname[,xxx] optional.
AnnotationRequiredPersistentTopology Pod rebuilt topology required for node labels for example kruise.io/required-persistent-topology: topology.kubernetes.io/zone[,xxx] optional.
AnnotationSubsetPatchKey indicates the patch for every subset.
AnnotationUsingEnhancedLiveness indicates that the enhanced liveness probe of pod is enabled.
CloneSetConditionFailedScale indicates cloneset controller failed to create or delete pods/pvc.
CloneSetConditionFailedUpdate indicates cloneset controller failed to update pods.
CloneSetInstanceID is a unique id for Pods and PVCs.
CloneSetScalingExcludePreparingDeleteKey is the label key that enables scalingExcludePreparingDelete only for this CloneSet, which means it will calculate scale number excluding Pods in PreparingDelete state.
ContainerRecreateRequestActiveKey indicates if this ContainerRecreateRequest is active.
[Immutable] Node name of this ContainerRecreateRequest.
[Immutable] Pod UID of this ContainerRecreateRequest.
ContainerRecreateRequestSyncContainerStatusesKey contains the container statuses in current Pod.
ContainerRecreateRequestUnreadyAcquiredKey indicates the Pod has been forced to not-ready.
ControllerRevisionHashLabelKey is used to record the controller revision of current resource.
DefaultCloneSetMaxUnavailable is the default value of maxUnavailable for CloneSet update strategy.
DeprecatedSurgingRollingUpdateType is a depreciated alias for Standard.
EJobError means some ephemeral containers matched by ephemeral job run error.
EJobFailed means there are some ephemeral containers matched by ephemeral job failed.
EJobInitialized means ephemeral job has created and initialized by controller.
EJobMatchedEmpty means the ephemeral job has not matched the target pods.
EJobSucceeded means the ephemeral job has succeeded completed its execution.
EphemeralJobError means the ephemeral paused.
EphemeralJobFailed means the job has failed.
EphemeralJobPause means the ephemeral job paused.
EphemeralJobRunning means the job is running.
EphemeralJobSucceeded means the job has succeeded.
EphemeralJobWaiting means the job is waiting.
These are valid conditions of a statefulset.
These are valid conditions of a statefulset.
FailurePolicyTypeContinue means the job will be still running, when failed pod is found.
FailurePolicyTypeFailFast means the job will be failed, when failed pod is found.
FailurePolicyTypePause means the job will be paused, when failed pod is found.
FixedUnitedDeploymentScheduleStrategyType represents that pods are strictly scheduled to the selected subset even if scheduling fail.
FixedWorkloadSpreadScheduleStrategyType represents to give up reschedule and simulation schedule feature.
ForbidConcurrent forbids concurrent runs, skipping next run if previous hasn't finished yet.
ImagePhaseFailed means the task has failed.
ImagePhasePulling means the task has been started, but not completed.
ImagePhaseSucceeded means the task has been completed.
ImagePhaseWaiting means the task has not started.
ImagePreDownloadCreatedKey indicates the images of this revision have been pre-downloaded.
ImagePreDownloadIgnoredKey indicates the images of this revision have been ignored to pre-download.
InPlaceIfPossibleCloneSetUpdateStrategyType indicates that we try to in-place update Pod instead of recreating Pod when possible.
InPlaceIfPossiblePodUpdateStrategyType indicates that we try to in-place update Pod instead of recreating Pod when possible.
InPlaceOnlyCloneSetUpdateStrategyType indicates that we will in-place update Pod instead of recreating pod.
InPlaceOnlyPodUpdateStrategyType indicates that we will in-place update Pod instead of recreating pod.
InplaceRollingUpdateType update container image without killing the pod if possible.
JobComplete means the job has completed its execution.
JobFailed means the job has failed its execution.
KruiseTerminateSidecarEnv is an env name, which represents a switch to enable sidecar terminator.
KruiseTerminateSidecarWithImageEnv is an env name, which refers to an image that will replace the original image using in-place update strategy to kill sidecar.
ManualUpdateStrategyType indicates the partition of each subset.
MaxMinReadySeconds is the max value of MinReadySeconds.
Never means the job will be kept alive after all pods on the desired nodes are completed.
Replace the old daemons only when it's killed.
PartialSidecarSetInjectRevisionPolicy means the SidecarSet will inject the specific or the latest revision according to UpdateStrategy.
PersistentPodStateRetentionPolicyWhenDeleted specifies when delete statefulSet, deleting podState record.
PersistentPodStateRetentionPolicyWhenScaled specifies when scale down statefulSet, deleting podState record.
PhaseCompleted means the job is completed.
PhaseFailed means the job is failed.
PhasePaused means the job is paused.
PhaseRunning means the job is running.
PodProbeMarkerAnnotationKey records the Probe Spec, mainly used for serverless Pod scenarios, as follows: annotations: kruise.io/podprobe: | [ { "containerName": "minecraft", "name": "healthy", "podConditionType": "game.kruise.io/healthy", "probe": { "exec": { "command": [ "bash", "/data/probe.sh" ] } } } ].
PodProbeMarkerListAnnotationKey records the injected PodProbeMarker Name List example: kruise.io/podprobemarker-list="probe-marker-1,probe-marker-2".
PullAlways means that kruise-daemon always attempts to pull the latest image.
PullIfNotPresent means that kruise-daemon pulls if the image isn't present on disk.
RecreateCloneSetUpdateStrategyType indicates that we always delete Pod and create new Pod during Pod update, which is the default behavior.
RecreatePodUpdateStrategyType indicates that we always delete Pod and create new Pod during Pod update, which is the default behavior.
ReplaceConcurrent cancels currently running job and replaces it with a new one.
ResourceDistributionConditionFalse means a resource is not in the condition.
ResourceDistributionConditionTrue means a resource is in the condition.
ResourceDistributionConditionUnknown means kubernetes can't decide if a resource is in the condition or not.
ResourceDistributionConflictOccurred means there are conflict with existing resources when reconciling.
ResourceDistributionCreateResourceFailed means some create operations about Resource are failed.
ResourceDistributionDeleteResourceFailed means some delete operations about Resource are failed.
ResourceDistributionGetResourceFailed means some get operations about Resource are failed.
ResourceDistributionNamespaceNotExists means some target namespaces not exist.
ResourceDistributionUpdateResourceFailed means some update operations about Resource are failed.
Replace the old daemons by new ones using rolling update i.e replace them on each node one after the other.
SidecarSetCustomVersionLabel is designed to record and label the controllerRevision of sidecarSet.
SpecifiedDeleteKey indicates this object should be deleted, and the value could be the deletion option.
StandardRollingUpdateType is the Standard way that update pods with recreation that sames to the upstream DaemonSet.
SubsetFailure is added to a UnitedDeployment when one of its subsets has failure during its own reconciling.
SubSetNameLabelKey is used to record the name of current subset.
SubsetProvisioned means all the expected subsets are provisioned and unexpected subsets are deleted.
SubsetSchedulable means the nodes in this subset have sufficient resources to schedule a fixed number of Pods of a workload.
SubsetUpdated means all the subsets are updated.
SyncStatusFailed means some task has failed on this node.
SyncStatusSucceeded means all tasks has succeeded on this node.
UnitedDeploymentSubsetSchedulable means new pods allocated into the subset will keep pending.
# Variables
AddToScheme adds the types in this group-version to the given scheme.
GroupVersion is group version used to register these objects.
SchemeBuilder is used to add go types to the GroupVersionKind scheme.
SidecarSetMergePatchJsonPatchPolicy indicate that sidecarSet use application/merge-patch+json to patch annotation value, for example, A patch annotation[oom-score] = '{"log-agent": 1}' and B patch annotation[oom-score] = '{"envoy": 2}' result pod annotation[oom-score] = '{"log-agent": 1, "envoy": 2}' MergePatchJson support to inject and in-place metadata.
SidecarSetOverwritePatchPolicy indicates if PatchPodFields conflicts with Pod, SidecarSet will apply PatchPodFields to overwrite the corresponding fields of pods.
SidecarSetRetainPatchPolicy indicates if PatchPodFields conflicts with Pod, will ignore PatchPodFields, and retain the corresponding fields of pods.
# Structs
AdaptiveUnitedDeploymentStrategy is used to communicate parameters when Type is AdaptiveUnitedDeploymentScheduleStrategyType.
AdaptiveWorkloadSpreadStrategy is used to communicate parameters when Type is AdaptiveWorkloadSpreadScheduleStrategyType.
AdvancedCronJob is the Schema for the advancedcronjobs API.
AdvancedCronJobList contains a list of AdvancedCronJob.
AdvancedCronJobSpec defines the desired state of AdvancedCronJob.
AdvancedCronJobStatus defines the observed state of AdvancedCronJob.
AdvancedStatefulSetTemplateSpec defines the subset template of AdvancedStatefulSet.
BroadcastJob is the Schema for the broadcastjobs API.
BroadcastJobList contains a list of BroadcastJob.
BroadcastJobSpec defines the desired state of BroadcastJob.
BroadcastJobStatus defines the observed state of BroadcastJob.
JobTemplateSpec describes the data a Job should have when created from a template.
CloneSet is the Schema for the clonesets API.
CloneSetCondition describes the state of a CloneSet at a certain point.
CloneSetList contains a list of CloneSet.
CloneSetScaleStrategy defines strategies for pods scale.
CloneSetSpec defines the desired state of CloneSet.
CloneSetStatus defines the observed state of CloneSet.
CloneSetTemplateSpec defines the subset template of CloneSet.
CloneSetUpdateStrategy defines strategies for pods update.
CompletionPolicy indicates the completion policy for the job.
ContainerRecreateRequest is the Schema for the containerrecreaterequests API.
ContainerRecreateRequestContainer defines the container that need to recreate.
ContainerRecreateRequestContainerContext contains context status of the container that need to recreate.
ContainerRecreateRequestContainerRecreateState contains the recreation state of the container.
ContainerRecreateRequestList contains a list of ContainerRecreateRequest.
ContainerRecreateRequestSpec defines the desired state of ContainerRecreateRequest.
ContainerRecreateRequestStatus defines the observed state of ContainerRecreateRequest.
ContainerRecreateRequestStrategy contains the strategies for containers recreation.
ContainerRecreateRequestSyncContainerStatus only uses in the annotation `crr.apps.kruise.io/sync-container-statuses`.
DaemonSet is the Schema for the daemonsets API.
DaemonSetList contains a list of DaemonSet.
DaemonSetSpec defines the desired state of DaemonSet.
DaemonSetStatus defines the observed state of DaemonSet.
DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
DeploymentTemplateSpec defines the subset template of Deployment.
EphemeralContainerTemplateSpec describes template spec of ephemeral containers.
EphemeralJob is the Schema for the ephemeraljobs API.
JobCondition describes current state of a job.
EphemeralJobList contains a list of EphemeralJob.
EphemeralJobSpec defines the desired state of EphemeralJob.
EphemeralJobStatus defines the observed state of EphemeralJob.
FailedImageStatus the state of ImagePullJob which has the failed nodes(status.Failed>0).
FailurePolicy indicates the behavior of the job, when failed pod is found.
ImageListPullJob is the Schema for the imagelistpulljobs API.
ImageListPullJobList contains a list of ImageListPullJob.
ImageListPullJobSpec defines the desired state of ImageListPullJob.
ImageListPullJobStatus defines the observed state of ImageListPullJob.
ImagePullJob is the Schema for the imagepulljobs API.
ImagePullJobList contains a list of ImagePullJob.
ImagePullJobNodeSelector is a selector over nodes.
ImagePullJobPodSelector is a selector over pods.
ImagePullJobSpec defines the desired state of ImagePullJob.
ImagePullJobStatus defines the observed state of ImagePullJob.
ImageSpec defines the pulling spec of an image.
ImageStatus defines the pulling status of an image.
ImageTagPullPolicy defines the policy of the pulling task.
ImageTagSpec defines the pulling spec of an image tag.
ImageTagStatus defines the pulling status of an image tag.
JobCondition describes current state of a job.
ManualUpdate is a update strategy which allows users to control the update progress by providing the partition of each subset.
NodeImage is the Schema for the nodeimages API.
NodeImageList contains a list of NodeImage.
NodeImageSpec defines the desired state of NodeImage.
NodeImageStatus defines the observed state of NodeImage.
NodePodProbe is the Schema for the NodePodProbe API.
NodePodProbeList contains a list of NodePodProbe.
NodePodProbeSpec defines the desired state of NodePodProbe.
PersistentPodState is the Schema for the PersistentPodState API.
PersistentPodStateList contains a list of PersistentPodState.
PersistentPodStateSpec defines the desired state of PersistentPodState.
PodProbeMarker is the Schema for the PodProbeMarker API.
PodProbeMarkerList contains a list of PodProbeMarker.
PodProbeMarkerSpec defines the desired state of PodProbeMarker.
ProbeHandler defines a specific action that should be taken TODO(FillZpp): improve the definition when openkruise/kruise updates to k8s 1.23.
PullPolicy defines the policy of the pulling task.
ReferenceObject comprises a resource name, with a mandatory namespace, rendered as "<namespace>/<name>".
ResourceDistribution is the Schema for the resourcedistributions API.
ResourceDistributionCondition allows a row to be marked with additional information.
ResourceDistributionList contains a list of ResourceDistribution.
ResourceDistributionNamespace contains a namespace name.
ResourceDistributionSpec defines the desired state of ResourceDistribution.
ResourceDistributionStatus defines the observed state of ResourceDistribution.
ResourceDistributionTargets defines the targets of Resource.
Spec to control the desired behavior of daemon set rolling update.
RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
SandboxConfig support attach metadata in PullImage CRI interface during ImagePulljobs.
SidecarContainer defines the container of Sidecar.
SidecarSet is the Schema for the sidecarsets API.
SidecarSetInjectionStrategy indicates the injection strategy of SidecarSet.
SidecarSetList contains a list of SidecarSet.
SidecarSetSpec defines the desired state of SidecarSet.
SidecarSetStatus defines the observed state of SidecarSet.
SidecarSetUpdateStrategy indicates the strategy that the SidecarSet controller will use to perform updates.
StatefulSet is the Schema for the statefulsets API.
StatefulSetList contains a list of StatefulSet.
StatefulSetSpec defines the desired state of StatefulSet.
StatefulSetStatus defines the observed state of StatefulSet.
StatefulSetTemplateSpec defines the subset template of StatefulSet.
StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates.
Subset defines the detail of a subset.
SubsetTemplate defines the subset template under the UnitedDeployment.
SyncStatus is summary of the status of all images pulling tasks on the node.
TargetFilter is an optional parameter that allows WorkloadSpread to manage only a subset of the Pods generated by the target workload.
TargetReference contains enough information to let you identify an workload.
Topology defines the spread detail of each subset under UnitedDeployment.
UnitedDeployment is the Schema for the uniteddeployments API.
UnitedDeploymentCondition describes current state of a UnitedDeployment.
UnitedDeploymentList contains a list of UnitedDeployment.
UnitedDeploymentScheduleStrategy defines the schedule performance of UnitedDeployment.
UnitedDeploymentSpec defines the desired state of UnitedDeployment.
UnitedDeploymentStatus defines the observed state of UnitedDeployment.
UnitedDeploymentUpdateStrategy defines the update performance when template of UnitedDeployment is changed.
UnorderedUpdateStrategy defines strategies for non-ordered update.
UpdateStatus defines the observed update state of UnitedDeployment.
WorkloadSpread is the Schema for the WorkloadSpread API.
WorkloadSpreadList contains a list of WorkloadSpread.
WorkloadSpreadScheduleStrategy defines the schedule performance of WorkloadSpread.
WorkloadSpreadSpec defines the desired state of WorkloadSpread.
WorkloadSpreadStatus defines the observed state of WorkloadSpread.
WorkloadSpreadSubset defines the details of a subset.
WorkloadSpreadSubsetStatus defines the observed state of subset.
# Type aliases
BroadcastJobPhase indicates the phase of the job.
CloneSetConditionType is type for CloneSet conditions.
CloneSetUpdateStrategyType defines strategies for pods in-place update.
CompletionPolicyType indicates the type of completion policy.
ConcurrencyPolicy describes how the job will be handled.
JobConditionType indicates valid conditions type of a job.
EphemeralJobPhase indicates the type of EphemeralJobPhase.
FailurePolicyType indicates the type of FailurePolicyType.
ImagePullPhase defines the tasks status.
ImagePullPolicy describes a policy for if/when to pull a container image +enum.
JobConditionType indicates valid conditions type of a job.
PodUpdateStrategyType is a string enumeration type that enumerates all possible ways we can update a Pod when updating application.
SyncStatusPhase defines the node status.
UnitedDeploymentConditionType indicates valid conditions type of a UnitedDeployment.
UnitedDeploymentScheduleStrategyType is a string enumeration type that enumerates all possible schedule strategies for the UnitedDeployment controller.
UpdateScatterStrategy defines a map for label key-value.
UpdateStrategyType is a string enumeration type that enumerates all possible update strategies for the UnitedDeployment controller.
WorkloadSpreadScheduleStrategyType is a string enumeration type that enumerates all possible schedule strategies for the WorkloadSpread controller.