antrea-io / nephe

Antrea-managed security policies in the public cloud
Apache License 2.0
9 stars 9 forks source link

Do not expand IPBlock or ASG for Azure rule #299

Open reachjainrahul opened 1 year ago

reachjainrahul commented 1 year ago

Describe the problem/challenge you have

If an Antrea NetworkPolicy contains IPBlock or AddressGroup, each of the entry is translated to separate rule in Azure NSG. This will have scale implication as Azure NSG can support only 1000 rules.

Describe the solution you'd like

Add compression login in Azure plugin to combine IPBlock and Address groups of ANP in 1 rule.

reachjainrahul commented 1 year ago

Further, if a rule contains more than 1 services (port), for each port, a unique rule will be created in Azure cloud. This is not optimal.

For example,

apiVersion: crd.antrea.io/v1alpha1
kind: NetworkPolicy
metadata:
  name: allow-all
  namespace: azure-ns
spec:
  priority: 10
  appliedTo:
  - group: all-vms
  ingress:
  - from:
      - ipBlock:
          cidr: 1.1.0.0/24
    action: Drop
    ports:
      - protocol: TCP
        port: 443
      - protocol: TCP
        port: 80

This will translate to two rules.

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment, or this will be closed in 90 days