Skip to content

Commit

Permalink
feat: egress netpols
Browse files Browse the repository at this point in the history
  • Loading branch information
wittdennis committed Dec 27, 2024
1 parent cb76bff commit 0498dd6
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions cloud/networking/network-policies/default-deny-egress.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# ---
# apiVersion: cilium.io/v2
# kind: CiliumNetworkPolicy
# metadata:
# name: default-deny-egress
# namespace: foundry
# spec:
# endpointSelector: {}
# egress:
# # DNS
# - toEndpoints:
# - matchLabels:
# io.kubernetes.pod.namespace: kube-system
# k8s-app: kube-dns
# toPorts:
# - ports:
# - port: "53"
# protocol: UDP
# rules:
# dns:
# - matchPattern: "*"
# # ingress-nginx
# - toEndpoints:
# - matchLabels:
# app.kubernetes.io/name: ingress-nginx
# app.kubernetes.io/instance: ingress-nginx
# app.kubernetes.io/component: controller
# io.kubernetes.pod.namespace: ingress-nginx
---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: default-deny-egress
namespace: foundry
spec:
endpointSelector: {}
egress:
# DNS
- toEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: kube-system
k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
rules:
dns:
- matchPattern: "*"
# ingress-nginx
- toEndpoints:
- matchLabels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/instance: ingress-nginx
app.kubernetes.io/component: controller
io.kubernetes.pod.namespace: ingress-nginx

0 comments on commit 0498dd6

Please sign in to comment.