Add support for K8s network policies

Registered by Irena Berezovsky

The purpose of this blueprint is to add Kubernetes Network Policy support to kuryr-kubernetes

Blueprint information

Status:
Complete
Approver:
Irena Berezovsky
Priority:
High
Drafter:
Irena Berezovsky
Direction:
Needs approval
Assignee:
Daniel Mellado
Definition:
Approved
Series goal:
Accepted for trunk
Implementation:
Implemented
Milestone target:
None
Started by
Irena Berezovsky
Completed by
Michal Dulko

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/k8s-network-policies,n,z

Addressed by: https://review.openstack.org/519239
    Kubernetes Network Policy support Spec

Gerrit topic: https://review.openstack.org/#q,topic:policy-translate,n,z

Addressed by: https://review.openstack.org/526916
    [WIP] Translate k8s policy to SG

Addressed by: https://review.openstack.org/530655
    [WIP] Create network policy handler and driver

Addressed by: https://review.openstack.org/543448
    [WIP] DisposableWatch for k8s client

Addressed by: https://review.openstack.org/545663
    [WIP] Annotate pods that selected by k8s label-selector

Addressed by: https://review.openstack.org/545872
    [WIP] Add policy security-groups driver

Addressed by: https://review.openstack.org/573616
    Create network policy handler and driver

Addressed by: https://review.openstack.org/580982
    (WIP) Implement Network Policies Driver

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

Addressed by: https://review.openstack.org/605150
    [WIP] Support network policy update

Addressed by: https://review.openstack.org/608616
    [WIP] Add security groups driver for NP

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

Addressed by: https://review.openstack.org/611606
    Ensure namespace and network policy compatibility

Addressed by: https://review.openstack.org/613860
    Ensure namespace and network policy compatibility

Addressed by: https://review.openstack.org/616261
    [WIP] Ensure existing pods use the right network policy

Addressed by: https://review.openstack.org/616638
    Remove np spec from kuryrnetworkpolicy annotations

Addressed by: https://review.openstack.org/617557
    Adds CRDs readiness checks to Kuryr-Controller

Addressed by: https://review.openstack.org/618521
    Ensure pod relabeling is supported by the Network Policy

Addressed by: https://review.openstack.org/619632
    Add namespaceSelector support for NetworkPolicies

Addressed by: https://review.openstack.org/620572
    [WIP] Add support for matchExpressions

Gerrit topic: https://review.openstack.org/#q,topic:bp/k8s-network-policies-patch22,n,z

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

Addressed by: https://review.openstack.org/622965
    Fix labels encode

Addressed by: https://review.openstack.org/623554
    Add support for podSelector

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

Addressed by: https://review.openstack.org/624065
    Ensure pod_label handler skips host_network pods

Gerrit topic: https://review.openstack.org/#q,topic:support-match-expression,n,z

Gerrit topic: https://review.openstack.org/#q,topic:devstack-with-np,n,z

Addressed by: https://review.openstack.org/624453
    Ensure kubelet pod has default connectivity with Network Policies

Addressed by: https://review.openstack.org/625225
    Ensure network policies are not applied on pod with host networking

Addressed by: https://review.openstack.org/625588
    [wip] Update CRD when NP has podSelectors

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

Addressed by: https://review.openstack.org/625668
    Avoid raising ResourceNotReady exception at pod label handler

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

Addressed by: https://review.openstack.org/626887
    Handle loadbalancer SGs are created when sg_mode is create

Addressed by: https://review.openstack.org/627175
    [WIP] Add Network Policy support to services

Addressed by: https://review.openstack.org/627850
    [WIP] Update CRD when NP has namespaceSelectors

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

Addressed by: https://review.openstack.org/628436
    Fix NP creation when it has namespaceSelector

Addressed by: https://review.openstack.org/629486
    Ensure reaction to svc target-port update

Addressed by: https://review.openstack.org/629856
    [wip] Ensure NP changes are applied to services

Addressed by: https://review.openstack.org/631587
    Ensure lb sg rules are not deleted when adding members

Addressed by: https://review.openstack.org/631781
    Revert "Ensure reaction to svc target-port update"

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

Addressed by: https://review.openstack.org/631230
    Fix CRD update when NP has namespaceSelectors

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

Addressed by: https://review.openstack.org/632503
    Ensure host to pod connectivity for NP

Addressed by: https://review.openstack.org/634674
    Pools support with Network Policies

Gerrit topic: https://review.openstack.org/#/q/topic:np_ipblock

Addressed by: https://review.openstack.org/645139
    Add ipBlock support to NP

Gerrit topic: https://review.opendev.org/#/q/topic:np_ipblock

Addressed by: https://review.opendev.org/650148
    Ensure NP Security Group is update on pod events

Addressed by: https://review.opendev.org/664528
    Add ipBlock support to NP

(?)

Work Items

Work items:
Network policy spec (https://review.openstack.org/519239) : DONE
Network-policy driver - Translate k8s-policy to neutron-SG (https://review.openstack.org/526916): INPROGRESS
Network-policy driver - Annotate the pod with security-group-id(https://review.openstack.org/#/c/545663/): INPROGRESS
Network-policy driver - Attach allowed ingress and egress pods to the remote SG : (https://review.openstack.org/#/c/545663/): INPROGRESS
Create Network-policy handler(https://review.openstack.org/#/c/530655/): INPROGRESS
Create network policy pods security-group driver(https://review.openstack.org/#/c/545872/): INPROGRESS
Handle Controller restart: TODO
Handle port pool changes: TODO
Create tempest test: TODO

This blueprint contains Public information 
Everyone can see this information.