v1alpha1

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GroupName string = "criresmgr.intel.com"    // GroupName is the group of our CRD.
	Version   string = "v1alpha1"               // Version is the API version of our CRD.
	Kind      string = "Adjustment"             // Kind is the object kind of our CRD.
	Plural    string = "adjustments"            // Plural is Kind in plural form.
	Singular  string = "adjustment"             // Singular is Kind in singular form.
	Name      string = Plural + "." + GroupName // Name is the full name of our CRD.
)

Variables

View Source
var (
	// SchemeBuilder initializes a scheme builder
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is a global function that registers this API group & version to a scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{
	Group:   GroupName,
	Version: Version,
}

SchemeGroupVersion is group version used to register these objects.

Functions

func CompareScopes

func CompareScopes(scopes []AdjustmentScope, others []AdjustmentScope) bool

CompareScopes checks if two slices of scopes are (syntactically) identical.

func Resource

func Resource(resource string) schema.GroupResource

Types

type Adjustment

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

	Spec   AdjustmentSpec   `json:"spec"`
	Status AdjustmentStatus `json:"status"`
}

Adjustment is a CRD used to externally adjust containers resource assignments.

func (*Adjustment) DeepCopy

func (in *Adjustment) DeepCopy() *Adjustment

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

func (*Adjustment) DeepCopyInto

func (in *Adjustment) DeepCopyInto(out *Adjustment)

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

func (*Adjustment) DeepCopyObject

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

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

func (*Adjustment) HasSameVersion

func (a *Adjustment) HasSameVersion(o *Adjustment) bool

HasSameVersion checks if the policy has the same version as the other.

type AdjustmentList

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

	Items []Adjustment `json:"items"`
}

AdjustmentList is a list of Adjustments.

func (*AdjustmentList) DeepCopy

func (in *AdjustmentList) DeepCopy() *AdjustmentList

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

func (*AdjustmentList) DeepCopyInto

func (in *AdjustmentList) DeepCopyInto(out *AdjustmentList)

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

func (*AdjustmentList) DeepCopyObject

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

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

type AdjustmentNodeStatus

type AdjustmentNodeStatus struct {
	Errors map[string]string `json:"errors"`
}

AdjustmentNodeStatus represents the status of an adjustment on a node.

func (*AdjustmentNodeStatus) DeepCopy

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

func (*AdjustmentNodeStatus) DeepCopyInto

func (in *AdjustmentNodeStatus) DeepCopyInto(out *AdjustmentNodeStatus)

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

type AdjustmentScope

type AdjustmentScope struct {
	Nodes      []string             `json:"nodes"`
	Containers []*resmgr.Expression `json:"containers"`
}

AdjustmentScope defines the scope for an adjustment.

func (*AdjustmentScope) Compare

func (scope *AdjustmentScope) Compare(other *AdjustmentScope) bool

Compare check if the scope is identical to another one.

func (*AdjustmentScope) DeepCopy

func (in *AdjustmentScope) DeepCopy() *AdjustmentScope

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

func (*AdjustmentScope) DeepCopyInto

func (in *AdjustmentScope) DeepCopyInto(out *AdjustmentScope)

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

func (*AdjustmentScope) IsContainerInScope

func (scope *AdjustmentScope) IsContainerInScope(container resmgr.Evaluable) bool

IsContainerInScope tests if the container is within this scope.

func (*AdjustmentScope) IsNodeInScope

func (scope *AdjustmentScope) IsNodeInScope(node string) bool

IsNodeInScope tests if the node is within this scope.

type AdjustmentSpec

type AdjustmentSpec struct {
	Scope        []AdjustmentScope            `json:"scope"`
	Resources    *corev1.ResourceRequirements `json:"resources"`
	Classes      *Classes                     `json:"classes"`
	ToptierLimit *resapi.Quantity             `json:"toptierLimit"`
}

AdjustmentSpec specifies the scope for an external adjustment.

func (*AdjustmentSpec) Compare

func (spec *AdjustmentSpec) Compare(other *AdjustmentSpec) bool

Compare checks if this spec is identical to another.

func (*AdjustmentSpec) DeepCopy

func (in *AdjustmentSpec) DeepCopy() *AdjustmentSpec

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

func (*AdjustmentSpec) DeepCopyInto

func (in *AdjustmentSpec) DeepCopyInto(out *AdjustmentSpec)

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

func (*AdjustmentSpec) GetBlockIOClass

func (spec *AdjustmentSpec) GetBlockIOClass() (string, bool)

GetBlockIOClass returns the Block I/O class for this adjustment.

func (*AdjustmentSpec) GetRDTClass

func (spec *AdjustmentSpec) GetRDTClass() (string, bool)

GetRDTClass returns the RDT class for this adjustment.

func (*AdjustmentSpec) GetResourceRequirements

func (spec *AdjustmentSpec) GetResourceRequirements() (corev1.ResourceRequirements, bool)

GetResourceRequirements returns the k8s resource requirements for this adjustment.

func (*AdjustmentSpec) IsContainerInScope

func (spec *AdjustmentSpec) IsContainerInScope(container resmgr.Evaluable) bool

IsContainerInScope tests if the container is within the scope of this spec.

func (*AdjustmentSpec) IsNodeInScope

func (spec *AdjustmentSpec) IsNodeInScope(node string) bool

IsNodeInScope tests if the node is within the scope of this spec.

func (*AdjustmentSpec) NodeScope

func (spec *AdjustmentSpec) NodeScope(node string) []AdjustmentScope

NodeScope returns the sub-slice of scopes that apply to the given node.

func (*AdjustmentSpec) Verify

func (spec *AdjustmentSpec) Verify() error

Verify checks the given spec for obvious errors.

type AdjustmentStatus

type AdjustmentStatus struct {
	Nodes map[string]AdjustmentNodeStatus `json:"nodes"`
}

AdjustmentStatus represents the status of applying an adjustment.

func (*AdjustmentStatus) DeepCopy

func (in *AdjustmentStatus) DeepCopy() *AdjustmentStatus

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

func (*AdjustmentStatus) DeepCopyInto

func (in *AdjustmentStatus) DeepCopyInto(out *AdjustmentStatus)

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

type Classes

type Classes struct {
	BlockIO *string `json:"blockio"`
	RDT     *string `json:"rdt"`
}

Classes defines RDT and BlockIO class assignments.

func (*Classes) Compare

func (c *Classes) Compare(o *Classes) bool

Compare checks if the classes are identical to another set.

func (*Classes) DeepCopy

func (in *Classes) DeepCopy() *Classes

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

func (*Classes) DeepCopyInto

func (in *Classes) DeepCopyInto(out *Classes)

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