Documentation ¶
Index ¶
- Constants
- Variables
- func CompareScopes(scopes []AdjustmentScope, others []AdjustmentScope) bool
- func Resource(resource string) schema.GroupResource
- type Adjustment
- type AdjustmentList
- type AdjustmentNodeStatus
- type AdjustmentScope
- func (scope *AdjustmentScope) Compare(other *AdjustmentScope) bool
- func (in *AdjustmentScope) DeepCopy() *AdjustmentScope
- func (in *AdjustmentScope) DeepCopyInto(out *AdjustmentScope)
- func (scope *AdjustmentScope) IsContainerInScope(container resmgr.Evaluable) bool
- func (scope *AdjustmentScope) IsNodeInScope(node string) bool
- type AdjustmentSpec
- func (spec *AdjustmentSpec) Compare(other *AdjustmentSpec) bool
- func (in *AdjustmentSpec) DeepCopy() *AdjustmentSpec
- func (in *AdjustmentSpec) DeepCopyInto(out *AdjustmentSpec)
- func (spec *AdjustmentSpec) GetBlockIOClass() (string, bool)
- func (spec *AdjustmentSpec) GetRDTClass() (string, bool)
- func (spec *AdjustmentSpec) GetResourceRequirements() (corev1.ResourceRequirements, bool)
- func (spec *AdjustmentSpec) IsContainerInScope(container resmgr.Evaluable) bool
- func (spec *AdjustmentSpec) IsNodeInScope(node string) bool
- func (spec *AdjustmentSpec) NodeScope(node string) []AdjustmentScope
- func (spec *AdjustmentSpec) Verify() error
- type AdjustmentStatus
- type Classes
Constants ¶
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 ¶
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 )
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 ¶
AdjustmentNodeStatus represents the status of an adjustment on a node.
func (*AdjustmentNodeStatus) DeepCopy ¶
func (in *AdjustmentNodeStatus) DeepCopy() *AdjustmentNodeStatus
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 ¶
Classes defines RDT and BlockIO class assignments.
func (*Classes) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Classes.
func (*Classes) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.