v1alpha1

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: Apache-2.0 Imports: 6 Imported by: 9

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API.

Package v1alpha1 contains API Schema definitions for the common v1alpha1 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
	// ResourceRequestsTPS is the amount of requested throughput per second.
	ResourceRequestsTPS = ResourcesRequestsPrefix + ResourceTPS
	// ResourceRequestsIOPS is the amount of requested IOPS in input/output operations per second.
	ResourceRequestsIOPS = ResourcesRequestsPrefix + ResourceIOPS

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

	// ClassPrefix is the prefix for a resource to define the max amount how many times an instance of a class can be provisioned.
	ClassPrefix = "class/"
)

Variables

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

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

func IsClassCountResource(resource ResourceName) bool

func Resource

func Resource(resource string) schema.GroupResource

Types

type ClassType

type ClassType string
const (
	ClassTypeMachineClass ClassType = "machine"
	ClassTypeVolumeClass  ClassType = "volume"
)

type ObjectSelector

type ObjectSelector struct {
	// Kind is the kind of object to select.
	Kind string `json:"kind"`
	// LabelSelector is the label selector to select objects of the specified Kind by.
	metav1.LabelSelector `json:",inline"`
}

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.

func (ObjectSelector) OpenAPIModelName added in v0.4.0

func (in ObjectSelector) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

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 ClassCountFor

func ClassCountFor(classType ClassType, className string) ResourceName

func ObjectCountQuotaResourceNameFor

func ObjectCountQuotaResourceNameFor(groupResource schema.GroupResource) ResourceName

ObjectCountQuotaResourceNameFor returns the ResourceName for counting the given groupResource.

type ResourceQuota

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

	Spec   ResourceQuotaSpec   `json:"spec,omitempty"`
	Status ResourceQuotaStatus `json:"status,omitempty"`
}

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.

func (ResourceQuota) OpenAPIModelName added in v0.4.0

func (in ResourceQuota) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

type ResourceQuotaList

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

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.

func (ResourceQuotaList) OpenAPIModelName added in v0.4.0

func (in ResourceQuotaList) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

type ResourceQuotaSpec

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

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.

func (ResourceQuotaSpec) OpenAPIModelName added in v0.4.0

func (in ResourceQuotaSpec) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

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 `json:"hard,omitempty"`
	// Used is the amount of currently used resources.
	Used ResourceList `json:"used,omitempty"`
}

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.

func (ResourceQuotaStatus) OpenAPIModelName added in v0.4.0

func (in ResourceQuotaStatus) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

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 `json:"matchExpressions,omitempty"`
}

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.

func (ResourceScopeSelector) OpenAPIModelName added in v0.4.0

func (in ResourceScopeSelector) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

type ResourceScopeSelectorOperator

type ResourceScopeSelectorOperator string

ResourceScopeSelectorOperator is an operator to compare a ResourceScope with values.

const (
	ResourceScopeSelectorOperatorIn           ResourceScopeSelectorOperator = "In"
	ResourceScopeSelectorOperatorNotIn        ResourceScopeSelectorOperator = "NotIn"
	ResourceScopeSelectorOperatorExists       ResourceScopeSelectorOperator = "Exists"
	ResourceScopeSelectorOperatorDoesNotExist ResourceScopeSelectorOperator = "DoesNotExist"
)

type ResourceScopeSelectorRequirement

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

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.

func (ResourceScopeSelectorRequirement) OpenAPIModelName added in v0.4.0

func (in ResourceScopeSelectorRequirement) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

Jump to

Keyboard shortcuts

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