Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Networking Plugin

The Networking Plugin has the ability to create, delete, query and update virtual networks. This will implement API's like CreateVL, DeleteVL, QueryVL and UpdateVL. Networking plugin on initialization will call discovery function to find out about the type of networking plugin available. It'll load the required plugin and call init functions of the appropriate plugin.

Ovn-kubernetes design and changes for multiple interface support

  • In the current design of ovn-kubernetes if a Pod is annotated with "ovn" then static IP, MAC can be assigned for the single interface that is created. And if the pod is not annotated with "ovn" then the ovn watcher annotates the pod with the "ovn" with dynamic address allocation. This information is then used by CNI to assign address for the interface. For backward compatibility this behavior will not change and pods can be created with single interface as before. The one interface is attached to a default network created at the time initialization time.
  • To create multiple interface the pods or to attach single interface to a different virtual network a new annotation is added to the Pods - "ovnNetwork". If "ovnNetwork" annotation is present then the "ovn " annotation is ignored.
  • Assumption CreateVL call is already made prior pod getting created with that virtual network.
  • To create a pod with multiple interfaces annotate the pod like below:

{ "name": "ovn-ls-25", "interface": "net0" },

{ "name": "ovn-ls-26", "interface": "net1", "ip_address":"172.16.25.3", "mac_address":"0a:00:00:00:00:15" }

        In this example net0 interface will be connected to a "ovn-ls-25" network and dynamic address allocation will be done for the addresses. net1 is connected to the ovn-ls-26 network and static address is allocated for it.

    • "name": Virtual network name, used to connect interface to network
    • "interface": Name of the interface. Assumption: Current 10 interfaces are supported. All interfaces should be named with alphanumeric characters with the last character being a number between 0-9. This is required as this number is used to distinguish between interfaces within the pod namespace.
    • Ip_address: static ip. Optional if not given dynamically assigned
    • mac_address: static mac. Optional if not given dynamically assigned
  • ovn-kubernetes watcher based on the "ovnNetwork" annotation connects the interfaces to the right virtual network and creates a list of interfaces and corresponding addresses for the CNI to assign addresses to the newly created Pods.  It annotates the pod with the list "ovnIfaceList".

 For example:  ovnIfaceList=[{"ip_address":"172.16.25.3", "mac_address":"0a:00:00:00:00:15", "gateway_ip": "172.16.25.1"},