Files
foxhunt/infra/k8s/network-policies/mattermost.yaml
jgrusewski 9e8b9422cf feat(infra): deploy Mattermost on platform nodes with CI webhook egress
Add Mattermost Team Edition deployment (PVC, Service, NetworkPolicy),
DNS records (chat.fxhnt.ai, mail.fxhnt.ai), Tailscale nginx proxy
server block with WebSocket upgrade support, and Mattermost egress
rules to all 5 Argo workflow NetworkPolicies for exit handler webhooks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 09:20:32 +01:00

43 lines
938 B
YAML

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: mattermost
namespace: foxhunt
labels:
app.kubernetes.io/part-of: foxhunt
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: mattermost
policyTypes:
- Ingress
- Egress
ingress:
# HTTP from Tailscale proxy + Argo workflow pods (webhook notifications)
- ports:
- port: 8065
protocol: TCP
egress:
# DNS
- ports:
- port: 53
protocol: UDP
- port: 53
protocol: TCP
# PostgreSQL
- ports:
- port: 5432
protocol: TCP
to:
- podSelector:
matchLabels:
app.kubernetes.io/name: postgres
# Stalwart SMTP (for email notifications, wired later)
- ports:
- port: 25
protocol: TCP
to:
- podSelector:
matchLabels:
app.kubernetes.io/name: stalwart