99 lines
2.6 KiB
YAML
99 lines
2.6 KiB
YAML
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
|
|
- podSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: firefly-data-importer
|
|
# 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
|
|
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
|
|
---
|
|
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:
|
|
# 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.
|
|
- from:
|
|
- ipBlock:
|
|
cidr: 192.168.1.117/32
|
|
- ipBlock:
|
|
cidr: 100.77.155.120/32
|
|
ports:
|
|
- protocol: TCP
|
|
port: 8080
|