Repository navigation
feat(deploy): add dynamic DNS, a host firewall and read-only database access - #15
Merged
Merged
Conversation
… access Dynamic DNS: favonia/cloudflare-ddns keeps the public site, registry and storage records on the home connection's current IPv4 address, in the infrastructure-configs stage so it runs before the platform and apps. It reuses the cert-manager DNS token and reports failures to the alerts channel; that stage now takes the shared cluster settings. Host firewall: deploy/bootstrap/host-firewall.sh applies the server's whole UFW configuration declaratively: public edge and Traefik ports, SSH and the k3s API from the administrative network only, and the k3s pod and service networks. It lists every port Docker or Kubernetes exposes past UFW. Database access: CloudNativePG manages a snapflow_readonly role in pg_read_all_data, with a password generated in OpenBao that the operator can read in the UI. docs/reference/production-settings.md maps where every production value lives.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
BryanLawless
added a commit
that referenced
this pull request
Nov 5, 2026
Pull requests are now squash-merged directly into main; dev, its workflow, sync-dev and the dev ruleset are retired. Pushes to main run CI, publish the changed images and run release-please, and Flux image automation pins digests on main. Also brings in the changes merged into dev since the last promotion: - feat(deploy): manage operator secrets in the OpenBao web UI (#14) - feat(deploy): add dynamic DNS, a host firewall and read-only database access (#15) - chore: remove the docs folder (#16) - chore: remove dead code, configuration and unused runtime options (#17) - fix(api): restore the executable bit on the GeoIP download script (#19) - ci: rebuild the api image when the GeoIP download script changes (#20)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dynamic DNS
favonia/cloudflare-ddns1.18.0 (pinned by digest) keepsPUBLIC_DOMAIN(proxied),REGISTRY_DOMAINandSTORAGE_DOMAIN(DNS only, because of Cloudflare's 100 MB proxy body limit) on the connection's current public IPv4 address, checking on start and every five minutes. IPv6 is off.infrastructure-configsstage, so the records are right before the platform and apps deploy. That stage now takescluster-settingsthroughpostBuild.substituteFrom(nothing in it used$before), andvalidate.shchecks it with substitution.snapflow/cloudflare-dnsZone:DNS:Edittoken cert-manager uses, and sends failed updates to the Flux alerts Discord channel; the ExternalSecret template turns the webhook URL into Shoutrrr'sdiscord://<token>@<id>without any$, so Flux substitution cannot touch it.Host firewall
deploy/bootstrap/host-firewall.shis the server's whole UFW configuration, applied declaratively (reset, then the rules), so reruns are no-ops and hand-added rules are removed.--dry-runprints the rules.ADMIN_CIDRoverrides; Tailscale when present): SSH, rate limited, and the k3s API. The k3s pod and service CIDRs are allowed for input and forwarding, per the k3s requirements for UFW.Read-only database access
managed.rolesdeclaressnapflow_readonly(login,pg_read_all_data, connection limit 5) with its password from akubernetes.io/basic-authsecret labelledcnpg.io/reload.snapflow/platform/postgres-readonly; the operator policy may read that one path (and listsnapflow/platform/) and nothing else there.Testing
validate.shpasses for every stage, includinginfrastructure-configswith cluster settings; shellcheck is clean.text/templateand sprig as External Secrets does, turnshttps://discord.com/api/webhooks/<id>/<token>intodiscord://<token>@<id>.1000:1000read-only with all capabilities dropped and these exact settings, parsed every setting (three IPv4 domains,@every 5m, notifications) and proceeded to call Cloudflare.snapflow/platform/postgres-readonlyand listssnapflow/platform/, but cannot write it or readsnapflow/platform/redis.