v1

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Overview

Package v1 contains API Schema definitions for the quota v1 API group +kubebuilder:object:generate=true +groupName=quota.kubecube.io

Index

Constants

View Source
const GlobalNodesPool = "global"

GlobalNodesPool means

Variables

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

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

This section is empty.

Types

type CubeResourceQuota

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

	Spec   CubeResourceQuotaSpec   `json:"spec,omitempty"`
	Status CubeResourceQuotaStatus `json:"status,omitempty"`
}

CubeResourceQuota is the Schema for the cuberesourcequota API

func (*CubeResourceQuota) DeepCopy

func (in *CubeResourceQuota) DeepCopy() *CubeResourceQuota

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

func (*CubeResourceQuota) DeepCopyInto

func (in *CubeResourceQuota) DeepCopyInto(out *CubeResourceQuota)

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

func (*CubeResourceQuota) DeepCopyObject

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

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

type CubeResourceQuotaList

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

CubeResourceQuotaList contains a list of CubeResourceQuota

func (*CubeResourceQuotaList) DeepCopy

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

func (*CubeResourceQuotaList) DeepCopyInto

func (in *CubeResourceQuotaList) DeepCopyInto(out *CubeResourceQuotaList)

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

func (*CubeResourceQuotaList) DeepCopyObject

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

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

type CubeResourceQuotaSpec

type CubeResourceQuotaSpec struct {
	// Hard is the set of desired hard limits for each named resource.
	// Its empty when TargetObj is NodesPoolObj
	Hard v1.ResourceList `json:"hard,omitempty"`

	// ParentQuota point to upper quota, its empty if current is top level
	// meanwhile PhysicalLimit will be used as limit condition
	// +optional
	ParentQuota string `json:"parentQuota,omitempty"`

	// Target point to the subject object quota to effect
	Target TargetObj `json:"target,omitempty"`
}

CubeResourceQuotaSpec defines the desired state of CubeResourceQuota

func (*CubeResourceQuotaSpec) DeepCopy

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

func (*CubeResourceQuotaSpec) DeepCopyInto

func (in *CubeResourceQuotaSpec) DeepCopyInto(out *CubeResourceQuotaSpec)

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

type CubeResourceQuotaStatus

type CubeResourceQuotaStatus struct {
	// Hard is the set of enforced hard limits for each named resource.
	// Limit always equals to request when TargetObj is NodesPoolObj
	// +optional
	Hard v1.ResourceList `json:"hard,omitempty"`
	// Used is the current observed total usage of the resource in the namespace
	// +optional
	Used v1.ResourceList `json:"used,omitempty"`

	// SubResourceQuotas contains child resource quotas of cube resource quota.
	// {name}.{namespace}.quota means resource quota
	// {name}.quota means cube resource quota
	// +optional
	SubResourceQuotas []string `json:"subResourceQuotas,omitempty"`
}

CubeResourceQuotaStatus defines the observed state of CubeResourceQuota

func (*CubeResourceQuotaStatus) DeepCopy

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

func (*CubeResourceQuotaStatus) DeepCopyInto

func (in *CubeResourceQuotaStatus) DeepCopyInto(out *CubeResourceQuotaStatus)

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

type TargetKind

type TargetKind string
const (
	NodesPoolObj TargetKind = "NodesPool"
	TenantObj    TargetKind = "Tenant"
	ProjectObj   TargetKind = "Project"
)

type TargetObj

type TargetObj struct {
	Name string     `json:"name,omitempty"`
	Kind TargetKind `json:"kind,omitempty"`
}

func (*TargetObj) DeepCopy

func (in *TargetObj) DeepCopy() *TargetObj

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

func (*TargetObj) DeepCopyInto

func (in *TargetObj) DeepCopyInto(out *TargetObj)

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