v1

package
v0.0.0-...-87bc864 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the sriovnetwork v1 API group +k8s:deepcopy-gen=package,register +groupName=sriovnetwork.openshift.io

Package v1 contains API Schema definitions for the sriovnetwork v1 API group +k8s:deepcopy-gen=package,register +groupName=sriovnetwork.openshift.io

Index

Constants

View Source
const (
	MANIFESTS_PATH       = "./bindata/manifests/cni-config"
	LASTNETWORKNAMESPACE = "operator.sriovnetwork.openshift.io/last-network-namespace"
	FINALIZERNAME        = "netattdef.finalizers.sriovnetwork.openshift.io"
)

Variables

View Source
var (
	// 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: SchemeGroupVersion}

	// AddToScheme is a global function that registers this API group & version to a scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var NicIdMap = []string{
	"8086 158b 154c",
	"15b3 1015 1016",
	"15b3 1017 1018",
	"15b3 101b 101c",
	"15b3 1013 1014",
}

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

View Source
var VfIds = []string{}

Functions

func GetSupportedVfIds

func GetSupportedVfIds() []string

func GetVfDeviceId

func GetVfDeviceId(deviceId string) string

func IndexInRange

func IndexInRange(i int, r 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 Kind

func Kind(kind string) schema.GroupKind

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

func ParsePFName

func ParsePFName(name string) (ifName string, rngSt, rngEnd int, err error)

Parse PF name with VF range

func RemoveString

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

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func StringInArray

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

func UniqueAppend

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

Types

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 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"`
	VfGroups   []VfGroup `json:"vfGroups,omitempty"`
}

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"`
	Mtu        int               `json:"mtu,omitempty"`
	NumVfs     int               `json:"numVfs,omitempty"`
	LinkSpeed  string            `json:"linkSpeed,omitempty"`
	LinkType   string            `json:"linkType,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 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 +kubebuilder:subresource:status +kubebuilder:resource:path=sriovibnetworks,scope=Namespaced

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) DeleteNetAttDef

func (cr *SriovIBNetwork) DeleteNetAttDef(c client.Client) error

DeleteNetAttDef deletes the generated net-att-def CR

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"`
}

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 +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=sriovnetworks,scope=Namespaced

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) DeleteNetAttDef

func (cr *SriovNetwork) DeleteNetAttDef(c client.Client) error

DeleteNetAttDef deletes the generated net-att-def CR

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 "158b", "1015", "1017".
	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"`
}

+k8s:openapi-gen=false

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) 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 +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=sriovnetworknodepolicies,scope=Namespaced

func (*SriovNetworkNodePolicy) Apply

func (p *SriovNetworkNodePolicy) Apply(state *SriovNetworkNodeState, merge bool)

Apply policy to SriovNetworkNodeState CR

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
	// 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"`
	// +kubebuilder:validation:Enum=eth;ETH;ib;IB
	// NIC Link Type. Allowed value "eth", "ETH", "ib", and "IB".
	LinkType string `json:"linkType,omitempty"`
}

SriovNetworkNodePolicySpec defines the desired state of SriovNetworkNodePolicy +k8s:openapi-gen=true +kubebuilder:pruning:PreserveUnknownFields

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 +k8s:openapi-gen=true

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"`
}

+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object SriovNetworkNodeState is the Schema for the sriovnetworknodestates API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=sriovnetworknodestates,scope=Namespaced

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 {
	DpConfigVersion string     `json:"dpConfigVersion,omitempty"`
	Interfaces      Interfaces `json:"interfaces,omitempty"`
}

SriovNetworkNodeStateSpec defines the desired state of SriovNetworkNodeState +k8s:openapi-gen=true

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"`
	SyncStatus    string        `json:"syncStatus,omitempty"`
	LastSyncError string        `json:"lastSyncError,omitempty"`
}

SriovNetworkNodeStateStatus defines the observed state of SriovNetworkNodeState +k8s:openapi-gen=true

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 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"`
	// 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"`
}

SriovNetworkSpec defines the desired state of SriovNetwork +k8s:openapi-gen=true

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 +k8s:openapi-gen=true

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 +genclient +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=sriovoperatorconfigs,scope=Namespaced

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"`
}

SriovOperatorConfigSpec defines the desired state of SriovOperatorConfig +k8s:openapi-gen=true

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 +k8s:openapi-gen=true

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 VfGroup

type VfGroup struct {
	ResourceName string `json:"resourceName,omitempty"`
	DeviceType   string `json:"deviceType,omitempty"`
	VfRange      string `json:"vfRange,omitempty"`
	PolicyName   string `json:"policyName,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"`
}

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