[ICN-213] OpenNESS gap for Network Policy Created: 11/Dec/19  Updated: 16/Jul/20  Resolved: 09/Jan/20

Status: Done
Project: Integrated Cloud Native NFV
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: High
Reporter: Huifeng Le Assignee: Chenjie Xu
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: OpenNESS integration in ICN

 Description   

Investigate Network Policy Gap for OpenNESS integration



 Comments   
Comment by Chenjie Xu [ 17/Jan/20 ]

The gap analysis has been added to the Akraino ICN OpenNESS wiki page as following:

https://wiki.akraino.org/display/AK/OpenNESS+19.12+Investigation#OpenNESS19.12Investigation-NetworkPolicy

Comment by Chenjie Xu [ 09/Jan/20 ]

1. To deploy a Network Policy allowing ingress traffic on port 5000 (tcp and udp) from 192.168.1.0/24 network to OpenVINO consumer application pod, create the following specification file for this Network Policy:

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: openvino-policy
  namespace: default
spec:
  podSelector:
    matchLabels:
      name: openvino-cons-app
  policyTypes:
  - Ingress
  ingress:
  - from:
    - ipBlock:
          cidr: 192.168.1.0/24
    ports:
    - protocol: TCP
      port: 5000
    - protocol: UDP
       port: 5000

2. Create the Network Policy:
kubectl apply -f network_policy.yml

Comment by Chenjie Xu [ 09/Jan/20 ]

By default, in a Network Edge environment, all ingress traffic is blocked (services running inside of deployed applications are not reachable) and all egress traffic is enabled (pods are able to reach the internet). The following NetworkPolicy definition is used:

apiVersion: networking.k8s.io/v1
metadata:
  name: block-all-ingress
  namespace: default # selects default namespace
spec:
  podSelector: {} # matches all the pods in the default namespace
  policyTypes:
  - Ingress
  ingress: [] # no rules allowing ingress traffic = ingress blocked

Generated at Sat Feb 10 05:58:06 UTC 2024 using Jira 9.4.5#940005-sha1:e3094934eac4fd8653cf39da58f39364fb9cc7c1.