PoliNetwork deployment source of truth for the production K3s cluster. Flux on
k3s01 tracks main from clusters/k3s and applies
infrastructure/ and apps/<namespace>. The host
bootstrap (disks, firewall, K3s, backups, Flux) is done with Ansible and
documented in ansible/README.md.
ansible/ host provisioning and verification
clusters/k3s/ Flux entry point and reconciliation order
infrastructure/ storage, Traefik, External Secrets, cloudflared, image automation, Flux UI
apps/<ns>/ one folder per application namespace
tests/ manifest checks run in CI
bot-prod/ bot-rooms/ mariadb/ legacy AKS folders, disabled
- Traffic: Cloudflare Tunnel → Traefik (
ClusterIP) → Ingress. The NSG denies all inbound traffic except WireGuard on UDP 48726, which reaches the WireGuard Portal Pod through a hostPort; the tunnel cannot carry it. Auth usesAUTH_CLIENT_IP_HEADER=cf-connecting-ipfor per-address rate limits. Cloudflare supplies that header; Traefik's default handling ofX-Forwarded-Fordoes not preserve the visitor address without trusted proxy configuration. Keep Auth behind the tunnel and ensure Cloudflare does not remove the header. Cluster-internal IdP calls carry no visitor address and share Auth's bounded token budget of 60 requests per minute. - Secrets:
ExternalSecrets sync from Azure Key Vault (kv-pn-apps,kv-pn-infra). No secrets live in Git. - Images: PoliNetwork apps run
ghcr.io/polinetworkorg/<app>:latest. The Flux Operator resolves the digest and rolls out on the GitHubpackagewebhook, with 6h polling as fallback. - Storage: PVCs use the
fastorstandardlocal-path class on the node's data disks, withRetainand Flux pruning disabled. - Backups:
age-encrypted uploads to Azure Blob: control plane daily, application data every 6 hours.
- New app version: publish
:latestto GHCR. - Config change: edit
apps/<ns>/and merge tomain. - Secret change: update it in Key Vault; it resyncs within 1h.
- New app: add
apps/<ns>/andclusters/k3s/apps/<ns>.yaml, list it inclusters/k3s/apps/kustomization.yaml, and allow the namespace ininfrastructure/secret-stores/if it needs secrets. - Status: Flux UI at
flux.polinetwork.org.
CI (.github/workflows/ansible.yml) syntax-checks the playbooks, builds the
Kustomizations and runs tests/.