For AI agents: this documentation is indexed for you in llms.txt, and all of it in /llms.txt. Every page is also available as markdown: append .md to its address.

VPPConfig CR

VPPConfig Custom Resource (CR) is applied on the Core Cluster and is used to configure VPP instances. It can configure VPP switch daemon pods (node-mode FPP pods) or instance mode FPP pods. VPPConfig lists VPP CLI commands that must be run by VPP Operator, which can use many interfaces that are configured using VPPInterface CRs.

When multiple VPPConfig objects match the same VPP instance, they're merged based on their priority values. The resulting config is called "effective config". When an effective config is changed, the VPP instance needs to be restarted.

VPP CLI commands are defined in the VPPConfig Custom Resource under spec.afterCommands. Because these commands are provided as a list of strings, they cannot be modified at runtime. When the VPP CLI configuration changes, the VPP Operator marks the corresponding FPP pod as requiring a restart. You must restart (recreate) the FPP pod to apply the updated VPP CLI configuration.

yaml

This Ifs structure that can be used in the afterCommands has the following fields for each interface:

  • Name contains the VPP interface name for the interface
  • IP contains the IPv4 address for this interface, if any, or an empty string if there's no IPv4 address assigned for this interface
  • IPNet contains CIDR (IPv4 / subnet) for this interface, if any, or an empty string if there's no IPv4 address assigned for this interface
  • IP6 contains the IPv6 address for this interface, if any, or an empty string if there's no IPv6 address assigned for this interface
  • IPNet6 contains CIDR (IPv6 / subnet) for this interface, if any, or an empty string if there's no IPv6 address assigned for this interface
  • Table contains table (VRF) id for this interface (defaults to 0)

The IP address templating mechanism will not work correctly if there are multiple IPv4 addresses or multiple IPv6 addresses specified for the interface.

For VPPSwitch daemon pods, the config may also contain a uplinkConfig section that specifies the uplink configuration:

yaml

The external network configuration code matches the name prefix specified in VPPConfig against physical interface names included in a startup.conf based on MAPPING_ environment variables. Below is an example of a VPPConfig that matches all of the nodes and also enables bonding for the external network:

yaml

For this to work, we need to define the MAPPING_ environment variables for the FPP pod like this:

text

In the example above, 2 interfaces will be used for the ext-net external network defined in VPPConfig. The following VPPInterface objects will be created: <node-name>-ext-net-0, <node-name>-ext-net-1, and also a VPPInterface object for the bond named <node-name>-ext-net-bond.

VPPConfigs that contain external interfaces with IP assignment must match a single FPP node (via fpp-manager.cennso.com/plumbing-node label) or a single FPP instance (via fpp-manager.cennso.com/plumbing-instance label) to avoid IP conflicts:

yaml

VPPInterfaces that are generated for uplinks and extnet interfaces are continuously synced against the VPPConfigs applicable to the current node/instance. The generated VPPInterface objects have a couple of special labels:

  • fpp-manager.cennso.com/plumbing-physiftype: indicates uplink or extnet
  • fpp-manager.cennso.com/plumbing-physifrole: specifies standalone (for a non-bonded interface), member-N (for a bond member), bond (for a bond), or vlan (for a subinterface).