Files
homelab/k8s/apps/firefly-iii/network-policy.yaml
T

102 lines
2.7 KiB
YAML
Raw Normal View History

2026-07-30 12:18:12 +01:00
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: firefly-ingress
spec:
podSelector:
matchLabels:
app.kubernetes.io/instance: firefly-iii
app.kubernetes.io/name: firefly-iii
policyTypes:
- Ingress
ingress:
- from:
- podSelector:
matchLabels:
app.kubernetes.io/name: traefik-ai
# The chart's CronJob uses the same selector labels as the application.
- podSelector:
matchLabels:
app.kubernetes.io/instance: firefly-iii
app.kubernetes.io/name: firefly-iii
2026-07-30 16:00:32 +01:00
- podSelector:
matchLabels:
app.kubernetes.io/name: firefly-data-importer
2026-08-01 13:24:23 +01:00
- podSelector:
matchLabels:
app.kubernetes.io/name: firefly-data-importer-sync
2026-07-30 14:35:50 +01:00
# hostNetwork traffic is seen as node traffic rather than Pod traffic.
- ipBlock:
cidr: 192.168.1.117/32
- ipBlock:
cidr: 100.77.155.120/32
2026-07-30 12:18:12 +01:00
ports:
- protocol: TCP
port: 8080
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: firefly-postgres-ingress
spec:
podSelector:
matchLabels:
cnpg.io/cluster: firefly-postgres
policyTypes:
- Ingress
ingress:
- from:
- podSelector:
matchLabels:
app.kubernetes.io/instance: firefly-iii
app.kubernetes.io/name: firefly-iii
- podSelector:
matchLabels:
cnpg.io/cluster: firefly-postgres
ports:
- protocol: TCP
port: 5432
# CloudNativePG operator health/status traffic to the instance manager.
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: psql
podSelector:
matchLabels:
app.kubernetes.io/name: cloudnative-pg
ports:
- protocol: TCP
port: 8000
2026-07-30 15:44:58 +01:00
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: firefly-data-importer-ingress
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: firefly-data-importer
policyTypes:
- Ingress
ingress:
2026-07-30 16:19:37 +01:00
# Shared Traefik serves the public HTTPS importer.
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
app.kubernetes.io/name: traefik
ports:
- protocol: TCP
port: 8080
# Keep node traffic allowed for probes and local diagnostics.
2026-07-30 15:44:58 +01:00
- from:
- ipBlock:
cidr: 192.168.1.117/32
- ipBlock:
cidr: 100.77.155.120/32
ports:
- protocol: TCP
port: 8080