I'm trying to allow traffic from only some ip ranges to an loadbalancer in an AKS, so I am trying with calico using a GlobalNetworkPolicy but its not working, what i'm doing wrong?
apiVersion: crd.projectcalico.org/v1
kind: GlobalNetworkPolicy
metadata:
name: deny-lb-port-80
spec:
applyOnForward: true
preDNAT: true
ingress:
- action: Log
- action: Deny
destination:
nets:
- balancerIP
ports:
- 80
protocol: TCP
source: {}
order: 800
types:
- Ingress
---
apiVersion: crd.projectcalico.org/v1
kind: GlobalNetworkPolicy
metadata:
name: allowlist
spec:
applyOnForward: true
preDNAT: true
ingress:
- action: Log
- action: Allow
destination:
nets:
- balancerip
ports:
- 80
protocol: TCP
source:
nets:
- allowedipranges
order: 500
types:
- Ingress