Support multiple vifs per Pod

Registered by Antoni Segura Puimedon

Important: This blueprint is not about generic multi homed pods, which will be in another blueprint in reference to kubernetes multiple network support.

It is desirable for pods to be able to be attached to multiple OpenStack vifs. Those vifs may belong to one or more networks.

Things to do:

0.- Update the contract between the controller and the CNI plugins so that the annotation the controller writes and the CNI watches for is no longer 'openstack.org/kuryr-vif' but 'openstack.org/kuryr-vifs', which will be a list of 1 or more vifs to attach. (Update documentation)
1.- CNI: vif handler to watch for 'openstack.org/kuryr-vifs'
2.- CNI: vif handler to iterate over all the vifs in the annotation. Only the first one should be reported as long as the CNI spec requested is < 0.3.1
3. Controller: refactor vif handler to allow for extra vifs to be specified by Neutron uuids as annotations. The workflow should be:
    3.1.- The user creates the Pod spec including an annotation like the two following:
        3.1.1.- openstack.org/neutron.subnet.uuids: [List of uuid strings]
            UUID of a neutron subnet to plug into: This will allow the spec to work with replication controllers while still allowing multiple vifs. The Controller should create a new port for each of the subnets listed (they could be repeated) and add it to the kuryr-vifs annotation list.
        3.1.2.- openstack.org/neutron.port.uuids: [List of uuid strings]
            UUID of specific ports that should be bound on the pod. Obviously, this will make replica binding fail, since the ports will already be bound and active. The Controller should just get the port info into vif form and add it to the kuryr-vifs annotation list.

Important considerations: It is unclear whether the annotations in the form of 3.1.1 will be superseded and deprecated once we have multi-homed pod support following the K8s upstream design and PoC

Blueprint information

Status:
Complete
Approver:
Irena Berezovsky
Priority:
Medium
Drafter:
Antoni Segura Puimedon
Direction:
Approved
Assignee:
Gary Loughnane
Definition:
Approved
Series goal:
Accepted for rocky
Implementation:
Implemented
Milestone target:
None
Started by
Daniel Mellado
Completed by
Michal Dulko

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/kuryr-kubernetes-sriov-support,n,z

Addressed by: https://review.openstack.org/471012
    Allow passing multiple VIFs to CNI

Addressed by: https://review.openstack.org/482544
    [DRAFT] Allow requesting additional VIFs via annotation

Gerrit topic: https://review.openstack.org/#q,topic:bp/kuryr-kubernetes-sriov-support-refactor,n,z

Gerrit topic: https://review.openstack.org/#q,topic:bp/multi-vif-pods,n,z

Addressed by: https://review.openstack.org/575629
    Implement multi-vif driver

Addressed by: https://review.openstack.org/524590
    Add multi-vif driver and related handler changes

Addressed by: https://review.openstack.org/577070
    Add multi-vif driver and related handler changes

Addressed by: https://review.openstack.org/578009
    [WIP] Implement NPWG multi-vif driver

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.