core

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Overview

Package core is the internal version of the API.

Package core contains API Schema definitions for the core internal API group +groupName=core.ironcore.dev

Index

Constants

View Source
const (
	// ResourceCPU is the amount of cpu in cores.
	ResourceCPU ResourceName = "cpu"
	// ResourceMemory is the amount of memory in bytes.
	ResourceMemory ResourceName = "memory"
	// ResourceStorage is the amount of storage, in bytes.
	ResourceStorage ResourceName = "storage"
	// ResourceTPS defines max throughput per second. (e.g. 1Gi)
	ResourceTPS ResourceName = "tps"
	// ResourceIOPS defines max IOPS in input/output operations per second.
	ResourceIOPS ResourceName = "iops"

	// ResourcesRequestsPrefix is the prefix used for limiting resource requests in ResourceQuota.
	ResourcesRequestsPrefix = "requests."

	// ResourceRequestsCPU is the amount of requested cpu in cores.
	ResourceRequestsCPU = ResourcesRequestsPrefix + ResourceCPU
	// ResourceRequestsMemory is the amount of requested memory in bytes.
	ResourceRequestsMemory = ResourcesRequestsPrefix + ResourceMemory
	// ResourceRequestsStorage is the amount of requested storage in bytes.
	ResourceRequestsStorage = ResourcesRequestsPrefix + ResourceStorage

	// ResourceCountNamespacePrefix is resource namespace prefix for counting resources.
	ResourceCountNamespacePrefix = "count/"
)

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "core.ironcore.dev", Version: runtime.APIVersionInternal}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Types

type ObjectSelector

type ObjectSelector struct {
	// Kind is the kind of object to select.
	Kind string
	// LabelSelector is the label selector to select objects of the specified Kind by.
	metav1.LabelSelector
}

ObjectSelector specifies how to select objects of a certain kind.

func (*ObjectSelector) DeepCopy

func (in *ObjectSelector) DeepCopy() *ObjectSelector

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

func (*ObjectSelector) DeepCopyInto

func (in *ObjectSelector) DeepCopyInto(out *ObjectSelector)

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

type ResourceList

type ResourceList map[ResourceName]resource.Quantity

ResourceList is a list of ResourceName alongside their resource.Quantity.

func (*ResourceList) CPU

func (rl *ResourceList) CPU() *resource.Quantity

CPU is a shorthand for getting the quantity associated with ResourceCPU.

func (ResourceList) DeepCopy

func (in ResourceList) DeepCopy() ResourceList

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

func (ResourceList) DeepCopyInto

func (in ResourceList) DeepCopyInto(out *ResourceList)

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

func (*ResourceList) IOPS

func (rl *ResourceList) IOPS() *resource.Quantity

IOPS is a shorthand for getting the quantity associated with ResourceIOPS.

func (*ResourceList) Memory

func (rl *ResourceList) Memory() *resource.Quantity

Memory is a shorthand for getting the quantity associated with ResourceMemory.

func (*ResourceList) Name

func (rl *ResourceList) Name(name ResourceName, defaultFormat resource.Format) *resource.Quantity

Name returns the resource with name if specified, otherwise it returns a nil quantity with default format.

func (*ResourceList) Storage

func (rl *ResourceList) Storage() *resource.Quantity

Storage is a shorthand for getting the quantity associated with ResourceStorage.

func (*ResourceList) TPS

func (rl *ResourceList) TPS() *resource.Quantity

TPS is a shorthand for getting the quantity associated with ResourceTPS.

type ResourceName

type ResourceName string

ResourceName is the name of a resource, most often used alongside a resource.Quantity.

func ObjectCountQuotaResourceNameFor

func ObjectCountQuotaResourceNameFor(groupResource schema.GroupResource) ResourceName

ObjectCountQuotaResourceNameFor returns the ResourceName for counting the given groupResource.

type ResourceQuota

type ResourceQuota struct {
	metav1.TypeMeta
	metav1.ObjectMeta

	Spec   ResourceQuotaSpec
	Status ResourceQuotaStatus
}

ResourceQuota is the Schema for the resourcequotas API

func (*ResourceQuota) DeepCopy

func (in *ResourceQuota) DeepCopy() *ResourceQuota

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

func (*ResourceQuota) DeepCopyInto

func (in *ResourceQuota) DeepCopyInto(out *ResourceQuota)

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

func (*ResourceQuota) DeepCopyObject

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

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

type ResourceQuotaList

type ResourceQuotaList struct {
	metav1.TypeMeta
	metav1.ListMeta
	Items []ResourceQuota
}

ResourceQuotaList contains a list of ResourceQuota

func (*ResourceQuotaList) DeepCopy

func (in *ResourceQuotaList) DeepCopy() *ResourceQuotaList

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

func (*ResourceQuotaList) DeepCopyInto

func (in *ResourceQuotaList) DeepCopyInto(out *ResourceQuotaList)

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

func (*ResourceQuotaList) DeepCopyObject

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

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

type ResourceQuotaSpec

type ResourceQuotaSpec struct {
	// Hard is a ResourceList of the strictly enforced amount of resources.
	Hard ResourceList
	// ScopeSelector selects the resources that are subject to this quota.
	// Note: By using certain ScopeSelectors, only certain resources may be tracked.
	ScopeSelector *ResourceScopeSelector
}

ResourceQuotaSpec defines the desired state of ResourceQuotaSpec

func (*ResourceQuotaSpec) DeepCopy

func (in *ResourceQuotaSpec) DeepCopy() *ResourceQuotaSpec

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

func (*ResourceQuotaSpec) DeepCopyInto

func (in *ResourceQuotaSpec) DeepCopyInto(out *ResourceQuotaSpec)

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

type ResourceQuotaStatus

type ResourceQuotaStatus struct {
	// Hard are the currently enforced hard resource limits. Hard may be less than used in
	// case the limits were introduced / updated after more than allowed resources were already present.
	Hard ResourceList
	// Used is the amount of currently used resources.
	Used ResourceList
}

ResourceQuotaStatus is the status of a ResourceQuota.

func (*ResourceQuotaStatus) DeepCopy

func (in *ResourceQuotaStatus) DeepCopy() *ResourceQuotaStatus

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

func (*ResourceQuotaStatus) DeepCopyInto

func (in *ResourceQuotaStatus) DeepCopyInto(out *ResourceQuotaStatus)

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

type ResourceScope

type ResourceScope string

ResourceScope is a scope of a resource.

const (
	// ResourceScopeMachineClass refers to the machine class of a resource.
	ResourceScopeMachineClass ResourceScope = "MachineClass"
	// ResourceScopeVolumeClass refers to the volume class of a resource.
	ResourceScopeVolumeClass ResourceScope = "VolumeClass"
	// ResourceScopeBucketClass refers to the bucket class of a resource.
	ResourceScopeBucketClass ResourceScope = "BucketClass"
)

type ResourceScopeSelector

type ResourceScopeSelector struct {
	// MatchExpressions is a list of ResourceScopeSelectorRequirement to match resources by.
	MatchExpressions []ResourceScopeSelectorRequirement
}

ResourceScopeSelector selects

func (*ResourceScopeSelector) DeepCopy

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

func (*ResourceScopeSelector) DeepCopyInto

func (in *ResourceScopeSelector) DeepCopyInto(out *ResourceScopeSelector)

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

type ResourceScopeSelectorOperator

type ResourceScopeSelectorOperator string

ResourceScopeSelectorOperator is an operator to compare a ResourceScope with values.

type ResourceScopeSelectorRequirement

type ResourceScopeSelectorRequirement struct {
	// ScopeName is the ResourceScope to make a requirement for.
	ScopeName ResourceScope
	// Operator is the ResourceScopeSelectorOperator to check the ScopeName with in a resource.
	Operator ResourceScopeSelectorOperator
	// Values are the values to compare the Operator with the ScopeName. May be optional.
	Values []string
}

ResourceScopeSelectorRequirement is a requirement for a resource using a ResourceScope alongside a ResourceScopeSelectorOperator with Values (depending on the ResourceScopeSelectorOperator).

func (*ResourceScopeSelectorRequirement) DeepCopy

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

func (*ResourceScopeSelectorRequirement) DeepCopyInto

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

Directories

Path Synopsis
Package v1alpha1 is the v1alpha1 version of the API.
Package v1alpha1 is the v1alpha1 version of the API.

Jump to

Keyboard shortcuts

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