v1alpha1

package
v1.12.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=apps.karmada.io

Index

Constants

View Source
const (
	// ResourceKindWorkloadRebalancer is kind name of WorkloadRebalancer.
	ResourceKindWorkloadRebalancer = "WorkloadRebalancer"
	// ResourceSingularWorkloadRebalancer is singular name of WorkloadRebalancer.
	ResourceSingularWorkloadRebalancer = "workloadrebalancer"
	// ResourcePluralWorkloadRebalancer is kind plural name of WorkloadRebalancer.
	ResourcePluralWorkloadRebalancer = "workloadrebalancers"
	// ResourceNamespaceScopedWorkloadRebalancer indicates if WorkloadRebalancer is NamespaceScoped.
	ResourceNamespaceScopedWorkloadRebalancer = false
)
View Source
const GroupName = "apps.karmada.io"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Deprecated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ObjectReference

type ObjectReference struct {
	// APIVersion represents the API version of the target resource.
	// +required
	APIVersion string `json:"apiVersion"`

	// Kind represents the Kind of the target resource.
	// +required
	Kind string `json:"kind"`

	// Name of the target resource.
	// +required
	Name string `json:"name"`

	// Namespace of the target resource.
	// Default is empty, which means it is a non-namespacescoped resource.
	// +optional
	Namespace string `json:"namespace,omitempty"`
}

ObjectReference the expected resource.

func (*ObjectReference) DeepCopy

func (in *ObjectReference) DeepCopy() *ObjectReference

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

func (*ObjectReference) DeepCopyInto

func (in *ObjectReference) DeepCopyInto(out *ObjectReference)

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

type ObservedWorkload

type ObservedWorkload struct {
	// Workload the observed resource.
	// +required
	Workload ObjectReference `json:"workload"`

	// Result the observed rebalance result of resource.
	// +optional
	Result RebalanceResult `json:"result,omitempty"`

	// Reason represents a machine-readable description of why this resource rebalanced failed.
	// +optional
	Reason RebalanceFailedReason `json:"reason,omitempty"`
}

ObservedWorkload the observed resource.

func (*ObservedWorkload) DeepCopy

func (in *ObservedWorkload) DeepCopy() *ObservedWorkload

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

func (*ObservedWorkload) DeepCopyInto

func (in *ObservedWorkload) DeepCopyInto(out *ObservedWorkload)

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

type RebalanceFailedReason

type RebalanceFailedReason string

RebalanceFailedReason represents a machine-readable description of why this resource rebalanced failed.

const (
	// RebalanceObjectNotFound the resource referenced binding not found.
	RebalanceObjectNotFound RebalanceFailedReason = "ReferencedBindingNotFound"
)

type RebalanceResult

type RebalanceResult string

RebalanceResult the specific extent to which the resource has been rebalanced

const (
	// RebalanceFailed the resource has been rebalance failed.
	RebalanceFailed RebalanceResult = "Failed"
	// RebalanceSuccessful the resource has been successfully rebalanced.
	RebalanceSuccessful RebalanceResult = "Successful"
)

type WorkloadRebalancer

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

	// Spec represents the specification of the desired behavior of WorkloadRebalancer.
	// +required
	Spec WorkloadRebalancerSpec `json:"spec"`

	// Status represents the status of WorkloadRebalancer.
	// +optional
	Status WorkloadRebalancerStatus `json:"status,omitempty"`
}

WorkloadRebalancer represents the desired behavior and status of a job which can enforces a resource rebalance.

func (*WorkloadRebalancer) DeepCopy

func (in *WorkloadRebalancer) DeepCopy() *WorkloadRebalancer

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

func (*WorkloadRebalancer) DeepCopyInto

func (in *WorkloadRebalancer) DeepCopyInto(out *WorkloadRebalancer)

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

func (*WorkloadRebalancer) DeepCopyObject

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

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

type WorkloadRebalancerList

type WorkloadRebalancerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items holds a list of WorkloadRebalancer.
	Items []WorkloadRebalancer `json:"items"`
}

WorkloadRebalancerList contains a list of WorkloadRebalancer

func (*WorkloadRebalancerList) DeepCopy

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

func (*WorkloadRebalancerList) DeepCopyInto

func (in *WorkloadRebalancerList) DeepCopyInto(out *WorkloadRebalancerList)

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

func (*WorkloadRebalancerList) DeepCopyObject

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

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

type WorkloadRebalancerSpec

type WorkloadRebalancerSpec struct {
	// Workloads used to specify the list of expected resource.
	// Nil or empty list is not allowed.
	// +kubebuilder:validation:MinItems=1
	// +required
	Workloads []ObjectReference `json:"workloads"`

	// TTLSecondsAfterFinished limits the lifetime of a WorkloadRebalancer that has finished execution (means each
	// target workload is finished with result of Successful or Failed).
	// If this field is set, ttlSecondsAfterFinished after the WorkloadRebalancer finishes, it is eligible to be automatically deleted.
	// If this field is unset, the WorkloadRebalancer won't be automatically deleted.
	// If this field is set to zero, the WorkloadRebalancer becomes eligible to be deleted immediately after it finishes.
	// +optional
	TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"`
}

WorkloadRebalancerSpec represents the specification of the desired behavior of Reschedule.

func (*WorkloadRebalancerSpec) DeepCopy

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

func (*WorkloadRebalancerSpec) DeepCopyInto

func (in *WorkloadRebalancerSpec) DeepCopyInto(out *WorkloadRebalancerSpec)

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

type WorkloadRebalancerStatus

type WorkloadRebalancerStatus struct {
	// ObservedWorkloads contains information about the execution states and messages of target resources.
	// +optional
	ObservedWorkloads []ObservedWorkload `json:"observedWorkloads,omitempty"`

	// ObservedGeneration is the generation(.metadata.generation) observed by the controller.
	// If ObservedGeneration is less than the generation in metadata means the controller hasn't confirmed
	// the rebalance result or hasn't done the rebalance yet.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// FinishTime represents the finish time of rebalancer.
	// +optional
	FinishTime *metav1.Time `json:"finishTime,omitempty"`
}

WorkloadRebalancerStatus contains information about the current status of a WorkloadRebalancer updated periodically by schedule trigger controller.

func (*WorkloadRebalancerStatus) DeepCopy

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

func (*WorkloadRebalancerStatus) DeepCopyInto

func (in *WorkloadRebalancerStatus) DeepCopyInto(out *WorkloadRebalancerStatus)

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