homelab-gitops/apps/audiobookshelf/network-policies.yaml
gwg313 d8e2543152
add audiobookshelf
Signed-off-by: gwg313 <gwg313@pm.me>
2026-05-19 12:41:13 -04:00

62 lines
1.4 KiB
YAML

# ----------------------------------------------------
# Ingress only from Gateway API
# ----------------------------------------------------
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: allow-ingress
namespace: audiobookshelf
spec:
endpointSelector:
matchLabels:
app: audiobookshelf
ingress:
- fromEntities:
- ingress
toPorts:
- ports:
- port: "80"
protocol: TCP
---
# ----------------------------------------------------
# audible access (cover art, metadata)
# ----------------------------------------------------
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: allow-audible
namespace: audiobookshelf
spec:
endpointSelector:
matchLabels:
app: audiobookshelf
egress:
- toFQDNs:
- matchName: audible.com
toPorts:
- ports:
- port: "443"
protocol: TCP
# ----------------------------------------------------
# OPTIONAL: unrestricted HTTPS egress (disabled)
# ----------------------------------------------------
# apiVersion: cilium.io/v2
# kind: CiliumNetworkPolicy
# metadata:
# name: allow-all-egress
# namespace: audiobookshelf
# spec:
# endpointSelector:
# matchLabels:
# app: audiobookshelf
#
# egress:
# - toEntities:
# - world
# toPorts:
# - ports:
# - port: "443"
# protocol: TCP