Add SRIOV support to kuryr-kubernetes

Registered by Ashish Billore

Add capability in kuryr to provision sriov ports for kubernetes pods.

As discussed with kuryr team (during May 2017 Boston Summit), here are the details we would like to proceed with, related to sriov support in kuryr-kubernetes:

What to support (features):
-----------------------------------------

- Capability to provision 'direct' ports on neutron for assignment to pods in kubernetes.
- multiple (zero or more) direct ports (for now VFs) can be requested for assignment to a single pod.
- Direct ports (VFs) can be allocated from one or more physnet (PF) available on the host (Kubernetes node).
- Kubernetes should be informed about this VF allocation, for bookkeeping and to enable scheduling of pods based on the requested direct ports (VFs). One possible mechanism is to leverage annotation for presenting this information over to Kubernetes.
- Cleanup and releasing of there 'direct' ports (VFs) should happen on appropriate action / life-cycle events (for example, when the pod using these direct ports is deleted) of the pods using these sriov ports (VFs).

How to support:
------------------------

Implement a sriov handler for kuryr-kubernetes, which subscribes to Pod events from k8s-api. This handler receives: number of 'direct' ports (VFs) needed and the subnet-physnet mapping from the request and allocates requested number of 'direct' ports (VFs) on respective subnet for the Pod. In order to make kubernetes aware of this allocation, the Pod object is annotated with requested VIF information.

Related patches:
--------------------------

Refer to Whiteboard section below.

Blueprint information

Status:
Complete
Approver:
Antoni Segura Puimedon
Priority:
Medium
Drafter:
Ashish Billore
Direction:
Needs approval
Assignee:
Danil Golov
Definition:
Approved
Series goal:
Proposed for queens
Implementation:
Implemented
Milestone target:
None
Started by
Ashish Billore
Completed by
Danil Golov

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/465661
    Add kuryr-sriov spec proposal

Addressed by: https://review.openstack.org/462455
    [WIP] Add sriov handler to kuryr-kubernetes

Addressed by: https://review.openstack.org/462456
    [WIP] Add kuryr-sriov-cni

Addressed by: https://review.openstack.org/468032
    Allow setting specific ports for SRIOV handler

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

Addressed by: https://review.openstack.org/478458
    Add SR-IOV documentation

Addressed by: https://review.openstack.org/478494
    Allow setting specific ports for SRIOV handler

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

Addressed by: https://review.openstack.org/513715
    Add VIF-Handler And Drivers Design approach

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

Addressed by: https://review.openstack.org/512281
    Add SR-IOV binding driver to CNI

Addressed by: https://review.openstack.org/512280
    Add SR-IOV capabilities to VIF handler

Gerrit topic: https://review.openstack.org/#q,topic:sriov-upstream-patches,n,z

Addressed by: https://review.openstack.org/590245
    Separate helper function for pod

Addressed by: https://review.openstack.org/594125
    Add HOWTO for SRIOV use case

Addressed by: https://review.openstack.org/600022
    Introduce test case document for SRIOV functionality

Gerrit topic: https://review.openstack.org/#q,topic:600022,n,z

Addressed by: https://review.openstack.org/633453
    Fix a misprint in SR-IOV binding driver

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.