API Reference#

Packages#

knl.kubenetlab.net/v1beta1#

Package v1beta1 contains API Schema definitions for the knl v1beta1 API group.

Resource Types#

Connector#

Connector specifies a node name and how it connects to the link

Appears in:

FieldDescriptionDefaultValidation
node stringname of node connects to the link
port stringused by srsim for mda port id, by SRVM for IOM slot id and by SRL for interface id
addrs string arraya list of IP prefix in format xxxx/yy, use by node type pod and vm
routes string arraya list of static routes in format <prefix> via <nexthop>, use by node type pod and vm
mac stringinterface MAC address of the connecting node, used by node type vm

GeneralPod#

GeneralPod specifies a general k8s pod

Appears in:

FieldDescriptionDefaultValidation
image stringpod image
cmd stringpod’s command
privileged booleanprivileged pod if true
pvcSize Quantitysize of pvc mounted on /root
memory Quantityrequested memory in k8s resource unit
cpu Quantityrequested cpu in k8s resource unit

GeneralVM#

GeneralVM specifies a general kubevirt VM

Appears in:

FieldDescriptionDefaultValidation
memory Quantityrequested memory for the VM in k8s resource unit
cpu Quantityrequested cpu for the VM in k8s resource unit
diskSize Quantitythe VM disk size in k8s resource unit
cpuPin booleanpin the CPU if true
hugePage booleanrequest hugepage memory if true
image stringkubevirt CDI supported URL, either HTTP (http://) or registry source (docker://)
init stringintilization method, supports cloud-init or ignition
ports Portlistening port of the VM on the 1st pod interface
user stringusername to login into VM, username and password are feed into vm initialization mechinism like cloud-init
passwd stringpassword to login into VM

KNLConfig#

KNLConfig is the Schema for the configuration of KNL operator

Appears in:

FieldDescriptionDefaultValidation
apiVersion stringknl.kubenetlab.net/v1beta1
kind stringKNLConfig
metadata ObjectMetaRefer to Kubernetes API documentation for fields of metadata.
spec KNLConfigSpecspec defines the desired state of KNLConfig

KNLConfigList#

KNLConfigList contains a list of KNLConfig

FieldDescriptionDefaultValidation
apiVersion stringknl.kubenetlab.net/v1beta1
kind stringKNLConfigList
metadata ListMetaRefer to Kubernetes API documentation for fields of metadata.
items KNLConfig array

KNLConfigSpec#

KNLConfigSpec specifies KNL operator’s configuration

Appears in:

FieldDescriptionDefaultValidation
fileSvr stringSFTPSever address, must have format as addr/hostname:port
vxlanGrp stringmulticast address used by VxLAN tunnel between k8s workers
defaultVxlanDev stringdefault VxLAN device name, used if not specified in vxlanDevMap
vxlanDevMap object (keys:string, values:string)a map between k8s worker name and its interface name used as VxLAN device
storageClass stringname of k8s storageclass used to create PVCs
srCPMLoaderImage stringCPM loader container image, used by vsim, vsri and magc
srIOMLoaderImage stringIOM loader container image, used by vsim and magc
sideCarImage stringKubevirt sidecar hook image, used by vsim, vsri and magc
defaultNode OneOfSystemdefaultNode specifies default values for types of node

Lab#

Lab is the Schema for the labs API

Appears in:

FieldDescriptionDefaultValidation
apiVersion stringknl.kubenetlab.net/v1beta1
kind stringLab
metadata ObjectMetaRefer to Kubernetes API documentation for fields of metadata.
spec LabSpecspec defines the desired state of Lab

LabList#

LabList contains a list of Lab

FieldDescriptionDefaultValidation
apiVersion stringknl.kubenetlab.net/v1beta1
kind stringLabList
metadata ListMetaRefer to Kubernetes API documentation for fields of metadata.
items Lab array

LabSpec#

LabSpec defines the desired state of Lab

Appears in:

FieldDescriptionDefaultValidation
nodes object (keys:string, values:OneOfSystem)nodes lists all nodes in the lab
links object (keys:string, values:Link)

Link defines a layer2 connection between nodes, two or more nodes per link are supported.

Appears in:

FieldDescriptionDefaultValidation
nodes Connector arraya list of nodes connect to the link’s layer2 network

MAGC#

Underlying type: SRVM

MAGC specifies a Nokia MAG-c

Appears in:

FieldDescriptionDefaultValidation
chassis SRChassisspecifies chassis configuration
image stringone of three types of image loading method:
1.docker image url like “exampleregistry/sros:25.10.1”;
2.sub folder name of the SROS/MAGC image when start with “filesvr:”, like “filesvr:25.10.1”
diskSize QuantityDisk size for the CPM, only used when image is a docker image, must >= image size
license stringa k8s secret name contains license with key “license”
uuid stringVM’s firmware UUID
dedicate booleanif true, allocate dedicate cpu and huge page memory;
recommand to set to true in case of vsr and magc

NodeType#

Underlying type: string

Appears in:

FieldDescription
pod
srl
srsim
vsim
vsri
magc
unknown
vm

OneOfSystem#

OneOfSystem specifies one KNL node type, only one field should be specified.

Appears in:

FieldDescriptionDefaultValidation
vsim VSIM
vsri VSRI
magc MAGC
vm GeneralVM
srl SRLinux
pod GeneralPod
srsim SRSim

SRCard#

SRCard is a CPM or IOM card

Appears in:

FieldDescriptionDefaultValidation
type stringCard model
sysinfo stringsysinfo is only used by vsim, mag-c and vsri, not need to specify in most cases;
mdas stringlist of MDAs that are insert directly into card without XIOM; mdas and xioms are mutully exclusive
xioms object (keys:string, values:XIOM)list of XIOMs; key is XIOM slot id, e.g. x1/x2; mdas and xioms are mutully exclusive
memory Quantityrequested memory in k8s resouce unit
cpu Quantityrequested CPU in k8s resource unit
ports Portlist of listening ports for management interface

SRChassis#

SRChassis is used by srsim, vsim, vsri and magc to specify the chassis configuration.

Appears in:

FieldDescriptionDefaultValidation
model stringchassis model
cards object (keys:string, values:SRCard)a dictionary of CPM and IOM cards,
key is slot id, “A”,“B” for CPM, number for IOM
sfm stringSFM model
chassisMac stringChassis Base MAC address, auto assigned if not specified

SRLinux#

SRLinux specifies a Nokia SRLinux chassis;

Appears in:

FieldDescriptionDefaultValidation
image stringSRLinux container image
chassis stringchassis model
license stringa k8s secret contains the license file with “license” as the key
memory Quantityrequested memory in k8s resource unit
cpu Quantityrequested cpu in k8s resource unit

SRSim#

SRSIM creates a Nokia SR-SIM; note: it is important to set tx-checksum-ip-generic off in corresponding bridge interface, otherwise IP traffic toward management interface won’t work in kind, it is docker bridge; in general k8s, it is cni0 bridge in each worker; “ethtool -K tx-checksum-ip-generic off” see SR-SIM installation guide for details

Appears in:

FieldDescriptionDefaultValidation
image stringDocker image
chassis SRChassisspecifies the chassis configuration
license stringname of k8s secret contains license file with “license” as the key

SRVM#

undelying type for VSIM, VSRI, and MAGC

Appears in:

FieldDescriptionDefaultValidation
chassis SRChassisspecifies chassis configuration
image stringone of three types of image loading method:
1.docker image url like “exampleregistry/sros:25.10.1”;
2.sub folder name of the SROS/MAGC image when start with “filesvr:”, like “filesvr:25.10.1”
diskSize QuantityDisk size for the CPM, only used when image is a docker image, must >= image size
license stringa k8s secret name contains license with key “license”
uuid stringVM’s firmware UUID
dedicate booleanif true, allocate dedicate cpu and huge page memory;
recommand to set to true in case of vsr and magc

VSIM#

Underlying type: SRVM

VSIM specifies a Nokia vSIM router

Appears in:

FieldDescriptionDefaultValidation
chassis SRChassisspecifies chassis configuration
image stringone of three types of image loading method:
1.docker image url like “exampleregistry/sros:25.10.1”;
2.sub folder name of the SROS/MAGC image when start with “filesvr:”, like “filesvr:25.10.1”
diskSize QuantityDisk size for the CPM, only used when image is a docker image, must >= image size
license stringa k8s secret name contains license with key “license”
uuid stringVM’s firmware UUID
dedicate booleanif true, allocate dedicate cpu and huge page memory;
recommand to set to true in case of vsr and magc

VSRI#

Underlying type: SRVM

VSRI specifies a Nokia VSR-I router

Appears in:

FieldDescriptionDefaultValidation
chassis SRChassisspecifies chassis configuration
image stringone of three types of image loading method:
1.docker image url like “exampleregistry/sros:25.10.1”;
2.sub folder name of the SROS/MAGC image when start with “filesvr:”, like “filesvr:25.10.1”
diskSize QuantityDisk size for the CPM, only used when image is a docker image, must >= image size
license stringa k8s secret name contains license with key “license”
uuid stringVM’s firmware UUID
dedicate booleanif true, allocate dedicate cpu and huge page memory;
recommand to set to true in case of vsr and magc

XIOM#

SR XIOM

Appears in:

FieldDescriptionDefaultValidation
type stringXIOM model
mdas string arraylist of MDAs insert into the XIOM