fix: update white-listing annotation

This commit is contained in:
2025-06-22 08:33:29 +02:00
parent 561c620f98
commit 383477822a
141 changed files with 1854 additions and 28 deletions
@@ -0,0 +1,18 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: allow-controller-metrics
namespace: kube-system
spec:
description: Allow Controller Metrics
endpointSelector:
matchLabels:
k8s-app: kube-controller-manager
ingress:
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: prometheus
- toPorts:
- ports:
- port: "10257"
protocol: TCP
@@ -0,0 +1,12 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: allow-csi-webhook
namespace: kube-system
spec:
endpointSelector:
matchLabels:
app: csi-snapshot-webhook
ingress:
- fromEntities:
- remote-node
@@ -0,0 +1,18 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: allow-dns-metrics
namespace: kube-system
spec:
description: Allow DNS metrics
endpointSelector:
matchLabels:
k8s-app: kube-dns
ingress:
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: prometheus
- toPorts:
- ports:
- port: "9153"
protocol: TCP
@@ -0,0 +1,31 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: allow-dns-world
namespace: kube-system
spec:
description: Allow DNS World
egress:
- toCIDR:
- 8.8.8.8/32
- 172.31.254.11/32
- 1.1.1.1/32
toPorts:
- ports:
- port: "53"
protocol: UDP
rules:
dns:
- matchPattern: '*'
- toEntities:
- world
toPorts:
- ports:
- port: "53"
protocol: UDP
rules:
dns:
- matchPattern: '*'
endpointSelector:
matchLabels:
k8s-app: kube-dns
@@ -0,0 +1,19 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: allow-dns
namespace: kube-system
spec:
description: Allow DNS
endpointSelector:
matchLabels:
k8s-app: kube-dns
ingress:
- fromEndpoints:
- matchExpressions:
- key: io.kubernetes.pod.namespace
operator: Exists
toPorts:
- ports:
- port: "53"
protocol: UDP
@@ -0,0 +1,14 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: allow-host-traffic
namespace: kube-system
spec:
description: Allow Host Traffic
egress:
- toEntities:
- remote-node
- host
- kube-apiserver
endpointSelector:
matchLabels: {}
@@ -0,0 +1,14 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: allow-hubble-ingress
namespace: kube-system
spec:
description: Allow Hubble ingress
endpointSelector:
matchLabels:
k8s-app: hubble-ui
ingress:
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: ingress-nginx
@@ -0,0 +1,14 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: allow-hubble-oauth2-ingress
namespace: kube-system
spec:
description: Allow Hubble OAuth2 ingress
endpointSelector:
matchLabels:
k8s-app: oauth2-proxy
ingress:
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: ingress-nginx
@@ -0,0 +1,18 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: allow-hubble-relay-metrics
namespace: kube-system
spec:
description: Allow Hubble Relay Metrics
endpointSelector:
matchLabels:
k8s-app: hubble-relay
ingress:
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: prometheus
- toPorts:
- ports:
- port: "9966"
protocol: TCP
@@ -0,0 +1,15 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: allow-microsoft-sso
namespace: kube-system
spec:
description: Allow Microsoft SSO
egress:
- toFQDNs:
- matchName: login.microsoftonline.com
- matchPattern: '*.microsoftonline.com'
- matchName: graph.microsoft.com
endpointSelector:
matchLabels:
k8s-app: oauth2-proxy
@@ -0,0 +1,26 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: allow-namespace-traffic
namespace: kube-system
spec:
description: Allow Namespace Traffic
egress:
- toEndpoints:
- {}
- toEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: kube-system
k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
rules:
dns:
- matchPattern: '*'
endpointSelector:
matchLabels: {}
ingress:
- fromEndpoints:
- {}
@@ -0,0 +1,18 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: allow-proxy-metrics
namespace: kube-system
spec:
description: Allow Proxy metrics
endpointSelector:
matchLabels:
k8s-app: kube-proxy
ingress:
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: prometheus
- toPorts:
- ports:
- port: "10249"
protocol: TCP