v1

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 23 Imported by: 11

Documentation

Overview

Package v1 contains API Schema definitions for the sriovnetwork v1 API group +kubebuilder:object:generate=true +groupName=sriovnetwork.openshift.io

Index

Constants

View Source
const (
	LASTNETWORKNAMESPACE    = "operator.sriovnetwork.openshift.io/last-network-namespace"
	NETATTDEFFINALIZERNAME  = "netattdef.finalizers.sriovnetwork.openshift.io"
	POOLCONFIGFINALIZERNAME = "poolconfig.finalizers.sriovnetwork.openshift.io"
	ESwithModeLegacy        = "legacy"
	ESwithModeSwitchDev     = "switchdev"

	SriovCniStateEnable  = "enable"
	SriovCniStateDisable = "disable"
	SriovCniStateAuto    = "auto"
	SriovCniStateOff     = "off"
	SriovCniStateOn      = "on"
	SriovCniIpam         = "\"ipam\""
	SriovCniIpamEmpty    = SriovCniIpam + ":{}"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "sriovnetwork.openshift.io", Version: "v1"}

	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "sriovnetwork.openshift.io", Version: "v1"}

	// 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
)
View Source
var ManifestsPath = "./bindata/manifests/cni-config"
View Source
var NicIDMap = []string{}

NicIDMap contains supported mapping of IDs with each in the format of: Vendor ID, Physical Function Device ID, Virtual Function Device ID

Functions

func ContainsSwitchdevInterface added in v1.3.0

func ContainsSwitchdevInterface(interfaces []Interface) bool

ContainsSwitchdevInterface returns true if provided interface list contains interface with switchdev configuration

func GenerateBridgeName added in v1.4.0

func GenerateBridgeName(iface *InterfaceExt) string

GenerateBridgeName generate predictable name for the software bridge current format is: br-0000_00_03.0

func GetEswitchModeFromSpec added in v1.3.0

func GetEswitchModeFromSpec(ifaceSpec *Interface) string

GetEswitchModeFromSpec returns ESwitchMode from the interface spec, returns legacy if not set

func GetEswitchModeFromStatus added in v1.3.0

func GetEswitchModeFromStatus(ifaceStatus *InterfaceExt) string

GetEswitchModeFromStatus returns ESwitchMode from the interface status, returns legacy if not set

func GetSupportedVfIds

func GetSupportedVfIds() []string

func GetVfDeviceID added in v1.2.0

func GetVfDeviceID(deviceID string) string

func IndexInRange

func IndexInRange(i int, r string) bool

func InitNicIDMapFromConfigMap added in v1.3.0

func InitNicIDMapFromConfigMap(client kubernetes.Interface, namespace string) error

func InitNicIDMapFromList added in v1.3.0

func InitNicIDMapFromList(idList []string)

func IsEnabledUnsupportedVendor

func IsEnabledUnsupportedVendor(vendorID string, unsupportedNicIDMap map[string]string) bool

func IsSupportedDevice

func IsSupportedDevice(deviceID string) bool

func IsSupportedModel

func IsSupportedModel(vendorID, deviceID string) bool

func IsSupportedVendor

func IsSupportedVendor(vendorID string) bool

func IsSwitchdevModeSpec added in v1.3.0

func IsSwitchdevModeSpec(spec SriovNetworkNodeStateSpec) bool

func IsValidPciString

func IsValidPciString(nicIDString string) bool

func IsVfSupportedModel added in v1.1.0

func IsVfSupportedModel(vendorID, deviceID string) bool

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func NeedToUpdateBridges added in v1.4.0

func NeedToUpdateBridges(bridgeSpec, bridgeStatus *Bridges) bool

NeedToUpdateBridges returns true if bridge for the host requires update

func NeedToUpdateSriov added in v1.3.0

func NeedToUpdateSriov(ifaceSpec *Interface, ifaceStatus *InterfaceExt) bool

func NetFilterMatch

func NetFilterMatch(netFilter string, netValue string) (isMatch bool)

NetFilterMatch -- parse netFilter and check for a match

func ParseVfRange added in v1.3.0

func ParseVfRange(device string) (rootDeviceName string, rngSt, rngEnd int, err error)

ParseVfRange: parse a device with VF range this can be rootDevices or PFName if no range detect we just return the device name

func RemoveString

func RemoveString(s string, slice []string) (result []string, found bool)

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func SplitDeviceFromRange added in v1.3.0

func SplitDeviceFromRange(device string) (string, string)

SplitDeviceFromRange return the device name and the range. the split is base on #

func StringInArray

func StringInArray(val string, array []string) bool

func UniqueAppend

func UniqueAppend(inSlice []string, strings ...string) []string

Types

type Bridge added in v1.3.0

type Bridge struct {
	// contains configuration for the OVS bridge,
	OVS *OVSConfig `json:"ovs,omitempty"`
}

contains spec for the bridge

func (*Bridge) DeepCopy added in v1.3.0

func (in *Bridge) DeepCopy() *Bridge

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

func (*Bridge) DeepCopyInto added in v1.3.0

func (in *Bridge) DeepCopyInto(out *Bridge)

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

func (*Bridge) IsEmpty added in v1.3.0

func (b *Bridge) IsEmpty() bool

IsEmpty return empty if the struct doesn't contain configuration

type Bridges added in v1.3.0

type Bridges struct {
	OVS []OVSConfigExt `json:"ovs,omitempty"`
}

Bridges contains list of bridges

func (*Bridges) DeepCopy added in v1.3.0

func (in *Bridges) DeepCopy() *Bridges

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

func (*Bridges) DeepCopyInto added in v1.3.0

func (in *Bridges) DeepCopyInto(out *Bridges)

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

type ByPriority

type ByPriority []SriovNetworkNodePolicy

func (ByPriority) DeepCopy

func (in ByPriority) DeepCopy() ByPriority

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

func (ByPriority) DeepCopyInto

func (in ByPriority) DeepCopyInto(out *ByPriority)

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

func (ByPriority) Len

func (a ByPriority) Len() int

func (ByPriority) Less

func (a ByPriority) Less(i, j int) bool

func (ByPriority) Swap

func (a ByPriority) Swap(i, j int)

type ConfigurationModeType added in v1.3.0

type ConfigurationModeType string
const (
	DaemonConfigurationMode  ConfigurationModeType = "daemon"
	SystemdConfigurationMode ConfigurationModeType = "systemd"
)

type Interface

type Interface struct {
	PciAddress        string    `json:"pciAddress"`
	NumVfs            int       `json:"numVfs,omitempty"`
	Mtu               int       `json:"mtu,omitempty"`
	Name              string    `json:"name,omitempty"`
	LinkType          string    `json:"linkType,omitempty"`
	EswitchMode       string    `json:"eSwitchMode,omitempty"`
	VfGroups          []VfGroup `json:"vfGroups,omitempty"`
	ExternallyManaged bool      `json:"externallyManaged,omitempty"`
}

func FindInterface added in v1.3.0

func FindInterface(interfaces Interfaces, name string) (iface Interface, err error)

func (*Interface) DeepCopy

func (in *Interface) DeepCopy() *Interface

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

func (*Interface) DeepCopyInto

func (in *Interface) DeepCopyInto(out *Interface)

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

type InterfaceExt

type InterfaceExt struct {
	Name              string            `json:"name,omitempty"`
	Mac               string            `json:"mac,omitempty"`
	Driver            string            `json:"driver,omitempty"`
	PciAddress        string            `json:"pciAddress"`
	Vendor            string            `json:"vendor,omitempty"`
	DeviceID          string            `json:"deviceID,omitempty"`
	NetFilter         string            `json:"netFilter,omitempty"`
	Mtu               int               `json:"mtu,omitempty"`
	NumVfs            int               `json:"numVfs,omitempty"`
	LinkSpeed         string            `json:"linkSpeed,omitempty"`
	LinkType          string            `json:"linkType,omitempty"`
	LinkAdminState    string            `json:"linkAdminState,omitempty"`
	EswitchMode       string            `json:"eSwitchMode,omitempty"`
	ExternallyManaged bool              `json:"externallyManaged,omitempty"`
	TotalVfs          int               `json:"totalvfs,omitempty"`
	VFs               []VirtualFunction `json:"Vfs,omitempty"`
}

func (*InterfaceExt) DeepCopy

func (in *InterfaceExt) DeepCopy() *InterfaceExt

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

func (*InterfaceExt) DeepCopyInto

func (in *InterfaceExt) DeepCopyInto(out *InterfaceExt)

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

type InterfaceExts

type InterfaceExts []InterfaceExt

func (InterfaceExts) DeepCopy

func (in InterfaceExts) DeepCopy() InterfaceExts

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

func (InterfaceExts) DeepCopyInto

func (in InterfaceExts) DeepCopyInto(out *InterfaceExts)

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

type Interfaces

type Interfaces []Interface

func (Interfaces) DeepCopy

func (in Interfaces) DeepCopy() Interfaces

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

func (Interfaces) DeepCopyInto

func (in Interfaces) DeepCopyInto(out *Interfaces)

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

type NetFilterType

type NetFilterType int

NetFilterType Represents the NetFilter tags to be used

const (
	// OpenstackNetworkID network UUID
	OpenstackNetworkID NetFilterType = iota

	SupportedNicIDConfigmap = "supported-nic-ids"
)

func (NetFilterType) String

func (e NetFilterType) String() string

type OVSBridgeConfig added in v1.3.0

type OVSBridgeConfig struct {
	// configure datapath_type field in the Bridge table in OVSDB
	DatapathType string `json:"datapathType,omitempty"`
	// IDs to inject to external_ids field in the Bridge table in OVSDB
	ExternalIDs map[string]string `json:"externalIDs,omitempty"`
	// additional options to inject to other_config field in the bridge table in OVSDB
	OtherConfig map[string]string `json:"otherConfig,omitempty"`
}

OVSBridgeConfig contains some options from the Bridge table in OVSDB

func (*OVSBridgeConfig) DeepCopy added in v1.3.0

func (in *OVSBridgeConfig) DeepCopy() *OVSBridgeConfig

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

func (*OVSBridgeConfig) DeepCopyInto added in v1.3.0

func (in *OVSBridgeConfig) DeepCopyInto(out *OVSBridgeConfig)

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

type OVSConfig added in v1.3.0

type OVSConfig struct {
	// contains bridge level settings
	Bridge OVSBridgeConfig `json:"bridge,omitempty"`
	// contains settings for uplink (PF)
	Uplink OVSUplinkConfig `json:"uplink,omitempty"`
}

OVSConfig optional configuration for OVS bridge and uplink Interface

func (*OVSConfig) DeepCopy added in v1.3.0

func (in *OVSConfig) DeepCopy() *OVSConfig

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

func (*OVSConfig) DeepCopyInto added in v1.3.0

func (in *OVSConfig) DeepCopyInto(out *OVSConfig)

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

type OVSConfigExt added in v1.3.0

type OVSConfigExt struct {
	// name of the bridge
	Name string `json:"name"`
	// bridge-level configuration for the bridge
	Bridge OVSBridgeConfig `json:"bridge,omitempty"`
	// uplink-level bridge configuration for each uplink(PF).
	// currently must contain only one element
	Uplinks []OVSUplinkConfigExt `json:"uplinks,omitempty"`
}

OVSConfigExt contains configuration for the concrete OVS bridge

func (*OVSConfigExt) DeepCopy added in v1.3.0

func (in *OVSConfigExt) DeepCopy() *OVSConfigExt

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

func (*OVSConfigExt) DeepCopyInto added in v1.3.0

func (in *OVSConfigExt) DeepCopyInto(out *OVSConfigExt)

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

type OVSInterfaceConfig added in v1.3.0

type OVSInterfaceConfig struct {
	// type field in the Interface table in OVSDB
	Type string `json:"type,omitempty"`
	// options field in the Interface table in OVSDB
	Options map[string]string `json:"options,omitempty"`
	// external_ids field in the Interface table in OVSDB
	ExternalIDs map[string]string `json:"externalIDs,omitempty"`
	// other_config field in the Interface table in OVSDB
	OtherConfig map[string]string `json:"otherConfig,omitempty"`
}

OVSInterfaceConfig contains some options from the Interface table of the OVSDB for PF

func (*OVSInterfaceConfig) DeepCopy added in v1.3.0

func (in *OVSInterfaceConfig) DeepCopy() *OVSInterfaceConfig

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

func (*OVSInterfaceConfig) DeepCopyInto added in v1.3.0

func (in *OVSInterfaceConfig) DeepCopyInto(out *OVSInterfaceConfig)

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

type OVSNetwork added in v1.3.0

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

	Spec   OVSNetworkSpec   `json:"spec,omitempty"`
	Status OVSNetworkStatus `json:"status,omitempty"`
}

OVSNetwork is the Schema for the ovsnetworks API

func (*OVSNetwork) DeepCopy added in v1.3.0

func (in *OVSNetwork) DeepCopy() *OVSNetwork

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

func (*OVSNetwork) DeepCopyInto added in v1.3.0

func (in *OVSNetwork) DeepCopyInto(out *OVSNetwork)

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

func (*OVSNetwork) DeepCopyObject added in v1.3.0

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

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

func (*OVSNetwork) NetworkNamespace added in v1.3.0

func (cr *OVSNetwork) NetworkNamespace() string

NetworkNamespace returns target network namespace for the network

func (*OVSNetwork) RenderNetAttDef added in v1.3.0

func (cr *OVSNetwork) RenderNetAttDef() (*uns.Unstructured, error)

RenderNetAttDef renders a net-att-def for sriov CNI

type OVSNetworkList added in v1.3.0

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

OVSNetworkList contains a list of OVSNetwork

func (*OVSNetworkList) DeepCopy added in v1.3.0

func (in *OVSNetworkList) DeepCopy() *OVSNetworkList

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

func (*OVSNetworkList) DeepCopyInto added in v1.3.0

func (in *OVSNetworkList) DeepCopyInto(out *OVSNetworkList)

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

func (*OVSNetworkList) DeepCopyObject added in v1.3.0

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

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

type OVSNetworkSpec added in v1.3.0

type OVSNetworkSpec struct {
	// Namespace of the NetworkAttachmentDefinition custom resource
	NetworkNamespace string `json:"networkNamespace,omitempty"`
	// OVS Network device plugin endpoint resource name
	ResourceName string `json:"resourceName"`
	// Capabilities to be configured for this network.
	// Capabilities supported: (mac|ips), e.g. '{"mac": true}'
	Capabilities string `json:"capabilities,omitempty"`
	// IPAM configuration to be used for this network.
	IPAM string `json:"ipam,omitempty"`
	// MetaPluginsConfig configuration to be used in order to chain metaplugins
	MetaPluginsConfig string `json:"metaPlugins,omitempty"`
	// name of the OVS bridge, if not set OVS will automatically select bridge
	// based on VF PCI address
	Bridge string `json:"bridge,omitempty"`
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=4095
	// Vlan to assign for the OVS port
	Vlan uint `json:"vlan,omitempty"`
	// Mtu for the OVS port
	MTU uint `json:"mtu,omitempty"`
	// Trunk configuration for the OVS port
	Trunk []*TrunkConfig `json:"trunk,omitempty"`
	// The type of interface on ovs.
	InterfaceType string `json:"interfaceType,omitempty"`
}

OVSNetworkSpec defines the desired state of OVSNetwork

func (*OVSNetworkSpec) DeepCopy added in v1.3.0

func (in *OVSNetworkSpec) DeepCopy() *OVSNetworkSpec

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

func (*OVSNetworkSpec) DeepCopyInto added in v1.3.0

func (in *OVSNetworkSpec) DeepCopyInto(out *OVSNetworkSpec)

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

type OVSNetworkStatus added in v1.3.0

type OVSNetworkStatus struct {
}

OVSNetworkStatus defines the observed state of OVSNetwork

func (*OVSNetworkStatus) DeepCopy added in v1.3.0

func (in *OVSNetworkStatus) DeepCopy() *OVSNetworkStatus

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

func (*OVSNetworkStatus) DeepCopyInto added in v1.3.0

func (in *OVSNetworkStatus) DeepCopyInto(out *OVSNetworkStatus)

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

type OVSUplinkConfig added in v1.3.0

type OVSUplinkConfig struct {
	// contains settings for PF interface in the OVS bridge
	Interface OVSInterfaceConfig `json:"interface,omitempty"`
}

OVSUplinkConfig contains PF interface configuration for the bridge

func (*OVSUplinkConfig) DeepCopy added in v1.3.0

func (in *OVSUplinkConfig) DeepCopy() *OVSUplinkConfig

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

func (*OVSUplinkConfig) DeepCopyInto added in v1.3.0

func (in *OVSUplinkConfig) DeepCopyInto(out *OVSUplinkConfig)

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

type OVSUplinkConfigExt added in v1.3.0

type OVSUplinkConfigExt struct {
	// pci address of the PF
	PciAddress string `json:"pciAddress"`
	// name of the PF interface
	Name string `json:"name,omitempty"`
	// configuration from the Interface OVS table for the PF
	Interface OVSInterfaceConfig `json:"interface,omitempty"`
}

OVSUplinkConfigExt contains configuration for the concrete OVS uplink(PF)

func (*OVSUplinkConfigExt) DeepCopy added in v1.3.0

func (in *OVSUplinkConfigExt) DeepCopy() *OVSUplinkConfigExt

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

func (*OVSUplinkConfigExt) DeepCopyInto added in v1.3.0

func (in *OVSUplinkConfigExt) DeepCopyInto(out *OVSUplinkConfigExt)

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

type OvsHardwareOffloadConfig added in v1.1.0

type OvsHardwareOffloadConfig struct {
	// Name is mandatory and must be unique.
	// On Kubernetes:
	// Name is the name of OvsHardwareOffloadConfig
	// On OpenShift:
	// Name is the name of MachineConfigPool to be enabled with OVS hardware offload
	Name string `json:"name,omitempty"`
}

func (*OvsHardwareOffloadConfig) DeepCopy added in v1.1.0

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

func (*OvsHardwareOffloadConfig) DeepCopyInto added in v1.1.0

func (in *OvsHardwareOffloadConfig) DeepCopyInto(out *OvsHardwareOffloadConfig)

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

type PluginNameSlice added in v1.3.0

type PluginNameSlice []PluginNameValue

PluginNameSlice defines a slice of PluginNameValue

func (PluginNameSlice) DeepCopy added in v1.3.0

func (in PluginNameSlice) DeepCopy() PluginNameSlice

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

func (PluginNameSlice) DeepCopyInto added in v1.3.0

func (in PluginNameSlice) DeepCopyInto(out *PluginNameSlice)

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

func (PluginNameSlice) ToStringSlice added in v1.3.0

func (pns PluginNameSlice) ToStringSlice() []string

ToStringSlice converts PluginNameSlice to string slice

type PluginNameValue added in v1.3.0

type PluginNameValue string

PluginNameValue defines the plugin name +kubebuilder:validation:Enum=mellanox

type SriovIBNetwork

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

	Spec   SriovIBNetworkSpec   `json:"spec,omitempty"`
	Status SriovIBNetworkStatus `json:"status,omitempty"`
}

SriovIBNetwork is the Schema for the sriovibnetworks API

func (*SriovIBNetwork) DeepCopy

func (in *SriovIBNetwork) DeepCopy() *SriovIBNetwork

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

func (*SriovIBNetwork) DeepCopyInto

func (in *SriovIBNetwork) DeepCopyInto(out *SriovIBNetwork)

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

func (*SriovIBNetwork) DeepCopyObject

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

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

func (*SriovIBNetwork) NetworkNamespace added in v1.3.0

func (cr *SriovIBNetwork) NetworkNamespace() string

NetworkNamespace returns target network namespace for the network

func (*SriovIBNetwork) RenderNetAttDef

func (cr *SriovIBNetwork) RenderNetAttDef() (*uns.Unstructured, error)

RenderNetAttDef renders a net-att-def for ib-sriov CNI

type SriovIBNetworkList

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

SriovIBNetworkList contains a list of SriovIBNetwork

func (*SriovIBNetworkList) DeepCopy

func (in *SriovIBNetworkList) DeepCopy() *SriovIBNetworkList

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

func (*SriovIBNetworkList) DeepCopyInto

func (in *SriovIBNetworkList) DeepCopyInto(out *SriovIBNetworkList)

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

func (*SriovIBNetworkList) DeepCopyObject

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

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

type SriovIBNetworkSpec

type SriovIBNetworkSpec struct {

	// Namespace of the NetworkAttachmentDefinition custom resource
	NetworkNamespace string `json:"networkNamespace,omitempty"`
	// SRIOV Network device plugin endpoint resource name
	ResourceName string `json:"resourceName"`
	//Capabilities to be configured for this network.
	//Capabilities supported: (infinibandGUID), e.g. '{"infinibandGUID": true}'
	Capabilities string `json:"capabilities,omitempty"`
	//IPAM configuration to be used for this network.
	IPAM string `json:"ipam,omitempty"`
	// VF link state (enable|disable|auto)
	// +kubebuilder:validation:Enum={"auto","enable","disable"}
	LinkState string `json:"linkState,omitempty"`
	// MetaPluginsConfig configuration to be used in order to chain metaplugins to the sriov interface returned
	// by the operator.
	MetaPluginsConfig string `json:"metaPlugins,omitempty"`
}

SriovIBNetworkSpec defines the desired state of SriovIBNetwork

func (*SriovIBNetworkSpec) DeepCopy

func (in *SriovIBNetworkSpec) DeepCopy() *SriovIBNetworkSpec

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

func (*SriovIBNetworkSpec) DeepCopyInto

func (in *SriovIBNetworkSpec) DeepCopyInto(out *SriovIBNetworkSpec)

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

type SriovIBNetworkStatus

type SriovIBNetworkStatus struct {
}

SriovIBNetworkStatus defines the observed state of SriovIBNetwork

func (*SriovIBNetworkStatus) DeepCopy

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

func (*SriovIBNetworkStatus) DeepCopyInto

func (in *SriovIBNetworkStatus) DeepCopyInto(out *SriovIBNetworkStatus)

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

type SriovNetwork

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

	Spec   SriovNetworkSpec   `json:"spec,omitempty"`
	Status SriovNetworkStatus `json:"status,omitempty"`
}

SriovNetwork is the Schema for the sriovnetworks API

func (*SriovNetwork) DeepCopy

func (in *SriovNetwork) DeepCopy() *SriovNetwork

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

func (*SriovNetwork) DeepCopyInto

func (in *SriovNetwork) DeepCopyInto(out *SriovNetwork)

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

func (*SriovNetwork) DeepCopyObject

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

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

func (*SriovNetwork) NetworkNamespace added in v1.3.0

func (cr *SriovNetwork) NetworkNamespace() string

NetworkNamespace returns target network namespace for the network

func (*SriovNetwork) RenderNetAttDef

func (cr *SriovNetwork) RenderNetAttDef() (*uns.Unstructured, error)

RenderNetAttDef renders a net-att-def for sriov CNI

type SriovNetworkList

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

SriovNetworkList contains a list of SriovNetwork

func (*SriovNetworkList) DeepCopy

func (in *SriovNetworkList) DeepCopy() *SriovNetworkList

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

func (*SriovNetworkList) DeepCopyInto

func (in *SriovNetworkList) DeepCopyInto(out *SriovNetworkList)

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

func (*SriovNetworkList) DeepCopyObject

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

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

type SriovNetworkNicSelector

type SriovNetworkNicSelector struct {
	// The vendor hex code of SR-IoV device. Allowed value "8086", "15b3".
	Vendor string `json:"vendor,omitempty"`
	// The device hex code of SR-IoV device. Allowed value "0d58", "1572", "158b", "1013", "1015", "1017", "101b".
	DeviceID string `json:"deviceID,omitempty"`
	// PCI address of SR-IoV PF.
	RootDevices []string `json:"rootDevices,omitempty"`
	// Name of SR-IoV PF.
	PfNames []string `json:"pfNames,omitempty"`
	// Infrastructure Networking selection filter. Allowed value "openstack/NetworkID:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	NetFilter string `json:"netFilter,omitempty"`
}

func (*SriovNetworkNicSelector) DeepCopy

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

func (*SriovNetworkNicSelector) DeepCopyInto

func (in *SriovNetworkNicSelector) DeepCopyInto(out *SriovNetworkNicSelector)

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

func (*SriovNetworkNicSelector) IsEmpty added in v1.4.0

func (selector *SriovNetworkNicSelector) IsEmpty() bool

IsEmpty returns true if nicSelector is empty

func (*SriovNetworkNicSelector) Selected

func (selector *SriovNetworkNicSelector) Selected(iface *InterfaceExt) bool

type SriovNetworkNodePolicy

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

	Spec   SriovNetworkNodePolicySpec   `json:"spec,omitempty"`
	Status SriovNetworkNodePolicyStatus `json:"status,omitempty"`
}

SriovNetworkNodePolicy is the Schema for the sriovnetworknodepolicies API

func (*SriovNetworkNodePolicy) Apply

func (p *SriovNetworkNodePolicy) Apply(state *SriovNetworkNodeState, equalPriority bool) error

Apply policy to SriovNetworkNodeState CR

func (*SriovNetworkNodePolicy) ApplyBridgeConfig added in v1.4.0

func (p *SriovNetworkNodePolicy) ApplyBridgeConfig(state *SriovNetworkNodeState) error

ApplyBridgeConfig applies bridge configuration from the policy to the provided state

func (*SriovNetworkNodePolicy) DeepCopy

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

func (*SriovNetworkNodePolicy) DeepCopyInto

func (in *SriovNetworkNodePolicy) DeepCopyInto(out *SriovNetworkNodePolicy)

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

func (*SriovNetworkNodePolicy) DeepCopyObject

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

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

func (*SriovNetworkNodePolicy) Selected

func (p *SriovNetworkNodePolicy) Selected(node *corev1.Node) bool

Match check if node is selected by NodeSelector

type SriovNetworkNodePolicyList

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

SriovNetworkNodePolicyList contains a list of SriovNetworkNodePolicy

func (*SriovNetworkNodePolicyList) DeepCopy

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

func (*SriovNetworkNodePolicyList) DeepCopyInto

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

func (*SriovNetworkNodePolicyList) DeepCopyObject

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

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

type SriovNetworkNodePolicySpec

type SriovNetworkNodePolicySpec struct {
	// SRIOV Network device plugin endpoint resource name
	ResourceName string `json:"resourceName"`
	// NodeSelector selects the nodes to be configured
	NodeSelector map[string]string `json:"nodeSelector"`
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=99
	// Priority of the policy, higher priority policies can override lower ones.
	Priority int `json:"priority,omitempty"`
	// +kubebuilder:validation:Minimum=1
	// MTU of VF
	Mtu int `json:"mtu,omitempty"`
	// +kubebuilder:validation:Minimum=0
	// Number of VFs for each PF
	NumVfs int `json:"numVfs"`
	// NicSelector selects the NICs to be configured
	NicSelector SriovNetworkNicSelector `json:"nicSelector"`
	// +kubebuilder:validation:Enum=netdevice;vfio-pci
	// +kubebuilder:default=netdevice
	// The driver type for configured VFs. Allowed value "netdevice", "vfio-pci". Defaults to netdevice.
	DeviceType string `json:"deviceType,omitempty"`
	// RDMA mode. Defaults to false.
	IsRdma bool `json:"isRdma,omitempty"`
	// mount vhost-net device. Defaults to false.
	NeedVhostNet bool `json:"needVhostNet,omitempty"`
	// +kubebuilder:validation:Enum=eth;ETH;ib;IB
	// NIC Link Type. Allowed value "eth", "ETH", "ib", and "IB".
	LinkType string `json:"linkType,omitempty"`
	// +kubebuilder:validation:Enum=legacy;switchdev
	// NIC Device Mode. Allowed value "legacy","switchdev".
	EswitchMode string `json:"eSwitchMode,omitempty"`
	// +kubebuilder:validation:Enum=virtio;vhost
	// VDPA device type. Allowed value "virtio", "vhost"
	VdpaType string `json:"vdpaType,omitempty"`
	// Exclude device's NUMA node when advertising this resource by SRIOV network device plugin. Default to false.
	ExcludeTopology bool `json:"excludeTopology,omitempty"`
	// don't create the virtual function only allocated them to the device plugin. Defaults to false.
	ExternallyManaged bool `json:"externallyManaged,omitempty"`
	// contains bridge configuration for matching PFs,
	// valid only for eSwitchMode==switchdev
	Bridge Bridge `json:"bridge,omitempty"`
}

SriovNetworkNodePolicySpec defines the desired state of SriovNetworkNodePolicy

func (*SriovNetworkNodePolicySpec) DeepCopy

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

func (*SriovNetworkNodePolicySpec) DeepCopyInto

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

type SriovNetworkNodePolicyStatus

type SriovNetworkNodePolicyStatus struct {
}

SriovNetworkNodePolicyStatus defines the observed state of SriovNetworkNodePolicy

func (*SriovNetworkNodePolicyStatus) DeepCopy

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

func (*SriovNetworkNodePolicyStatus) DeepCopyInto

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

type SriovNetworkNodeState

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

	Spec   SriovNetworkNodeStateSpec   `json:"spec,omitempty"`
	Status SriovNetworkNodeStateStatus `json:"status,omitempty"`
}

SriovNetworkNodeState is the Schema for the sriovnetworknodestates API

var InitialState SriovNetworkNodeState

func (*SriovNetworkNodeState) DeepCopy

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

func (*SriovNetworkNodeState) DeepCopyInto

func (in *SriovNetworkNodeState) DeepCopyInto(out *SriovNetworkNodeState)

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

func (*SriovNetworkNodeState) DeepCopyObject

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

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

func (*SriovNetworkNodeState) GetDriverByPciAddress

func (s *SriovNetworkNodeState) GetDriverByPciAddress(addr string) string

func (*SriovNetworkNodeState) GetInterfaceStateByPciAddress

func (s *SriovNetworkNodeState) GetInterfaceStateByPciAddress(addr string) *InterfaceExt

type SriovNetworkNodeStateList

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

SriovNetworkNodeStateList contains a list of SriovNetworkNodeState

func (*SriovNetworkNodeStateList) DeepCopy

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

func (*SriovNetworkNodeStateList) DeepCopyInto

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

func (*SriovNetworkNodeStateList) DeepCopyObject

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

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

type SriovNetworkNodeStateSpec

type SriovNetworkNodeStateSpec struct {
	Interfaces Interfaces `json:"interfaces,omitempty"`
	Bridges    Bridges    `json:"bridges,omitempty"`
}

SriovNetworkNodeStateSpec defines the desired state of SriovNetworkNodeState

func (*SriovNetworkNodeStateSpec) DeepCopy

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

func (*SriovNetworkNodeStateSpec) DeepCopyInto

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

type SriovNetworkNodeStateStatus

type SriovNetworkNodeStateStatus struct {
	Interfaces    InterfaceExts `json:"interfaces,omitempty"`
	Bridges       Bridges       `json:"bridges,omitempty"`
	SyncStatus    string        `json:"syncStatus,omitempty"`
	LastSyncError string        `json:"lastSyncError,omitempty"`
}

SriovNetworkNodeStateStatus defines the observed state of SriovNetworkNodeState

func (*SriovNetworkNodeStateStatus) DeepCopy

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

func (*SriovNetworkNodeStateStatus) DeepCopyInto

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

type SriovNetworkPoolConfig added in v1.1.0

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

	Spec   SriovNetworkPoolConfigSpec   `json:"spec,omitempty"`
	Status SriovNetworkPoolConfigStatus `json:"status,omitempty"`
}

SriovNetworkPoolConfig is the Schema for the sriovnetworkpoolconfigs API

func (*SriovNetworkPoolConfig) DeepCopy added in v1.1.0

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

func (*SriovNetworkPoolConfig) DeepCopyInto added in v1.1.0

func (in *SriovNetworkPoolConfig) DeepCopyInto(out *SriovNetworkPoolConfig)

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

func (*SriovNetworkPoolConfig) DeepCopyObject added in v1.1.0

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

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

func (*SriovNetworkPoolConfig) MaxUnavailable added in v1.3.0

func (s *SriovNetworkPoolConfig) MaxUnavailable(numOfNodes int) (int, error)

MaxUnavailable calculate the max number of unavailable nodes to represent the number of nodes we can drain in parallel

type SriovNetworkPoolConfigList added in v1.1.0

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

SriovNetworkPoolConfigList contains a list of SriovNetworkPoolConfig

func (*SriovNetworkPoolConfigList) DeepCopy added in v1.1.0

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

func (*SriovNetworkPoolConfigList) DeepCopyInto added in v1.1.0

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

func (*SriovNetworkPoolConfigList) DeepCopyObject added in v1.1.0

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

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

type SriovNetworkPoolConfigSpec added in v1.1.0

type SriovNetworkPoolConfigSpec struct {
	// OvsHardwareOffloadConfig describes the OVS HWOL configuration for selected Nodes
	OvsHardwareOffloadConfig OvsHardwareOffloadConfig `json:"ovsHardwareOffloadConfig,omitempty"`

	// nodeSelector specifies a label selector for Nodes
	NodeSelector *metav1.LabelSelector `json:"nodeSelector,omitempty"`

	// maxUnavailable defines either an integer number or percentage
	// of nodes in the pool that can go Unavailable during an update.
	//
	// A value larger than 1 will mean multiple nodes going unavailable during
	// the update, which may affect your workload stress on the remaining nodes.
	// Drain will respect Pod Disruption Budgets (PDBs) such as etcd quorum guards,
	// even if maxUnavailable is greater than one.
	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
}

SriovNetworkPoolConfigSpec defines the desired state of SriovNetworkPoolConfig

func (*SriovNetworkPoolConfigSpec) DeepCopy added in v1.1.0

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

func (*SriovNetworkPoolConfigSpec) DeepCopyInto added in v1.1.0

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

type SriovNetworkPoolConfigStatus added in v1.1.0

type SriovNetworkPoolConfigStatus struct {
}

SriovNetworkPoolConfigStatus defines the observed state of SriovNetworkPoolConfig

func (*SriovNetworkPoolConfigStatus) DeepCopy added in v1.1.0

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

func (*SriovNetworkPoolConfigStatus) DeepCopyInto added in v1.1.0

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

type SriovNetworkSpec

type SriovNetworkSpec struct {
	// Namespace of the NetworkAttachmentDefinition custom resource
	NetworkNamespace string `json:"networkNamespace,omitempty"`
	// SRIOV Network device plugin endpoint resource name
	ResourceName string `json:"resourceName"`
	//Capabilities to be configured for this network.
	//Capabilities supported: (mac|ips), e.g. '{"mac": true}'
	Capabilities string `json:"capabilities,omitempty"`
	//IPAM configuration to be used for this network.
	IPAM string `json:"ipam,omitempty"`
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=4096
	// VLAN ID to assign for the VF. Defaults to 0.
	Vlan int `json:"vlan,omitempty"`
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=7
	// VLAN QoS ID to assign for the VF. Defaults to 0.
	VlanQoS int `json:"vlanQoS,omitempty"`
	// +kubebuilder:validation:Enum={"802.1q","802.1Q", "802.1ad", "802.1AD"}
	// VLAN proto to assign for the VF. Defaults to 802.1q.
	VlanProto string `json:"vlanProto,omitempty"`
	// VF spoof check, (on|off)
	// +kubebuilder:validation:Enum={"on","off"}
	SpoofChk string `json:"spoofChk,omitempty"`
	// VF trust mode (on|off)
	// +kubebuilder:validation:Enum={"on","off"}
	Trust string `json:"trust,omitempty"`
	// VF link state (enable|disable|auto)
	// +kubebuilder:validation:Enum={"auto","enable","disable"}
	LinkState string `json:"linkState,omitempty"`
	// +kubebuilder:validation:Minimum=0
	// Minimum tx rate, in Mbps, for the VF. Defaults to 0 (no rate limiting). min_tx_rate should be <= max_tx_rate.
	MinTxRate *int `json:"minTxRate,omitempty"`
	// +kubebuilder:validation:Minimum=0
	// Maximum tx rate, in Mbps, for the VF. Defaults to 0 (no rate limiting)
	MaxTxRate *int `json:"maxTxRate,omitempty"`
	// MetaPluginsConfig configuration to be used in order to chain metaplugins to the sriov interface returned
	// by the operator.
	MetaPluginsConfig string `json:"metaPlugins,omitempty"`
	// LogLevel sets the log level of the SRIOV CNI plugin - either of panic, error, warning, info, debug. Defaults
	// to info if left blank.
	// +kubebuilder:validation:Enum={"panic", "error","warning","info","debug",""}
	// +kubebuilder:default:= "info"
	LogLevel string `json:"logLevel,omitempty"`
	// LogFile sets the log file of the SRIOV CNI plugin logs. If unset (default), this will log to stderr and thus
	// to multus and container runtime logs.
	LogFile string `json:"logFile,omitempty"`
}

SriovNetworkSpec defines the desired state of SriovNetwork

func (*SriovNetworkSpec) DeepCopy

func (in *SriovNetworkSpec) DeepCopy() *SriovNetworkSpec

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

func (*SriovNetworkSpec) DeepCopyInto

func (in *SriovNetworkSpec) DeepCopyInto(out *SriovNetworkSpec)

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

type SriovNetworkStatus

type SriovNetworkStatus struct {
}

SriovNetworkStatus defines the observed state of SriovNetwork

func (*SriovNetworkStatus) DeepCopy

func (in *SriovNetworkStatus) DeepCopy() *SriovNetworkStatus

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

func (*SriovNetworkStatus) DeepCopyInto

func (in *SriovNetworkStatus) DeepCopyInto(out *SriovNetworkStatus)

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

type SriovOperatorConfig

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

	Spec   SriovOperatorConfigSpec   `json:"spec,omitempty"`
	Status SriovOperatorConfigStatus `json:"status,omitempty"`
}

SriovOperatorConfig is the Schema for the sriovoperatorconfigs API

func (*SriovOperatorConfig) DeepCopy

func (in *SriovOperatorConfig) DeepCopy() *SriovOperatorConfig

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

func (*SriovOperatorConfig) DeepCopyInto

func (in *SriovOperatorConfig) DeepCopyInto(out *SriovOperatorConfig)

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

func (*SriovOperatorConfig) DeepCopyObject

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

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

type SriovOperatorConfigList

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

SriovOperatorConfigList contains a list of SriovOperatorConfig

func (*SriovOperatorConfigList) DeepCopy

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

func (*SriovOperatorConfigList) DeepCopyInto

func (in *SriovOperatorConfigList) DeepCopyInto(out *SriovOperatorConfigList)

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

func (*SriovOperatorConfigList) DeepCopyObject

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

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

type SriovOperatorConfigSpec

type SriovOperatorConfigSpec struct {
	// NodeSelector selects the nodes to be configured
	ConfigDaemonNodeSelector map[string]string `json:"configDaemonNodeSelector,omitempty"`
	// Flag to control whether the network resource injector webhook shall be deployed
	EnableInjector bool `json:"enableInjector,omitempty"`
	// Flag to control whether the operator admission controller webhook shall be deployed
	EnableOperatorWebhook bool `json:"enableOperatorWebhook,omitempty"`
	// Flag to control the log verbose level of the operator. Set to '0' to show only the basic logs. And set to '2' to show all the available logs.
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=2
	LogLevel int `json:"logLevel,omitempty"`
	// Flag to disable nodes drain during debugging
	DisableDrain bool `json:"disableDrain,omitempty"`
	// Flag to enable OVS hardware offload. Set to 'true' to provision switchdev-configuration.service and enable OpenvSwitch hw-offload on nodes.
	EnableOvsOffload bool `json:"enableOvsOffload,omitempty"`
	// Flag to enable the sriov-network-config-daemon to use a systemd service to configure SR-IOV devices on boot
	// Default mode: daemon
	// +kubebuilder:validation:Enum=daemon;systemd
	ConfigurationMode ConfigurationModeType `json:"configurationMode,omitempty"`
	// Flag to enable Container Device Interface mode for SR-IOV Network Device Plugin
	UseCDI bool `json:"useCDI,omitempty"`
	// DisablePlugins is a list of sriov-network-config-daemon plugins to disable
	DisablePlugins PluginNameSlice `json:"disablePlugins,omitempty"`
	// FeatureGates to enable experimental features
	FeatureGates map[string]bool `json:"featureGates,omitempty"`
}

SriovOperatorConfigSpec defines the desired state of SriovOperatorConfig

func (*SriovOperatorConfigSpec) DeepCopy

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

func (*SriovOperatorConfigSpec) DeepCopyInto

func (in *SriovOperatorConfigSpec) DeepCopyInto(out *SriovOperatorConfigSpec)

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

type SriovOperatorConfigStatus

type SriovOperatorConfigStatus struct {
	// Show the runtime status of the network resource injector webhook
	Injector string `json:"injector,omitempty"`
	// Show the runtime status of the operator admission controller webhook
	OperatorWebhook string `json:"operatorWebhook,omitempty"`
}

SriovOperatorConfigStatus defines the observed state of SriovOperatorConfig

func (*SriovOperatorConfigStatus) DeepCopy

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

func (*SriovOperatorConfigStatus) DeepCopyInto

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

type TrunkConfig added in v1.3.0

type TrunkConfig struct {
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=4095
	MinID *uint `json:"minID,omitempty"`
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=4095
	MaxID *uint `json:"maxID,omitempty"`
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=4095
	ID *uint `json:"id,omitempty"`
}

TrunkConfig contains configuration for bridge trunk

func (*TrunkConfig) DeepCopy added in v1.3.0

func (in *TrunkConfig) DeepCopy() *TrunkConfig

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

func (*TrunkConfig) DeepCopyInto added in v1.3.0

func (in *TrunkConfig) DeepCopyInto(out *TrunkConfig)

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

type VfGroup

type VfGroup struct {
	ResourceName string `json:"resourceName,omitempty"`
	DeviceType   string `json:"deviceType,omitempty"`
	VfRange      string `json:"vfRange,omitempty"`
	PolicyName   string `json:"policyName,omitempty"`
	Mtu          int    `json:"mtu,omitempty"`
	IsRdma       bool   `json:"isRdma,omitempty"`
	VdpaType     string `json:"vdpaType,omitempty"`
}

func (*VfGroup) DeepCopy

func (in *VfGroup) DeepCopy() *VfGroup

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

func (*VfGroup) DeepCopyInto

func (in *VfGroup) DeepCopyInto(out *VfGroup)

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

type VirtualFunction

type VirtualFunction struct {
	Name            string `json:"name,omitempty"`
	Mac             string `json:"mac,omitempty"`
	Assigned        string `json:"assigned,omitempty"`
	Driver          string `json:"driver,omitempty"`
	PciAddress      string `json:"pciAddress"`
	Vendor          string `json:"vendor,omitempty"`
	DeviceID        string `json:"deviceID,omitempty"`
	Vlan            int    `json:"Vlan,omitempty"`
	Mtu             int    `json:"mtu,omitempty"`
	VfID            int    `json:"vfID"`
	VdpaType        string `json:"vdpaType,omitempty"`
	RepresentorName string `json:"representorName,omitempty"`
	GUID            string `json:"guid,omitempty"`
}

func (*VirtualFunction) DeepCopy

func (in *VirtualFunction) DeepCopy() *VirtualFunction

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

func (*VirtualFunction) DeepCopyInto

func (in *VirtualFunction) DeepCopyInto(out *VirtualFunction)

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