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:
| Field | Description | Default | Validation |
|---|---|---|---|
node string | name of node connects to the link | ||
port string | used by srsim for mda port id, by SRVM for IOM slot id and by SRL for interface id | ||
addrs string array | a list of IP prefix in format xxxx/yy, use by node type pod and vm | ||
routes string array | a list of static routes in format <prefix> via <nexthop>, use by node type pod and vm | ||
mac string | interface MAC address of the connecting node, used by node type vm |
GeneralPod#
GeneralPod specifies a general k8s pod
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
image string | pod image | ||
cmd string | pod’s command | ||
privileged boolean | privileged pod if true | ||
pvcSize Quantity | size of pvc mounted on /root | ||
memory Quantity | requested memory in k8s resource unit | ||
cpu Quantity | requested cpu in k8s resource unit |
GeneralVM#
GeneralVM specifies a general kubevirt VM
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
memory Quantity | requested memory for the VM in k8s resource unit | ||
cpu Quantity | requested cpu for the VM in k8s resource unit | ||
diskSize Quantity | the VM disk size in k8s resource unit | ||
cpuPin boolean | pin the CPU if true | ||
hugePage boolean | request hugepage memory if true | ||
image string | kubevirt CDI supported URL, either HTTP (http://) or registry source (docker://) | ||
init string | intilization method, supports cloud-init or ignition | ||
ports Port | listening port of the VM on the 1st pod interface | ||
user string | username to login into VM, username and password are feed into vm initialization mechinism like cloud-init | ||
passwd string | password to login into VM |
KNLConfig#
KNLConfig is the Schema for the configuration of KNL operator
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string | knl.kubenetlab.net/v1beta1 | ||
kind string | KNLConfig | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
spec KNLConfigSpec | spec defines the desired state of KNLConfig |
KNLConfigList#
KNLConfigList contains a list of KNLConfig
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string | knl.kubenetlab.net/v1beta1 | ||
kind string | KNLConfigList | ||
metadata ListMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
items KNLConfig array |
KNLConfigSpec#
KNLConfigSpec specifies KNL operator’s configuration
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
fileSvr string | SFTPSever address, must have format as addr/hostname:port | ||
vxlanGrp string | multicast address used by VxLAN tunnel between k8s workers | ||
defaultVxlanDev string | default 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 string | name of k8s storageclass used to create PVCs | ||
srCPMLoaderImage string | CPM loader container image, used by vsim, vsri and magc | ||
srIOMLoaderImage string | IOM loader container image, used by vsim and magc | ||
sideCarImage string | Kubevirt sidecar hook image, used by vsim, vsri and magc | ||
defaultNode OneOfSystem | defaultNode specifies default values for types of node |
Lab#
Lab is the Schema for the labs API
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string | knl.kubenetlab.net/v1beta1 | ||
kind string | Lab | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
spec LabSpec | spec defines the desired state of Lab |
LabList#
LabList contains a list of Lab
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string | knl.kubenetlab.net/v1beta1 | ||
kind string | LabList | ||
metadata ListMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
items Lab array |
LabSpec#
LabSpec defines the desired state of Lab
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
nodes object (keys:string, values:OneOfSystem) | nodes lists all nodes in the lab | ||
links object (keys:string, values:Link) |
Link#
Link defines a layer2 connection between nodes, two or more nodes per link are supported.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
nodes Connector array | a list of nodes connect to the link’s layer2 network |
MAGC#
Underlying type: SRVM
MAGC specifies a Nokia MAG-c
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
chassis SRChassis | specifies chassis configuration | ||
image string | one 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 Quantity | Disk size for the CPM, only used when image is a docker image, must >= image size | ||
license string | a k8s secret name contains license with key “license” | ||
uuid string | VM’s firmware UUID | ||
dedicate boolean | if 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:
| Field | Description |
|---|---|
pod | |
srl | |
srsim | |
vsim | |
vsri | |
magc | |
unknown | |
vm |
OneOfSystem#
OneOfSystem specifies one KNL node type, only one field should be specified.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
vsim VSIM | |||
vsri VSRI | |||
magc MAGC | |||
vm GeneralVM | |||
srl SRLinux | |||
pod GeneralPod | |||
srsim SRSim |
SRCard#
SRCard is a CPM or IOM card
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
type string | Card model | ||
sysinfo string | sysinfo is only used by vsim, mag-c and vsri, not need to specify in most cases; | ||
mdas string | list 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 Quantity | requested memory in k8s resouce unit | ||
cpu Quantity | requested CPU in k8s resource unit | ||
ports Port | list of listening ports for management interface |
SRChassis#
SRChassis is used by srsim, vsim, vsri and magc to specify the chassis configuration.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
model string | chassis 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 string | SFM model | ||
chassisMac string | Chassis Base MAC address, auto assigned if not specified |
SRLinux#
SRLinux specifies a Nokia SRLinux chassis;
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
image string | SRLinux container image | ||
chassis string | chassis model | ||
license string | a k8s secret contains the license file with “license” as the key | ||
memory Quantity | requested memory in k8s resource unit | ||
cpu Quantity | requested 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
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
image string | Docker image | ||
chassis SRChassis | specifies the chassis configuration | ||
license string | name of k8s secret contains license file with “license” as the key |
SRVM#
undelying type for VSIM, VSRI, and MAGC
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
chassis SRChassis | specifies chassis configuration | ||
image string | one 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 Quantity | Disk size for the CPM, only used when image is a docker image, must >= image size | ||
license string | a k8s secret name contains license with key “license” | ||
uuid string | VM’s firmware UUID | ||
dedicate boolean | if 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:
| Field | Description | Default | Validation |
|---|---|---|---|
chassis SRChassis | specifies chassis configuration | ||
image string | one 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 Quantity | Disk size for the CPM, only used when image is a docker image, must >= image size | ||
license string | a k8s secret name contains license with key “license” | ||
uuid string | VM’s firmware UUID | ||
dedicate boolean | if 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:
| Field | Description | Default | Validation |
|---|---|---|---|
chassis SRChassis | specifies chassis configuration | ||
image string | one 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 Quantity | Disk size for the CPM, only used when image is a docker image, must >= image size | ||
license string | a k8s secret name contains license with key “license” | ||
uuid string | VM’s firmware UUID | ||
dedicate boolean | if true, allocate dedicate cpu and huge page memory; recommand to set to true in case of vsr and magc |
XIOM#
SR XIOM
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
type string | XIOM model | ||
mdas string array | list of MDAs insert into the XIOM |