v1

package
v0.8.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const QuotaRequestCondition = "quota-request"
View Source
const Version = "v1"

Variables

View Source
var ErrExceededResources = fmt.Errorf("quota would be exceeded for resources")

Functions

func AddToScheme

func AddToScheme(scheme *runtime.Scheme) error

func GetDefaultComputeClass

func GetDefaultComputeClass(ctx context.Context, c client.Client, namespace string) (string, error)

Types

type ClusterComputeClassInstance

type ClusterComputeClassInstance ProjectComputeClassInstance

func (*ClusterComputeClassInstance) DeepCopy

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

func (*ClusterComputeClassInstance) DeepCopyInto

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

func (*ClusterComputeClassInstance) DeepCopyObject

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

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

func (*ClusterComputeClassInstance) EnsureRegion

func (in *ClusterComputeClassInstance) EnsureRegion(region string) bool

EnsureRegion checks that the class supports the region. If it does not, then the region is added.

func (*ClusterComputeClassInstance) HasRegion

func (in *ClusterComputeClassInstance) HasRegion(region string) bool

func (*ClusterComputeClassInstance) NamespaceScoped

func (in *ClusterComputeClassInstance) NamespaceScoped() bool

type ClusterComputeClassInstanceList

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

func (*ClusterComputeClassInstanceList) DeepCopy

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

func (*ClusterComputeClassInstanceList) DeepCopyInto

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

func (*ClusterComputeClassInstanceList) DeepCopyObject

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

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

type ClusterVolumeClassInstance

type ClusterVolumeClassInstance ProjectVolumeClassInstance

func (*ClusterVolumeClassInstance) DeepCopy

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

func (*ClusterVolumeClassInstance) DeepCopyInto

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

func (*ClusterVolumeClassInstance) DeepCopyObject

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

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

func (*ClusterVolumeClassInstance) EnsureRegion

func (c *ClusterVolumeClassInstance) EnsureRegion(region string) bool

EnsureRegion checks that the class supports the region. If it does not, then the region is added.

func (*ClusterVolumeClassInstance) HasRegion

func (c *ClusterVolumeClassInstance) HasRegion(region string) bool

func (*ClusterVolumeClassInstance) NamespaceScoped

func (c *ClusterVolumeClassInstance) NamespaceScoped() bool

type ClusterVolumeClassInstanceList

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

func (*ClusterVolumeClassInstanceList) DeepCopy

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

func (*ClusterVolumeClassInstanceList) DeepCopyInto

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

func (*ClusterVolumeClassInstanceList) DeepCopyObject

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

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

type ComputeClassMemory

type ComputeClassMemory struct {
	Min     string   `json:"min,omitempty"`
	Max     string   `json:"max,omitempty"`
	Default string   `json:"default,omitempty"`
	Values  []string `json:"values,omitempty"`
}

func (*ComputeClassMemory) DeepCopy

func (in *ComputeClassMemory) DeepCopy() *ComputeClassMemory

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

func (*ComputeClassMemory) DeepCopyInto

func (in *ComputeClassMemory) DeepCopyInto(out *ComputeClassMemory)

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

type ProjectComputeClassInstance

type ProjectComputeClassInstance struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
	Description       string              `json:"description,omitempty"`
	CPUScaler         float64             `json:"cpuScaler,omitempty"`
	Default           bool                `json:"default"`
	Affinity          *corev1.Affinity    `json:"affinity,omitempty"`
	Tolerations       []corev1.Toleration `json:"tolerations,omitempty"`
	Memory            ComputeClassMemory  `json:"memory,omitempty"`
	SupportedRegions  []string            `json:"supportedRegions,omitempty"`
	PriorityClassName string              `json:"priorityClassName,omitempty"`
}

func (*ProjectComputeClassInstance) DeepCopy

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

func (*ProjectComputeClassInstance) DeepCopyInto

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

func (*ProjectComputeClassInstance) DeepCopyObject

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

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

type ProjectComputeClassInstanceList

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

func (*ProjectComputeClassInstanceList) DeepCopy

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

func (*ProjectComputeClassInstanceList) DeepCopyInto

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

func (*ProjectComputeClassInstanceList) DeepCopyObject

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

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

type ProjectVolumeClassInstance

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

	StorageClassName   string          `json:"storageClassName"`
	Description        string          `json:"description"`
	Default            bool            `json:"default,omitempty"`
	AllowedAccessModes v1.AccessModes  `json:"allowedAccessModes,omitempty"`
	Size               VolumeClassSize `json:"size,omitempty"`
	Inactive           bool            `json:"inactive,omitempty"`
	SupportedRegions   []string        `json:"supportedRegions,omitempty"`
}

func (*ProjectVolumeClassInstance) DeepCopy

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

func (*ProjectVolumeClassInstance) DeepCopyInto

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

func (*ProjectVolumeClassInstance) DeepCopyObject

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

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

type ProjectVolumeClassInstanceList

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

func (*ProjectVolumeClassInstanceList) DeepCopy

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

func (*ProjectVolumeClassInstanceList) DeepCopyInto

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

func (*ProjectVolumeClassInstanceList) DeepCopyObject

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

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

type QuotaRequestInstance

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

	Spec   QuotaRequestInstanceSpec   `json:"spec,omitempty"`
	Status QuotaRequestInstanceStatus `json:"status,omitempty"`
}

func (*QuotaRequestInstance) Conditions

func (in *QuotaRequestInstance) Conditions() *[]v1.Condition

func (*QuotaRequestInstance) DeepCopy

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

func (*QuotaRequestInstance) DeepCopyInto

func (in *QuotaRequestInstance) DeepCopyInto(out *QuotaRequestInstance)

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

func (*QuotaRequestInstance) DeepCopyObject

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

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

func (*QuotaRequestInstance) EnsureRegion

func (in *QuotaRequestInstance) EnsureRegion(region string) bool

EnsureRegion checks or sets the region of a QuotaRequstInstance. If a QuotaRequstInstance's region is unset, EnsureRegion sets it to the given region and returns true. Otherwise, it returns true if and only if the Volume belongs to the given region.

func (*QuotaRequestInstance) GetRegion

func (in *QuotaRequestInstance) GetRegion() string

func (*QuotaRequestInstance) HasRegion

func (in *QuotaRequestInstance) HasRegion(region string) bool

type QuotaRequestInstanceList

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

func (*QuotaRequestInstanceList) DeepCopy

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

func (*QuotaRequestInstanceList) DeepCopyInto

func (in *QuotaRequestInstanceList) DeepCopyInto(out *QuotaRequestInstanceList)

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

func (*QuotaRequestInstanceList) DeepCopyObject

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

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

type QuotaRequestInstanceSpec

type QuotaRequestInstanceSpec struct {
	Region    string    `json:"region,omitempty"`
	Resources Resources `json:"resources,omitempty"`
}

func (*QuotaRequestInstanceSpec) DeepCopy

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

func (*QuotaRequestInstanceSpec) DeepCopyInto

func (in *QuotaRequestInstanceSpec) DeepCopyInto(out *QuotaRequestInstanceSpec)

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

type QuotaRequestInstanceStatus

type QuotaRequestInstanceStatus struct {
	ObservedGeneration int64          `json:"observedGeneration,omitempty"`
	AllocatedResources Resources      `json:"allocatedResources,omitempty"`
	FailedResources    *Resources     `json:"failedResources,omitempty"`
	Conditions         []v1.Condition `json:"conditions,omitempty"`
}

func (*QuotaRequestInstanceStatus) Condition

func (in *QuotaRequestInstanceStatus) Condition(name string) v1.Condition

func (*QuotaRequestInstanceStatus) DeepCopy

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

func (*QuotaRequestInstanceStatus) DeepCopyInto

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

type Resources

type Resources struct {
	Unlimited bool `json:"unlimited,omitempty"`

	Apps       int `json:"apps,omitempty"`
	Containers int `json:"containers,omitempty"`
	Jobs       int `json:"jobs,omitempty"`
	Volumes    int `json:"volumes,omitempty"`
	Secrets    int `json:"secrets,omitempty"`
	Images     int `json:"images,omitempty"`
	Projects   int `json:"projects,omitempty"`

	VolumeStorage resource.Quantity `json:"volumeStorage,omitempty"`
	Memory        resource.Quantity `json:"memory,omitempty"`
	CPU           resource.Quantity `json:"cpu,omitempty"`
}

Resources is a struct separate from the QuotaRequestInstanceSpec to allow for external controllers to programmatically set the resources easier. Calls to its functions are mutating.

func (*Resources) Add

func (current *Resources) Add(incoming Resources)

Add will add the resources of another Resources struct into the current one.

func (*Resources) DeepCopy

func (in *Resources) DeepCopy() *Resources

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

func (*Resources) DeepCopyInto

func (in *Resources) DeepCopyInto(out *Resources)

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

func (*Resources) Equals

func (current *Resources) Equals(incoming Resources) bool

Equals will check if the current Resources struct is equal to another. This is useful to avoid needing to do a deep equal on the entire struct.

func (*Resources) Fits

func (current *Resources) Fits(incoming Resources) error

Fits will check if a group of resources will be able to contain another group of resources. If the resources are not able to fit, an aggregated error will be returned with all exceeded resources. If the current resources defines unlimited, then it will always fit.

func (*Resources) NonEmptyString

func (current *Resources) NonEmptyString() string

NonEmptyString will return a string representation of the non-empty Resources within the struct.

func (*Resources) Remove

func (current *Resources) Remove(incoming Resources, all bool)

Remove will remove the resources of another Resources struct from the current one.

type VolumeClassSize

type VolumeClassSize struct {
	Default v1.Quantity `json:"default,omitempty"`
	Min     v1.Quantity `json:"min,omitempty"`
	Max     v1.Quantity `json:"max,omitempty"`
}

func (*VolumeClassSize) DeepCopy

func (in *VolumeClassSize) DeepCopy() *VolumeClassSize

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

func (*VolumeClassSize) DeepCopyInto

func (in *VolumeClassSize) DeepCopyInto(out *VolumeClassSize)

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