Skip to content

Instantly share code, notes, and snippets.

@zetaab
Last active September 25, 2022 16:16
Show Gist options
  • Save zetaab/3408b9992630133f822644463ec81906 to your computer and use it in GitHub Desktop.
Save zetaab/3408b9992630133f822644463ec81906 to your computer and use it in GitHub Desktop.
apiVersion: crd.projectcalico.org/v1
kind: GlobalNetworkPolicy
metadata:
name: default-deny-cloud-metadata
spec:
order: 10
types:
- Egress
namespaceSelector: kaas.foobar.com/allow-cloud-meta != 'true'
egress:
- action: Deny
destination:
nets:
- 169.254.169.254/32
---
apiVersion: crd.projectcalico.org/v1
kind: GlobalNetworkPolicy
metadata:
name: allow-all
spec:
order: 5000
types:
- Egress
namespaceSelector: kaas.foobar.com/allow-cloud-meta != 'true'
egress:
- action: Allow
destination:
nets:
- 0.0.0.0/0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment