Documentation
¶
Index ¶
- Constants
- func New(name string, options ...Option) *kvcorev1.VirtualMachineInstance
- func NewPreferredPodAntiAffinity(labelKey, labelVal string) *k8scorev1.PodAntiAffinity
- func NewRequiredNodeAffinity(nodeName string) *k8scorev1.NodeAffinity
- func Pointer[T any](v T) *T
- type Option
- func WithAffinity(affinity *corev1.Affinity) Option
- func WithCloudInitNoCloudVolume(name, userData string) Option
- func WithConfigMapDisk(name, serial string) Option
- func WithConfigMapVolume(name, configMapName string) Option
- func WithContainerDisk(volumeName, imageName string) Option
- func WithDedicatedCPU(socketsCount, coresCount, threadsCount uint32) Option
- func WithLabels(labels map[string]string) Option
- func WithMemory(hugePageSize, guestMemory string) Option
- func WithMultusNetwork(name, networkAttachmentDefinitionName string) Option
- func WithNetworkInterfaceMultiQueue() Option
- func WithOwnerReference(ownerName, ownerUID string) Option
- func WithRandomNumberGenerator() Option
- func WithReadinessFileProbe(fileName string) Option
- func WithSRIOVInterface(name, macAddress, pciAddress string) Option
- func WithTerminationGracePeriodSeconds(terminationGracePeriodSeconds int64) Option
- func WithVirtIODisk(name string) Option
- func WithoutCRIOCPULoadBalancing() Option
- func WithoutCRIOCPUQuota() Option
- func WithoutCRIOIRQLoadBalancing() Option
Constants ¶
View Source
const ( // CRIOCPULoadBalancingAnnotation indicates that load balancing should be disabled for CPUs used by the container CRIOCPULoadBalancingAnnotation = "cpu-load-balancing.crio.io" // CRIOCPUQuotaAnnotation indicates that CPU quota should be disabled for CPUs used by the container CRIOCPUQuotaAnnotation = "cpu-quota.crio.io" // CRIOIRQLoadBalancingAnnotation indicates that IRQ load balancing should be disabled for CPUs used by the container CRIOIRQLoadBalancingAnnotation = "irq-load-balancing.crio.io" )
View Source
const Disable = "disable"
Variables ¶
This section is empty.
Functions ¶
func NewPreferredPodAntiAffinity ¶ added in v0.2.0
func NewPreferredPodAntiAffinity(labelKey, labelVal string) *k8scorev1.PodAntiAffinity
NewPreferredPodAntiAffinity returns new pod anti-affinity with label selector of the given label key and value. Adding it to a VMI will make sure it won't schedule on the same node as other VMIs with the given label.
func NewRequiredNodeAffinity ¶ added in v0.2.0
func NewRequiredNodeAffinity(nodeName string) *k8scorev1.NodeAffinity
NewRequiredNodeAffinity returns new node affinity with node selector of the given node name. Adding it to a VMI will make sure it will schedule on the given node name.
Types ¶
type Option ¶
type Option func(vmi *kvcorev1.VirtualMachineInstance)
func WithAffinity ¶ added in v0.2.0
WithAffinity adds the given affinity.
func WithConfigMapDisk ¶ added in v0.2.0
func WithConfigMapVolume ¶ added in v0.2.0
func WithContainerDisk ¶
func WithDedicatedCPU ¶
func WithLabels ¶ added in v0.2.0
WithLabels adds the given labels.
func WithMemory ¶ added in v0.2.0
func WithMultusNetwork ¶
func WithNetworkInterfaceMultiQueue ¶
func WithNetworkInterfaceMultiQueue() Option
func WithOwnerReference ¶
func WithRandomNumberGenerator ¶
func WithRandomNumberGenerator() Option
func WithReadinessFileProbe ¶ added in v0.3.1
func WithSRIOVInterface ¶
func WithVirtIODisk ¶
func WithoutCRIOCPULoadBalancing ¶
func WithoutCRIOCPULoadBalancing() Option
func WithoutCRIOCPUQuota ¶
func WithoutCRIOCPUQuota() Option
func WithoutCRIOIRQLoadBalancing ¶
func WithoutCRIOIRQLoadBalancing() Option
Click to show internal directories.
Click to hide internal directories.