Documentation ¶
Overview ¶
Package v2 is the v2 version of the API.
Package v2 contains API Schema definitions for the performance v2 API group +kubebuilder:object:generate=true +groupName=performance.openshift.io
Index ¶
- Constants
- Variables
- type CPU
- type CPUSet
- type CPUfrequency
- type Device
- type HardwareTuning
- type HugePage
- type HugePageSize
- type HugePages
- type NUMA
- type Net
- type PerformanceProfile
- func (curr *PerformanceProfile) ConvertFrom(srcRaw conversion.Hub) error
- func (curr *PerformanceProfile) ConvertTo(dstRaw conversion.Hub) error
- func (in *PerformanceProfile) DeepCopy() *PerformanceProfile
- func (in *PerformanceProfile) DeepCopyInto(out *PerformanceProfile)
- func (in *PerformanceProfile) DeepCopyObject() runtime.Object
- func (r *PerformanceProfile) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *PerformanceProfile) ValidateBasicFields() field.ErrorList
- func (r *PerformanceProfile) ValidateCreate() (admission.Warnings, error)
- func (r *PerformanceProfile) ValidateDelete() (admission.Warnings, error)
- func (r *PerformanceProfile) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type PerformanceProfileList
- type PerformanceProfileSpec
- type PerformanceProfileStatus
- type RealTimeKernel
- type WorkloadHints
Constants ¶
const PerformanceProfileEnablePhysicalRpsAnnotation = "performance.openshift.io/enable-physical-dev-rps"
PerformanceProfileEnableRpsAnnotation enables RPS mask setting with systemd for all network devices by including physical interfaces from netdev-rps rule.
const PerformanceProfileEnableRpsAnnotation = "performance.openshift.io/enable-rps"
PerformanceProfileEnableRpsAnnotation is an emergancy annotation that ignores the removal of all RPS settings when realtime workload hint is explicitly set to false.
const PerformanceProfilePauseAnnotation = "performance.openshift.io/pause-reconcile"
PerformanceProfilePauseAnnotation allows an admin to suspend the operator's reconcile loop in order to perform manual changes to performance profile owned objects.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "performance.openshift.io", Version: "v2"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type CPU ¶
type CPU struct { // Reserved defines a set of CPUs that will not be used for any container workloads initiated by kubelet. Reserved *CPUSet `json:"reserved"` // Isolated defines a set of CPUs that will be used to give to application threads the most execution time possible, // which means removing as many extraneous tasks off a CPU as possible. // It is important to notice the CPU manager can choose any CPU to run the workload // except the reserved CPUs. In order to guarantee that your workload will run on the isolated CPU: // 1. The union of reserved CPUs and isolated CPUs should include all online CPUs // 2. The isolated CPUs field should be the complementary to reserved CPUs field Isolated *CPUSet `json:"isolated"` // BalanceIsolated toggles whether or not the Isolated CPU set is eligible for load balancing work loads. // When this option is set to "false", the Isolated CPU set will be static, meaning workloads have to // explicitly assign each thread to a specific cpu in order to work across multiple CPUs. // Setting this to "true" allows workloads to be balanced across CPUs. // Setting this to "false" offers the most predictable performance for guaranteed workloads, but it // offloads the complexity of cpu load balancing to the application. // Defaults to "true" // +optional BalanceIsolated *bool `json:"balanceIsolated,omitempty"` // Offline defines a set of CPUs that will be unused and set offline // +optional Offlined *CPUSet `json:"offlined,omitempty"` // that needs additional cpus which are not exclusive, // alongside the isolated, exclusive resources that are being used already by those workloads. // +optional Shared *CPUSet `json:"shared,omitempty"` }
CPU defines a set of CPU related features.
func (*CPU) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPU.
func (*CPU) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CPUfrequency ¶
type CPUfrequency int
CPUfrequency defines cpu frequencies for isolated and reserved cpus
type Device ¶
type Device struct { // Network device name to be matched. It uses a syntax of shell-style wildcards which are either positive or negative. // +optional InterfaceName *string `json:"interfaceName,omitempty"` // Network device vendor ID represnted as a 16 bit Hexmadecimal number. // +optional VendorID *string `json:"vendorID,omitempty"` // Network device ID (model) represnted as a 16 bit hexmadecimal number. // +optional DeviceID *string `json:"deviceID,omitempty"` }
Device defines a way to represent a network device in several options: device name, vendor ID, model ID, PCI path and MAC address
func (*Device) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Device.
func (*Device) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HardwareTuning ¶
type HardwareTuning struct { // IsolatedCpuFreq defines a minimum frequency to be set across isolated cpus IsolatedCpuFreq *CPUfrequency `json:"isolatedCpuFreq,omitempty"` // ReservedCpuFreq defines a maximum frequency to be set across reserved cpus ReservedCpuFreq *CPUfrequency `json:"reservedCpuFreq,omitempty"` }
HardwareTuning defines a set of CPU frequency related features.
func (*HardwareTuning) DeepCopy ¶
func (in *HardwareTuning) DeepCopy() *HardwareTuning
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HardwareTuning.
func (*HardwareTuning) DeepCopyInto ¶
func (in *HardwareTuning) DeepCopyInto(out *HardwareTuning)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HugePage ¶
type HugePage struct { // Size defines huge page size, maps to the 'hugepagesz' kernel boot parameter. Size HugePageSize `json:"size,omitempty"` // Count defines amount of huge pages, maps to the 'hugepages' kernel boot parameter. Count int32 `json:"count,omitempty"` // Node defines the NUMA node where hugepages will be allocated, // if not specified, pages will be allocated equally between NUMA nodes // +optional Node *int32 `json:"node,omitempty"` }
HugePage defines the number of allocated huge pages of the specific size.
func (*HugePage) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HugePage.
func (*HugePage) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HugePageSize ¶
type HugePageSize string
HugePageSize defines size of huge pages The allowed values for this depend on CPU architecture For x86/amd64, the valid values are 2M and 1G For aarch64, the valid values are 2M, 32M, and 512M
type HugePages ¶
type HugePages struct { // DefaultHugePagesSize defines huge pages default size under kernel boot parameters. DefaultHugePagesSize *HugePageSize `json:"defaultHugepagesSize,omitempty"` // Pages defines huge pages that we want to allocate at boot time. Pages []HugePage `json:"pages,omitempty"` }
HugePages defines a set of huge pages that we want to allocate at boot.
func (*HugePages) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HugePages.
func (*HugePages) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NUMA ¶
type NUMA struct { // Name of the policy applied when TopologyManager is enabled // Operator defaults to "best-effort" // +optional TopologyPolicy *string `json:"topologyPolicy,omitempty"` }
NUMA defines parameters related to topology awareness and affinity.
func (*NUMA) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NUMA.
func (*NUMA) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Net ¶
type Net struct { // UserLevelNetworking when enabled - sets either all or specified network devices queue size to the amount of reserved CPUs. Defaults to "false". UserLevelNetworking *bool `json:"userLevelNetworking,omitempty"` // Devices contains a list of network device representations that will be // set with a netqueue count equal to CPU.Reserved . // If no devices are specified then the default is all devices. Devices []Device `json:"devices,omitempty"` }
Net defines a set of network related features
func (*Net) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Net.
func (*Net) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PerformanceProfile ¶
type PerformanceProfile struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec PerformanceProfileSpec `json:"spec,omitempty"` Status PerformanceProfileStatus `json:"status,omitempty"` }
PerformanceProfile is the Schema for the performanceprofiles API
func (*PerformanceProfile) ConvertFrom ¶
func (curr *PerformanceProfile) ConvertFrom(srcRaw conversion.Hub) error
ConvertFrom converts from the Hub version (v1) to this version.
func (*PerformanceProfile) ConvertTo ¶
func (curr *PerformanceProfile) ConvertTo(dstRaw conversion.Hub) error
ConvertTo converts this PerformanceProfile to the Hub version (v1).
func (*PerformanceProfile) DeepCopy ¶
func (in *PerformanceProfile) DeepCopy() *PerformanceProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerformanceProfile.
func (*PerformanceProfile) DeepCopyInto ¶
func (in *PerformanceProfile) DeepCopyInto(out *PerformanceProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PerformanceProfile) DeepCopyObject ¶
func (in *PerformanceProfile) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*PerformanceProfile) SetupWebhookWithManager ¶
func (r *PerformanceProfile) SetupWebhookWithManager(mgr ctrl.Manager) error
SetupWebhookWithManager enables Webhooks - needed for version conversion
func (*PerformanceProfile) ValidateBasicFields ¶
func (r *PerformanceProfile) ValidateBasicFields() field.ErrorList
func (*PerformanceProfile) ValidateCreate ¶
func (r *PerformanceProfile) ValidateCreate() (admission.Warnings, error)
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*PerformanceProfile) ValidateDelete ¶
func (r *PerformanceProfile) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*PerformanceProfile) ValidateUpdate ¶
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type PerformanceProfileList ¶
type PerformanceProfileList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []PerformanceProfile `json:"items"` }
PerformanceProfileList contains a list of PerformanceProfile
func (*PerformanceProfileList) DeepCopy ¶
func (in *PerformanceProfileList) DeepCopy() *PerformanceProfileList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerformanceProfileList.
func (*PerformanceProfileList) DeepCopyInto ¶
func (in *PerformanceProfileList) DeepCopyInto(out *PerformanceProfileList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PerformanceProfileList) DeepCopyObject ¶
func (in *PerformanceProfileList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PerformanceProfileSpec ¶
type PerformanceProfileSpec struct { // CPU defines a set of CPU related parameters. CPU *CPU `json:"cpu"` // HardwareTuning defines a set of CPU frequencies for isolated and reserved cpus. // +optional HardwareTuning *HardwareTuning `json:"hardwareTuning,omitempty"` // HugePages defines a set of huge pages related parameters. // It is possible to set huge pages with multiple size values at the same time. // For example, hugepages can be set with 1G and 2M, both values will be set on the node by the Performance Profile Controller. // It is important to notice that setting hugepages default size to 1G will remove all 2M related // folders from the node and it will be impossible to configure 2M hugepages under the node. HugePages *HugePages `json:"hugepages,omitempty"` // MachineConfigLabel defines the label to add to the MachineConfigs the operator creates. It has to be // used in the MachineConfigSelector of the MachineConfigPool which targets this performance profile. // Defaults to "machineconfiguration.openshift.io/role=<same role as in NodeSelector label key>" // +optional MachineConfigLabel map[string]string `json:"machineConfigLabel,omitempty"` // MachineConfigPoolSelector defines the MachineConfigPool label to use in the MachineConfigPoolSelector // of resources like KubeletConfigs created by the operator. // Defaults to "machineconfiguration.openshift.io/role=<same role as in NodeSelector label key>" // +optional MachineConfigPoolSelector map[string]string `json:"machineConfigPoolSelector,omitempty"` // NodeSelector defines the Node label to use in the NodeSelectors of resources like Tuned created by the operator. // It most likely should, but does not have to match the node label in the NodeSelector of the MachineConfigPool // which targets this performance profile. // In the case when machineConfigLabels or machineConfigPoolSelector are not set, we are expecting a certain NodeSelector format // <domain>/<role>: "" in order to be able to calculate the default values for the former mentioned fields. NodeSelector map[string]string `json:"nodeSelector"` // RealTimeKernel defines a set of real time kernel related parameters. RT kernel won't be installed when not set. RealTimeKernel *RealTimeKernel `json:"realTimeKernel,omitempty"` // Additional kernel arguments. // +optional AdditionalKernelArgs []string `json:"additionalKernelArgs,omitempty"` // NUMA defines options related to topology aware affinities // +optional NUMA *NUMA `json:"numa,omitempty"` // Net defines a set of network related features // +optional Net *Net `json:"net,omitempty"` // GloballyDisableIrqLoadBalancing toggles whether IRQ load balancing will be disabled for the Isolated CPU set. // When the option is set to "true" it disables IRQs load balancing for the Isolated CPU set. // Setting the option to "false" allows the IRQs to be balanced across all CPUs, however the IRQs load balancing // can be disabled per pod CPUs when using irq-load-balancing.crio.io/cpu-quota.crio.io annotations. // Defaults to "false" // +optional GloballyDisableIrqLoadBalancing *bool `json:"globallyDisableIrqLoadBalancing,omitempty"` // WorkloadHints defines hints for different types of workloads. It will allow defining exact set of tuned and // kernel arguments that should be applied on top of the node. // +optional WorkloadHints *WorkloadHints `json:"workloadHints,omitempty"` }
PerformanceProfileSpec defines the desired state of PerformanceProfile.
func (*PerformanceProfileSpec) DeepCopy ¶
func (in *PerformanceProfileSpec) DeepCopy() *PerformanceProfileSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerformanceProfileSpec.
func (*PerformanceProfileSpec) DeepCopyInto ¶
func (in *PerformanceProfileSpec) DeepCopyInto(out *PerformanceProfileSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PerformanceProfileStatus ¶
type PerformanceProfileStatus struct { // Conditions represents the latest available observations of current state. // +optional Conditions []conditionsv1.Condition `json:"conditions,omitempty"` // Tuned points to the Tuned custom resource object that contains the tuning values generated by this operator. // +optional Tuned *string `json:"tuned,omitempty"` // RuntimeClass contains the name of the RuntimeClass resource created by the operator. RuntimeClass *string `json:"runtimeClass,omitempty"` }
PerformanceProfileStatus defines the observed state of PerformanceProfile.
func (*PerformanceProfileStatus) DeepCopy ¶
func (in *PerformanceProfileStatus) DeepCopy() *PerformanceProfileStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerformanceProfileStatus.
func (*PerformanceProfileStatus) DeepCopyInto ¶
func (in *PerformanceProfileStatus) DeepCopyInto(out *PerformanceProfileStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RealTimeKernel ¶
type RealTimeKernel struct { // Enabled defines if the real time kernel packages should be installed. Defaults to "false" Enabled *bool `json:"enabled,omitempty"` }
RealTimeKernel defines the set of parameters relevant for the real time kernel.
func (*RealTimeKernel) DeepCopy ¶
func (in *RealTimeKernel) DeepCopy() *RealTimeKernel
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RealTimeKernel.
func (*RealTimeKernel) DeepCopyInto ¶
func (in *RealTimeKernel) DeepCopyInto(out *RealTimeKernel)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkloadHints ¶
type WorkloadHints struct { // HighPowerConsumption defines if the node should be configured in high power consumption mode. // The flag will affect the power consumption but will improve the CPUs latency. Defaults to false. // +optional HighPowerConsumption *bool `json:"highPowerConsumption,omitempty"` // RealTime defines if the node should be configured for the real time workload. Defaults to true. // +default=true // +optional RealTime *bool `json:"realTime,omitempty"` // +optional // PerPodPowerManagement defines if the node should be configured in per pod power management. // PerPodPowerManagement and HighPowerConsumption hints can not be enabled together. Defaults to false. PerPodPowerManagement *bool `json:"perPodPowerManagement,omitempty"` // +optional // MixedCpus enables the mixed-cpu-node-plugin on the node. // Defaults to false. MixedCpus *bool `json:"mixedCpus,omitempty"` }
WorkloadHints defines the set of upper level flags for different type of workloads.
func (*WorkloadHints) DeepCopy ¶
func (in *WorkloadHints) DeepCopy() *WorkloadHints
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadHints.
func (*WorkloadHints) DeepCopyInto ¶
func (in *WorkloadHints) DeepCopyInto(out *WorkloadHints)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.