Compare commits

...
Sign in to create a new pull request.
Author SHA1 Message Date
da8f803b16 Merge pull request 'fix(osint): run the PR #72 summarizer build (fail-loudly + concurrent map phase)' (#92) from fix/osint-summarizer-fb5285d into master 2026-12-05 05:29:24 +00:00
Lance Walters
2f613e4f11 fix(osint): run the PR #72 summarizer (fail-loudly + concurrent map phase)
The resilience fix sirius/osint-dashboard@fb5285d (PR #72) was merged but
never deployed: ns osint still ran the 11/19 image amd64-fe2b5df369d0, which
has neither the concurrent map phase nor NousAPIError, so a non-retryable
Nous rejection was swallowed as an empty completion and the analyst idled
for nine days without a single signal.

* pin deploy/osint-news-summarizer to the CI-built amd64-fb5285df7f38
  (build run 1497 / job 2165, manifest sha256:e2387f90...4de52)
* pin osint-analyst-exporter to the same tag — it borrows the summarizer
  image for python3 + psycopg2, and two tags for one image read as drift
* SUMMARY_MAP_CONCURRENCY=16 next to BATCH_SIZE: ~20 s per map call, the
  746-batch recap measured 951 s at 16 (8 projects to ~98 min)
* README: image inventory + a section on the new behaviour and log line
2026-12-05 00:29:11 -05:00
9cec2da3c4 Merge pull request 'fix(forgejo): allow ci-runners -> forgejo:3000 so CI image pushes work' (#91) from fix/forgejo-allow-ci-runners-registry into master 2026-12-05 05:18:47 +00:00
81fe55b0fd fix(forgejo): allow ci-runners -> forgejo:3000 so CI image pushes work
`forgejo-allow` claimed no cross-namespace rule was needed because the CI
runners in `ci-runners` "register/poll over the public URL and therefore
arrive as reserved:ingress". That holds for registration only. Every
image-building workflow pushes to the in-cluster ClusterIP
(`PUSH_REGISTRY: forgejo.forgejo.svc.cluster.local:3000`) from the dind
sidecar of the runner pod — pod->pod, which `default-deny` dropped, so
every build since the policy landed (2026-11-27 07:13Z) died at
`Get "http://forgejo.forgejo.svc.cluster.local:3000/v2/": request canceled
... Client.Timeout exceeded`.

Add one port-scoped ingress rule: fromEndpoints
`io.kubernetes.pod.namespace: ci-runners` -> 3000/TCP (runner container and
its dind sidecar share the pod identity, so a single namespace selector
covers both). Nothing else in `forgejo` is widened. Rewrite the stale
comment paragraph so the next isolation audit does not re-remove it.
2026-12-05 00:18:13 -05:00
aa8a75bdc6 Merge pull request 'feat(osint): alert when the analyst stops writing briefs' (#90) from feat/osint-analyst-freshness into master 2026-12-05 04:18:44 +00:00
Sirius DevOps
e4b1ac59a9 feat(osint): alert when the analyst stops writing briefs
The 2026-11-25..12-04 outage was invisible: deploy/osint-news-summarizer
stayed Running with restarts 0 and INFO batch lines while article_summaries
froze for nine days, and the scraper kept articles fresh (61.5k rows, newest
within minutes). The app has no /metrics endpoint, so add a small read-only
Postgres exporter and two Prometheus rules.

- osint-analyst-exporter (ns osint): stdlib HTTP server on :9187 serving
  osint_analyst_last_success_timestamp_seconds (max article_summaries.
  batch_timestamp), osint_ingest_last_article_timestamp_seconds (max
  articles.timestamp) and osint_analyst_exporter_up. Runs the pinned
  summarizer image (python3 + psycopg2), non-root, read-only rootfs,
  clusterIP Service + ServiceMonitor (release=kube-prometheus-stack).
- NetworkPolicy: one port-scoped ingress rule, monitoring -> :9187. Nothing
  else in monitoring can reach osint.
- monitoring/controllers/home/osint-analyst.yaml: OsintAnalystStale
  (>1h, 30m, warning, with an absent() arm so a dead exporter cannot read as
  healthy) and OsintIngestAliveButNoBrief (articles <2h old while summaries
  >2h old, 10m, warning). Both route through the default Telegram receiver.
2026-12-04 23:18:20 -05:00
c5578e9a5a Merge pull request 'fix(osint): pin summarizer to a model that still exists' (#89) from fix/osint-summarizer-model into master 2026-12-05 04:04:56 +00:00
Lance Walters
b355e8c16c fix(osint): pin summarizer to a model that still exists
meituan/longcat-2.5:free was retired from the Nous Portal; every map/reduce
call returned 404, chat() swallowed it, and the analyst produced no briefs
after 2025-11-25 (last daily_recap 11-23). The :free ids now demand a user
tag and answer 503 anyway, so pin deepseek/deepseek-v4.1-flash-1017 ($0.03/
$0.12 per Mtok, json_object verified) instead.
2026-12-04 23:04:26 -05:00
Lance Walters
398f9e0ae3 site(lab): pin siriusdevops-site to the /lab rewrite image
The lab.html rewrite merged as 3ac9870aa7637cffb789edcc16b9512d7567886d
(sirius/siriusdevops PR #29); deploy-site run 68 built
siriusdevops-site:3ac9870aa7637cffb789edcc16b9512d7567886d green on that sha.
CI has no cluster credentials, so this pin is what rolls the site Deployment.
deployment-api.yaml is untouched: the API code did not change.
2026-12-04 14:36:34 -05:00
Lance Walters
668011809f fix(netpol): allow cnpg-system operator to read instance status on :8000
The CNPG operator dials each instance's HTTPS status endpoint
(https://<podIP>:8000/pg/status) to derive the system ID and drive
switchover. The tenant isolation added in t_fed52919 opened only
gateway/node/health entities, same-namespace pods and monitoring:9187,
so cnpg-system was denied: forgejo/pg and sirius-growth/portal sat at
Ready=False / ConsistentSystemID=False ('Instance Status Extraction
Error: HTTP communication issue') while their pods served traffic and
automated failover was effectively disabled.

Add one ingress rule to each CNP, scoped to the operator pod label
(app.kubernetes.io/name=cloudnative-pg in cnpg-system) and to TCP 8000
only. Not world, not the whole cluster, not 5432.
2026-12-04 14:25:37 -05:00
7b30c5a4c2 Merge pull request 'fix(backup): pull secret for forgejo/cluster-backup (follow-up to #87)' (#88) from wt/t_9d0428d8 into master 2026-12-04 05:30:26 +00:00
devops
9248f34bd0 fix(backup): add the registry pull secret that forgejo/cluster-backup now needs
The namespace never pulled from the in-cluster registry before (its job used
alpine/k8s from Docker Hub), so the new image reference had no credential and
the pod sat in ErrImagePull. Same SOPS-encrypted dockerconfigjson as the other
namespaces; deviating only in metadata.namespace.
2026-12-04 00:30:16 -05:00
5c46d9b82f Merge pull request 'feat(backup): pinned backup-tools image + egress allow list for the three nightly jobs' (#87) from wt/t_9d0428d8 into master
All checks were successful
backup-image / build (push) Successful in 16s
2026-12-04 05:20:44 +00:00
devops
0acc089dc3 feat(backup): run the three nightly backups from a pinned image with an egress allow list
monitoring/grafana-backup, forgejo/cluster-backup and sirius-growth/leadgen-backup
all ran `apk add --no-cache rsync openssh-client` at container start. Every night
that dialled dl-cdn.alpinelinux.org (Fastly anycast 151.101.x.132:443), which is
what `egress-new-dst` kept reporting, and made the backups depend on the public
internet at 03:00 UTC.

- image: forgejo.siriusdevops.com/sirius/backup-tools, built in CI from
  python:3.12-alpine (pinned by digest) + rsync + openssh-client + bash +
  kubectl v1.36.4 (release sha256 verified at build). Pinned by digest in all
  three CronJobs, no apk in any backup path.
- egress: CiliumNetworkPolicy per backup pod — cluster DNS and 10.10.0.5:22 for
  all three, plus kube-apiserver 6443/443 for cluster-backup only, with an
  explicit deny for `world` (Cilium unions namespace policies, so the allow list
  alone would not restrict a pod inside `forgejo`/`sirius-growth`).
- monitoring gains the registry pull secret it never needed before; the job now
  keeps imagePullSecrets: forgejo-pull (SOPS-encrypted in git).

Schedules, retention, destination paths, entrypoints and RBAC are unchanged.
2026-12-04 00:20:34 -05:00
devops
d44ca50dd1 ci(backup): take the pushed digest from buildx metadata, not imagetools
Forgejo's /v2/token answers 403 to the scope set buildx imagetools uses
(measured on this registry), while push and kubelet pull work. The metadata
file is the authoritative digest of the manifest the registry just accepted.
2026-12-04 00:19:06 -05:00
devops
42b985e07b ci(backup): build a pinned backup-tools image (rsync/ssh/bash/kubectl baked in)
The three nightly backups (grafana-backup, cluster-backup, leadgen-backup)
installed rsync + openssh-client with apk at container start, so every run
depended on the Alpine CDN (Fastly anycast 151.101.x.132:443) and moved the
egress-new-dst alert whenever that anycast address rotated.

This adds the build only; the CronJob pins land in the next commit. Base image
python:3.12-alpine pinned by digest, kubectl v1.36.4 from dl.k8s.io with its
release sha256, amd64 only (all three jobs are nodeSelector'd to siriussec).
2026-12-04 00:15:47 -05:00
32de4e04ef Merge pull request 'feat(rosenpass): wg-remote absent() arm + UPnP mapping metric and alert' (#86) from wt/t_a2c54837 into master 2026-12-03 07:54:07 +00:00
Lance Walters
d1343bbbc3 feat(rosenpass): alert on a vanished Link B series and on the UPnP mapping
Link B (rpi wg-remote <-> linode wg0) depends on a permanent UPnP mapping
UDP 9999 -> 192.168.1.125:9999 for its inbound path, and the 15-minute
rosenpass-upnp.timer only logged to the journal when it could not re-assert
it. Two gaps closed:

* RosenpassPskRotationStalled gains absent(rosenpass_psk_rotation_age_seconds
  {node="rpi", interface="wg-remote"}). Without it a dead metrics timer or
  script on the Pi silently dropped the Link B series while the rule kept
  reading healthy. No siriussec/wg-remote arm: that interface does not exist
  there.

* rosenpass-upnp.sh now stamps its result to /run/rosenpass-upnp.present (1/0)
  and rosenpass-metrics.sh reads that file into rosenpass_upnp_mapping_present
  {node="rpi"} plus rosenpass_upnp_last_check_timestamp_seconds. The 60 s
  metrics timer never calls upnpc (that would poll the IGD 1440x/day); a host
  without the state file (siriussec) emits neither series. New
  RosenpassUpnpMappingLost alert fires on value 0, on a state file older than
  30 minutes (stopped timer / hung IGD, so a stale 1 cannot read healthy), or
  on a missing series.
2026-12-03 02:52:58 -05:00
Lance Walters
5fc7cd4ead docs(rosenpass): commit the Link B host artifacts and the endpoint decision
Link B (rpi wg-remote 10.20.0.2 <-> linode wg0 10.20.0.1) is now under
Rosenpass too. The pieces that only existed on the hosts are committed
here with an install/diagnosis write-up, because all three are runtime
state someone will have to rebuild:

- rosenpass-upnp.{sh,service,timer} - re-assert the permanent UPnP mapping
  UDP 9999 -> 192.168.1.125 every 15 min (the router has no admin panel,
  and a dropped mapping is silent).
- linkb-rollback-{rpi,linode}.sh - the self-cancelling watchdogs; this link
  carries the only SSH path to the linode, so the rollback is local and
  staged on both ends before the far unit starts.
- linkb-verify.sh - hashes each end's PSK and compares them without
  printing key material.

Endpoint strategy recorded: the Pi's public address is residential DHCP
but provably static (IGD uptime since 2026-09-10, ~83 days on the
configured 137.118.156.124), so the linode config pins it and a moved
address is caught by the per-interface rotation-age series rather than by
a sync timer.
2026-12-03 02:46:10 -05:00
Lance Walters
acdfdd7975 fix(rosenpass): per-interface PSK rotation metrics so Link B is observed
rosenpass-metrics.sh hashed wg0 only, so Link B (rpi wg-remote <->
linode wg0) could stall - the Pi's residential public address moving, or
the UPnP mapping for UDP 9999 being dropped - while every Link A series
stayed healthy. Iterate over an interface list, keep one state file per
interface, and emit age/last-change per interface. wg0's series keep the
same names and labels, so existing dashboards and the Link A alerts are
unchanged; RosenpassPskRotationStalled already keys on
(node, interface) and therefore starts covering wg-remote with no rule
change. A host without the interface (siriussec) simply skips it.
2026-12-03 02:43:17 -05:00
2134f5a1d6 Merge pull request 'feat(monitoring): Rosenpass unit-state + PSK-rotation alerts for Link A' (#84) from wt/t_20e420af into master
Reviewed-on: #84
2026-12-03 07:22:41 +00:00
Lance Walters
0abb02a853 docs(rosenpass): record the promtool check/test recipe for the new rules 2026-12-03 02:22:06 -05:00
Lance Walters
5177b13004 feat(monitoring): alert on Rosenpass unit state and stalled PSK rotation
Rosenpass rotates the Link A preshared key (rpi wg0 10.10.0.1 <->
siriussec wg0 10.10.0.2) about every two minutes, but WireGuard keeps
using the last key it received: a dead or wedged exchange leaves the
tunnel up and silently non-post-quantum, with no alerting signal.

node-exporter here is distroless without the textfile collector (and
without the dbus plumbing --collector.systemd needs), so observe the
host directly:

- infrastructure/networking/rosenpass/: POSIX sh script run by a 60 s
  systemd timer on rpi and siriussec that writes
  /var/lib/node-exporter/textfile/rosenpass.prom. It exports
  rosenpass_unit_active, rosenpass_psk_rotation_age_seconds and
  rosenpass_psk_rotation_last_change_timestamp_seconds; the PSK listing
  is only ever sha256'd, never logged or persisted.
- values.yaml: enable --collector.textfile.directory and mount the
  hostPath (DirectoryOrCreate, so linode's node-exporter still starts).
  extraArgs replaces the subchart defaults, so the two filesystem
  exclusions are repeated verbatim.
- rosenpass.yaml: RosenpassDown (5 m) and RosenpassPskRotationStalled
  (age > 900 s, 10 m), both warning, both with absent() arms so a
  missing series alerts instead of reading as healthy.

Host units are installed out of band (see the directory README); the
GitOps side needs a merge before Prometheus loads the rules.
2026-12-03 02:16:30 -05:00
Lance Walters
b909456a3e fix(forgejo): allow anonymous public-repo browsing, block anon registry tokens at CF edge
REQUIRE_SIGNIN_VIEW was the F11 mitigation for ghost-user /v2/token grants,
but it also forced every public repo to a login page. Move the guard to a
Cloudflare custom rule that blocks /v2/token unless the request carries
Basic auth, and turn public browsing back on.
2026-12-01 22:27:47 -05:00
Lance Walters
3010c980ec monitoring(hubble): split ring-buffer reads out of the flow-loss gate
HubbleFlowWindowIncomplete was paging on all three nodes with
perf_event_ring_buffer and observer_events_queue at 0: the gate recorder was
increase(hubble_lost_events_total{source="hubble_ring_buffer"}[30m]), and that
counter also counts *reads* that fall outside the ring's retained window
(cilium#46584, still open in 1.20.1). Two Hubble UI/status reads an hour
(18:27, 18:35, same minutes on every node) moved it +1 each, which kept the
recorder at ~2.01 and the alert true forever. HubbleFlowLossMaterial used the
same recorder, so a handful of reads could also read as 0.03% "loss" on the
quiet Pi node.

- hubble:lost_events_increase_30m is now real loss only, per (node, source):
  increase(hubble_lost_events_total{source=~"perf_event_ring_buffer|observer_events_queue"}[30m]).
  HubbleFlowWindowIncomplete and HubbleFlowLossMaterial read it with unchanged
  thresholds, so they fire only when something was actually dropped.
- hubble_ring_buffer gets hubble:ring_buffer_read_rate_15m and the new
  HubbleRingBufferReadChurn warning at > 0.05 events/s (15m rate, 10m for).
  Current churn is ~0.001/s; the F10 health-probe storm was ~0.2/s.
- Both summaries name the source, so a read is never reported as a dropped
  flow. HubbleFlowSensorMissing unchanged.

No change to hubble.eventBufferCapacity and no Cilium roll. Docs
(docs/hubble-event-loss.md §"The gate") updated with the split and the
measured reason.

Task: t_397d180a
2026-11-27 18:46:35 -05:00
a8b890c55a Merge pull request #83 from wt/t_8aa4af50-kata-docs into master 2026-11-27 07:28:09 +00:00
Sirius DevOps
f73cf7ad82 docs(pod-security): measured cost + pitfalls of the Kata deploy runner
First real runs: deploy-site on the Kata runner 48s (runc baseline 22s/31s),
siriusdevops deploy on the untouched amd64 runner 49s vs 49s. Records the three
measured blockers found converting the runner (virtiofs unix socket needs tmpfs,
domain-threaded guest cgroups forbid --memory on job containers, binfmt is
per-VM) and the Recreate/rollout orphan-run trap.
2026-11-27 02:28:01 -05:00
d7857f10ab Merge pull request 'infra(netpol): default-deny ingress+egress for the six app namespaces' (#82) from wt/t_fed52919 into master 2026-11-27 07:19:43 +00:00
Lance Walters
69b003705c infra(netpol): default-deny ingress+egress for the six app namespaces
Audit F3 / A5-1. Every pod in customer1, osint, sirius-growth, piedmont,
siriusdevops and forgejo was reachable from every other pod, from the API
server, from the internal WireGuard-only Gateway ports on 10.10.0.2 and from
the internet.

- each namespace: a stock NetworkPolicy 'default-deny' (podSelector {},
  Ingress+Egress, no rules) plus a CiliumNetworkPolicy allow that names the
  gateway/kubelet/health entities, same-namespace pods, cluster DNS and only
  the egress each workload actually uses (world for Telegram/news/inference,
  remote-node :3900 for Garage, :22 for the backup rsync, kube-apiserver :6443
  where CNPG/kubectl needs it, none at all for customer1)
- siriusdevops: replaces the egress-only siriusdevops-site-egress CNP
- customer1: ResourceQuota + LimitRange sized from the declared 1-replica
  shape (35Gi already bound, 2 CPU / 4Gi requests) - the sandbox stays parked
- docs/network-isolation.md: the model plus the five gotchas measured while
  landing it (both-ends enforcement, kube-apiserver identity covering the
  whole node IP, remote-node vs world for Garage, ingress vs host identity)
2026-11-27 02:19:10 -05:00
9430ab051c Merge pull request #81 from wt/t_8aa4af50-kata-cgroup into master 2026-11-27 07:17:30 +00:00
Sirius DevOps
d31c0cb82d fix(ci-runners): no per-job memory limit on the Kata deploy runner
Kata's guest cgroup root is 'domain threaded' and only cpuset/cpu/pids are
delegated, so dockerd cannot apply --memory to a job container: every job died
at 'docker run' with
  unable to apply cgroup configuration: cannot enter cgroupv2
  "/sys/fs/cgroup/docker" with domain controllers -- it is in threaded mode
(run 1442, first attempt on the Kata runner). Drop --memory/--memory-swap from
deploy-arm64.toml only; the 2Gi dind limit sizes the microVM, so the blast
radius is unchanged. The runc runners keep their per-job limits.
2026-11-27 02:17:24 -05:00
8956ee362d Merge pull request #80 from wt/t_8aa4af50-kata-tmpfs into master 2026-11-27 07:14:45 +00:00
Sirius DevOps
8915cf92b5 fix(ci-runners): back the Kata dind socket with guest tmpfs
A disk-backed emptyDir is a virtiofs share under Kata, and a unix socket on
virtiofs is visible across the pod but unconnectable: the runner crashlooped on
'cannot ping the docker daemon ... unix:///var/run/docker.sock' although ls -l
showed srw-rw---- root:1000 and the dind sidecar's own 'docker version' on the
same path worked. medium: Memory makes /var/run a tmpfs inside the guest, so the
socket is a real inode for both containers and the existing
'-v /var/run/docker.sock /var/run/docker.sock' job option keeps working.

Verified: the runner declared successfully and polls (deploy-arm64 runner).
2026-11-27 02:14:38 -05:00
e5a0460e53 Merge pull request #79 from wt/t_8aa4af50-kata into master 2026-11-27 07:09:03 +00:00
Sirius DevOps
989a0997fb feat(ci-runners): run the deploy runner in a Kata microVM (staged)
The CI capsule cannot enforce PSA baseline: every nested dockerd needs
SYS_ADMIN+NET_ADMIN in the pod spec and baseline forbids exactly those, which
sysbox, gVisor and Kata all reproduce (measured on both arches, card
t_8aa4af50). What a runtime CAN change is what privileged:true means.

Stage 1, one runner: forgejo-runner-deploy-arm64 (rpi) gets
runtimeClassName: kata-qemu, so its privileged dind and job containers run
inside a QEMU/KVM microVM instead of on rpi's host namespaces. The amd64 and
shared arm64 runners stay on privileged dind under runc, untouched.

Kata-specific plumbing in the same Deployment:
- loop-backed ext4 data-root (16GiB image on the existing claim) because
  overlayfs refuses virtiofs and Docker would silently fall back to vfs;
- binfmt_misc + tonistiigi/binfmt --install amd64 on every start, because the
  guest kernel has no qemu handlers and deploy-site.yml cross-builds amd64;
- the runner waits for /var/run/dind-ready (touched after both are set up).

RuntimeClass kata-qemu is cluster-scoped; the containerd handler lives on rpi
only (/etc/containerd/conf.d/50-kata.toml, kata-static 4.4.0). Rollback is one
field. docs/pod-security.md records the measurement and states plainly that the
namespace stays enforce: privileged.
2026-11-27 02:08:47 -05:00
65b16a82ab Merge pull request 'docs(gateway): fix the rotation filename in the access-log doc' (#78) from wt/t_e662b03a into master 2026-11-27 07:03:21 +00:00
Lance Walters
42bde72f26 docs(gateway): name the real kubelet rotation pattern (n.log.<ts>, not n.log.1)
Observed 2026-11-27T07:02:56Z: 3.log 10,528,075 B -> 3.log.20261127-020256, 29.3 min after the
first access line (28.6 min projected). A plain *.log glob misses rotated files, so the verify and
parse commands use *.log*.
2026-11-27 02:03:14 -05:00
8a2972c57c Merge pull request 'docs(gateway): record the access-log fields, measured volume and rotation window (F7)' (#77) from wt/t_e662b03a into master 2026-11-27 06:56:31 +00:00
Lance Walters
f03f171b34 docs(gateway): record the access-log fields, measured volume and rotation window
Live numbers from a 19.6-minute window after enabling F7: 641 B/line, 9.54
lines/s, 528 MB/day raw (274 MB/day at the 5-day average), 1.008 lines per
request. kubelet's default 10Mi x 5 gives 28.6 min per file / ~2.4 h total at
the measured rate (50 MiB hard cap = 0.023% of the 213.5 GiB root); Loki stores
the same traffic at 12.6x compression (42 MB/day, ~340 MB for 192 h), so the
kubelet default is kept.

Also records the wedge that made the first apply look inert: the operator's
gateway controller had failed to init during an earlier apiserver restart, so
GatewayClassConfig changes produced nothing until the operator was restarted.
2026-11-27 01:56:21 -05:00
Lance Walters
3dae4d06a9 refactor(monitoring): one CI_RUNNERS_NS constant for the forgejo-runners pod panels
The runner pod/PVC/Deployment targets on the forgejo-runners board belong to
namespace ci-runners (the CI capsule moved there so forgejo can enforce PSA
baseline), while the cnpg_actions_* queue/jobs targets belong to the forgejo
*database*. aec63c4 fixed the namespace by hand in eight places; this replaces
those literals with one CI_RUNNERS_NS constant fed into RUN, the replicas_ready
stat and the dind PVC stat, and documents the two-namespace split in
docs/monitoring-dashboards.md so the next move is a one-line change.

Regenerated with build.py: forgejo-runners.yaml is byte-identical to the
committed file (no behaviour change, no other board touched). Note the name is
CI_RUNNERS_NS, not RUNNER_NS - RUNNER_NS is already the Loki selector
constant in this script.

validate_panels.py against Prometheus: 55/55 targets OK, 0 empty. On this
board: Runner pods Ready=3 (1 series), restarts 6 series over the three pods,
CPU/mem/net 3 series each, dind PVC 20Gi.
2026-11-27 01:37:39 -05:00
81d35955aa Merge pull request 'infra(gateway): enable Envoy HTTP access logs for the Cilium GatewayClass (netsec F7)' (#76) from wt/t_e662b03a into master 2026-11-27 06:30:59 +00:00
Lance Walters
1caaae9a63 infra(gateway): enable Envoy HTTP access logs for the Cilium GatewayClass
Finding F7: cilium-envoy emitted no request-level record, so the netsec
design's application-layer rules had no input stream.

CiliumGatewayClassConfig kube-system/cilium binds spec.telemetry.accessLogs
(JSON, HTTP target) to the cilium GatewayClass via spec.parametersRef, so
Cilium renders an access log into every Gateway listener's HTTP connection
manager and writes one JSON line per request to the cilium-envoy container
stdout (/var/log/pods/kube-system_cilium-envoy-*/cilium-envoy/*.log).

Fields are an explicit allowlist: method, path, response code/flags, duration,
bytes, authority, CF-Connecting-IP (real client, since Envoy is hostNetwork
behind cloudflared), X-Forwarded-For, peer, User-Agent, CF-Ray, upstream host.
No bodies, no header dumps: Authorization/Cookie never reach disk. Application
log level stays info (no debug/trace).
2026-11-27 01:30:39 -05:00
588c17a3e4 Merge pull request 'monitoring(forgejo): make the actions_runners metric duplicate-proof' (#75) from wt/t_290ff037 into master 2026-11-27 06:29:35 +00:00
Lance Walters
466161f87a monitoring(forgejo): make the actions_runners metric duplicate-proof
The CNPG exporter answers the whole /metrics request with HTTP 500 when a
custom query emits two rows with the same series name + label set, which
also drops every pg_stat_*/cnpg_pg_* series (Prometheus target down).

action_runner held three rows named siriussec-amd64 (one live, two
soft-deleted tombstones from the runner renames), so
cnpg_actions_runners_last_online_seconds was collected twice and the
endpoint returned 500.

- WHERE r.deleted IS NULL -> ignore Forgejo's soft-deleted runner rows.
- GROUP BY r.name with max(last_online) -> the label is the name, so a
  duplicate name can never produce a duplicate series again; reporting the
  most recent poll per name is the intended semantic.
- label cnpg.io/reload -> the instance manager re-reads the queries on
  change instead of needing a pod restart (or kubectl cnpg reload) before
  a query fix takes effect.
2026-11-27 01:29:18 -05:00
f625fcfc05 Merge pull request 'monitoring(logs): a readable Loki — Logs dashboard + provisioning-reload fix' (#74) from wt/t_050d5bb8 into master 2026-11-27 06:23:31 +00:00
Lance Walters
6b91152a79 monitoring(logs): a readable Loki — Logs dashboard + provisioning-reload runbook
The log store shipped in t_34ddaa83 but nothing could read it: the Loki datasource
ConfigMap was live and written into Grafana's provisioning volume, and Grafana still
listed only Prometheus + Alertmanager. Root cause was not the ConfigMap. The
datasource sidecar writes the file and then POSTs
/api/admin/provisioning/datasources/reload with monitoring/grafana-admin, which was
401-ing because Grafana's DB password had drifted from that Secret (the documented
"the Secret is only the seed" behaviour) — Grafana reads provisioning/datasources
only at startup, so the datasource never loaded.

- Reset the live admin password to the Secret's value (in-pod `grafana cli
  admin reset-admin-password`, value read from the Secret and never printed), so
  seed and DB match again and the sidecar's reload returns 200. Documented in
  docs/grafana-persistence.md, including the sidecar consequence of drift.
- New generated dashboard `logs` (uid: logs) with the two queries worth having:
  secret access over time by user from the apiserver audit stream, and pod errors
  by namespace, plus the runner namespaces and a note panel on field names.
- The audit stream's names are the Alloy allowlist's, not the audit event's:
  objectRef.resource arrives as the stream label `resource` and user.username as
  the field `user`. `| json | objectRef_resource="secrets"` returns 0 rows
  (measured); the panels use `resource="secrets"` in the selector + `| json` for
  the user dimension. No pipeline, retention or filter change.
- Runner panels discover their namespace via a `runner_ns` variable
  (.*(runner|forgejo).*) instead of pinning one name, so the t_2bbe34a8 move to
  ci-runners needs no edit here.
- validate_panels.py now dispatches on the target's datasource and queries Loki
  for `loki` panels (a logs panel must return rows, not just series).
2026-11-27 01:23:05 -05:00
2ae67faf98 Merge pull request 'ci(runners): name the CI capsule ci-runners; privileged warn/audit' (#73) from wt/t_2bbe34a8-rename into master 2026-11-27 06:21:07 +00:00
Lancelot
aec63c4d56 ci(runners): name the CI capsule ci-runners and mark it privileged in warn/audit too
Renames the namespace introduced in #72 (`forgejo-runners` -> `ci-runners`) per
the orchestrator decision on card t_2bbe34a8, and sets the capsule's
warn/audit levels to `privileged` alongside `enforce: privileged`: everything
in it is allowed by design, so restricted-level warnings on every pod restart
would be noise, and the intent is explicit in Git rather than implied.

Storage is the same three PVs, rebound again by name (Retain + cleared
claimRef), so the runner registration uuids, dind image sets and action caches
survive: verified before/after (uuids 91124ee3/4e07c1e9/a41aad73, image counts
19/2/31, canary files intact). Monitoring selectors and docs follow the new
namespace; the Grafana dashboard keeps its `forgejo-runners` uid.
2026-11-27 01:20:56 -05:00
77041b35ac Merge pull request 'ci(runners): isolate the CI capsule in forgejo-runners, enforce baseline on forgejo' (#72) from wt/t_2bbe34a8 into master 2026-11-27 06:15:44 +00:00
Lancelot
3d21e96a9c ci(runners): isolate the CI capsule in forgejo-runners, enforce baseline on forgejo
The three Actions runners (privileged dind sidecars) and the nightly prune
CronJob (hostPath /var/run/docker.sock) cannot live under PSA baseline, so
they move to their own namespace `forgejo-runners` with `enforce: privileged`
(plus warn/audit restricted). That lets `forgejo` — Forgejo, CNPG Postgres,
cluster-backup — enforce `baseline` instead of only warning.

The dind sidecars stay privileged: measured on these nodes, a non-privileged
pod cannot host a container runtime (cgroup fs is mounted ro; rootless dind
cannot mount procfs; procMount=Unmasked needs hostUsers=false where subuid
maps and /dev/net/tun are refused). See docs/pod-security.md.

- PVCs/PVs are reused, not recreated: the two static Retain PVs on rpi and the
  dynamic local-path PV on siriussec were rebound by name, so runner.ini
  (registration uuid), the dind data-root and the actions cache survive.
- prune CronJob + its SA/Role/RoleBinding/configmap move with the runners;
  NAMESPACE and the Role scope follow.
- monitoring: runner/prune queries and runbooks now select forgejo-runners;
  cnpg_actions_* panels keep namespace="forgejo" (that is the pg namespace).
- docs: pod-security.md rewritten for the two enforced namespaces.

Verified live: all three runners 2/2 Running in forgejo-runners with their
original registration uuids and image counts, forgejo rejects a privileged pod
at admission, and a real CI image build completes (see the card).
2026-11-27 01:15:07 -05:00
0fdd918875 Merge pull request #71: netsec(collector): gzip on rotate so 960 MiB holds ~72-100 h of flows 2026-11-27 06:10:18 +00:00
Lance Walters
7e42ad6d1c netsec(collector): gzip on rotate so 960 MiB holds ~72-100 h of flows
The collector wrote 150 MiB plaintext files into a directory capped at 960 MiB,
which bought only ~4-5 h of retention at the measured 4.5-6.2 GB/day
(3380-4280 kB/min) of filtered Hubble JSONL — the cap was sized for a forensic
window, not for hours.

Compress on rotate; no schema change, no filter change, no DS argument change:

* the file being appended stays plain `flows-<ts>-<n>.jsonl` (one file for a
  reader to tail);
* on rotation the closed file is gzip'd to `.jsonl.gz` through a temp name +
  atomic rename, in the background, so a reader never sees a partial archive and
  the flow reader never stalls (stalling it makes the agent drop events);
* prune bounds the WHOLE directory at MAX_TOTAL_BYTES = 960 MiB — archives and
  in-flight `.gz.tmp` included — deleting oldest first, and never reaps the live
  file nor a file whose gzip is still running (that would discard the archive
  and lose the entire file);
* MAX_FILES now bounds plain files only. Applying it to the archives is exactly
  what would keep retention at a few hours.

Measured on this node's live data 2026-11-27: 18.53x ratio at gzip -9
(17.85x at -6), i.e. 960 MiB holds 72.6 h at the 6.16 GB/day burst sample,
92 h at 4.87 GB/day and ~100 h at the 4.48 GB/day 55-minute average.

Verified offline against a replaying fake `hubble` (rotation->archive parity,
gzip -t on every archive, atomicity, oldest-first prune, live-file and in-flight
protection) and inside the real cilium image under dash (23 rotations -> 23
valid archives, no loss).
2026-11-27 01:09:57 -05:00
9979cf5e49 Merge pull request 'ci(runners): re-own the actions cache recursively' (#70) from ci/t_29249bf0-runner-cache-reown 2026-11-27 06:08:56 +00:00
sirius
a6499bf1c2 ci(runners): re-own the actions cache recursively so uid-1000 jobs stop dying in checkout
The fix-data-perms init container guarded a chown -R behind a TOP-LEVEL owner
check (`stat -c %u /data/.cache`). /data/.cache was already 1000 while the git
pack files inside it were still root:root from the pre-uid-1000 runner, so the
guard skipped exactly the file that matters and every job on that runner died
in actions/checkout, before a single step:

  open /data/.cache/act/actions-checkout@v4/.git/objects/pack/pack-ba0cccfe….pack:
  permission denied

That is a 3 s red X with zero steps on a push (websites run 1430, card
t_29249bf0). chown the three trees the runner writes recursively instead
(cache/, .cache/, runner.ini); /data/docker stays root-owned and unwalked.

Also document the Recreate consequence: a template rollout SIGKILLs in-flight
jobs and Forgejo reports them as a plain failure with the log cut off mid-step
(sirius-growth push run 1422: 14 min red, log ending at 'Fetching the
repository').
2026-11-27 01:08:34 -05:00
464b9822b0 Merge pull request 'docs(logging): audit source, corrected measurements, pitfalls, acceptance evidence' (#69) from wt/t_34ddaa83 into master 2026-11-27 06:06:14 +00:00
Lance Walters
e307f9dfd2 docs(logging): audit source, corrected measurements, pitfalls and acceptance evidence
- audit log section: allowlist fields, the two-retention-policies note, and the
  05:52-05:58 UTC incident (stage.pack leaked _entry; fixed, purged by wiping
  the PVC and resetting positions).
- measurements: 7.0x compression on the fresh store; two regimes (quiet 360
  MB/day, osint crawl 3.2 GB/day raw) -> <=3.7 GiB over 192h against an 8Gi PVC.
- pitfalls that cost real time: alloy validate does not catch component build
  errors, stage.json is JMESPath, stage.pack keeps _entry, file source needs an
  explicit timestamp stage, alloy positions path permissions.
- acceptance evidence: the real 7-day lines, per-source retained depth (incl.
  the honest 5d9h pod-log ceiling) and the restart test.
- alert threshold: 200 kB/s (was 12 MiB/s, which was ~50x too lax to mean
  anything against an 8Gi PVC).
2026-11-27 01:06:11 -05:00
cf8863df5c infra(garage): let cluster pods on rpi reach the S3 endpoint (#68) 2026-11-27 06:01:32 +00:00
3241eaba1c Merge pull request 'docs(audit): record the read/write split evidence and the pre-split purge' (#67) from t_d1275a3a-secret-read-metadata into master 2026-11-27 05:58:40 +00:00
Lance Walters
723462f390 docs(audit): record the read/write split evidence and the pre-split purge
Live proof from the fresh audit.log after the apiserver reload (policy 9f07d333):
263 read verbs all Metadata with 0 responseObject/0 data, 76 write verbs all
RequestResponse with requestObject; plus the throwaway-probe create/patch/update/
delete ladder. Documents the purge: pre-split files (39 MB .gz + 15 MB moved live
file) deleted, oldest remaining file is the fresh audit.log.
2026-11-27 00:58:12 -05:00
b269e729fd Merge pull request 'sops: decrypt on every Flux Kustomization + static guard against the silent ENC[...] trap' (#66) from wt/t_0fe36052 into master 2026-11-27 05:57:53 +00:00
Lance Walters
eea80f475e sops: decrypt on every Flux Kustomization + static guard
`spec.decryption` is opt-in per Flux Kustomization, and a secret-*.sops.yaml
under a tree without it is still valid YAML: Flux applies the Secret with
literal ENC[AES256_GCM,...] values and reports success. The Secret is green and
wrong, and the first symptom is an auth failure days later that looks nothing
like a git problem. Only `apps` and `monitoring` had the block; the other six
trees were a trap for the next person to add a Secret there.

- add decryption: {provider: sops, secretRef: sops-age} to cert-manager,
  databases, gateway-api-crds, infrastructure, logging and flux-system
  (8/8 Kustomizations now decrypt; harmless where no encrypted files exist)
- scripts/check-sops-decryption.py + `make check-sops`: static guard that reads
  the live sync path from gotk-sync.yaml, walks each Kustomization's kustomize
  resource graph, and fails when a *.sops.yaml file is under a tree whose owner
  cannot decrypt, is under no reconciled tree, or is not actually encrypted
  (also catches `flux bootstrap` regenerating gotk-sync.yaml without the block)
- .gitattributes marks *.sops.yaml with diff=sopsdiffer; docs/secrets-sops.md
  explains the opt-in trap, the eight Kustomizations and the guard

No secret contents, recipients or keys touched.
2026-11-27 00:57:31 -05:00
44a765452b Merge pull request #65: contact APIs: pin the F13 images 2026-11-27 05:57:29 +00:00
Sirius DevOps
0e738be671 contact APIs: pin the images carrying the F13 bounded _hits fix
All three contact APIs were still running the pre-F13 tree: unbounded
per-IP _hits deque and an unvalidated X-Real-IP limit key.

- siriusdevops-contact:467b087 (CI run 64 at the F13 merge 467b087)
- sirius-growth-contact:97cfa4f (main head = F13 merge 3042edc + the
  deploy-contact buildx fix f3a9cae; run 126 job 2074)
- phs-contact:0446be8 (main head = F13 merge bd64105 + buildx fix
  0d6d5e3 + the phs Telegram HTML fix 64f1b5b; run 126 job 2075)

The two latter merge shas had no image: their build failed on
'could not obtain buildx' until the workflow fix, so the pinned tags are
the current heads, which contain the F13 tree.
2026-11-27 00:57:17 -05:00
2fbea59ddc Merge pull request 'fix(logging): build the audit line from a JMESPath allowlist (pack leaks _entry)' (#64) from wt/t_34ddaa83 into master 2026-11-27 05:56:11 +00:00
Lance Walters
78f94ab85e fix(logging): build the audit line from a JMESPath allowlist, never pack the raw record
stage.pack embeds the original line under `_entry`, so the first cut wrote
responseObject.data (plaintext secrets) into Loki anyway. Replace pack with a
single JMESPath multi-select hash + stage.output: the emitted line contains
exactly the allowlisted keys and nothing else, with proper JSON escaping.
Verified end-to-end against a synthetic record carrying data.password using
loki.echo: 0 occurrences of the value, labels resource/verb still present.
2026-11-27 00:56:07 -05:00
e9dbbbfbcd Merge pull request 'docs(hubble): record the measured post-change numbers as-read (F10)' (#63) from docs/hubble-event-loss-numbers into master 2026-11-27 05:54:21 +00:00
Lance Walters
fbae50530a docs(hubble): record the measured post-change numbers as-read (F10)
Memory table now uses the 34 min steady-state sample (333.8/297.1/213.1 MiB
against 330.2/309.1/194.5 before the roll), and the verification block carries
the actual 30 min window result: rate and increase both 0 on all three nodes,
counters flat at 31/31/30 for 30 min with the linode and siriussec rings 100%
full.
2026-11-27 00:54:14 -05:00
50ee0d23f4 fix(f6): re-own the actions cache for the uid-1000 runner (#62) 2026-11-27 05:52:49 +00:00
fee8e90831 Merge pull request 'fix(logging): sourceIPs[0] in the audit JMESPath' (#61) from wt/t_34ddaa83 into master 2026-11-27 05:52:06 +00:00
Lance Walters
d65296c92a fix(logging): sourceIPs[0] in the audit JMESPath (Alloy stage.json uses JMESPath, not GJSON) 2026-11-27 00:52:02 -05:00
9f07d3330c Merge pull request 'audit(policy): drop bodies for secret reads, keep them for writes' (#60) from t_d1275a3a-secret-read-metadata into master 2026-11-27 05:49:32 +00:00
88f3fe1cd0 Merge pull request 'infra(logging): ship kube-apiserver audit log with secret bodies stripped' (#59) from wt/t_34ddaa83 into master 2026-11-27 05:49:15 +00:00
Lance Walters
09faa710c7 audit(policy): drop bodies for secret reads, keep them for writes
The log was a second plaintext copy of every secret that had been read: of 3,527
secret events on the live log, 2,574 carried .data in responseObject (1,606 were
plain get). A get is fully described by objectRef + user + sourceIPs +
responseStatus; the body adds a credential and no forensic value, and root reading
the root-only log produces no audit event at all.

- rule 4a: secrets get/list/watch -> Metadata
- rule 4b: secrets create/update/patch/delete/deletecollection -> RequestResponse
  (the tampering verbs; the body there is the evidence)
- everything else untouched: pods/exec, tokenreviews, RBAC/cert writes, proxies

docs: rule table, read/write rationale, sensitivity + purge notes.
2026-11-27 00:49:13 -05:00
Lance Walters
fef71a280a infra(logging): ship kube-apiserver audit log with secret bodies stripped
t_104f62a6 made the apiserver audit log live on siriussec:
/var/log/kubernetes/audit/audit.log, mode 600 root, ~2.2 GB/day, rotated by the
apiserver itself (100 MB x 48, compressed). A pod-log collector never sees a
host file, so Alloy gets a read-only hostPath mount for that directory.

The file MUST NOT be shipped verbatim: at level=RequestResponse every
'get secrets' record carries responseObject.data — the plaintext secret.
The shipper therefore parses each record and re-emits a packed allowlist
(level, stage, verb, user, objectRef.*, responseStatus.code, sourceIPs[0],
userAgent, auditID, requestURI, requestReceivedTimestamp). requestObject and
responseObject never reach Loki; unparseable lines are dropped by stage.json
rather than passed through.

Nothing in that directory is written or pruned by the collector: the
apiserver's own 4.8 GB / 7-day rotation stays the only thing pruning it.
2026-11-27 00:49:07 -05:00
a8534bae42 fix(f6): fix-data-perms must run as root; PSA labels for logging + cnpg-system (#58) 2026-11-27 05:48:40 +00:00
da5530200e Merge pull request 'fix(forgejo): restore the initContainers key #54 lost (unblocks the apps Kustomization)' (#57) from fix/runner-arm64-initcontainers into master 2026-11-27 05:46:40 +00:00
c1d29ad87a fix(forgejo): restore the initContainers key #54 lost, unblocking the apps Kustomization
#54 (secops F6) inserted the new fix-data-perms init container at the
tolerations list indentation instead of under an initContainers key, and dropped
the key itself. YAML still parsed (a list item with name/image/... is just a
malformed toleration), so the merge was green, but the API rejects it:

  Deployment.apps "forgejo-runner-arm64" is invalid:
  spec.template.spec.tolerations[1].operator: Invalid value: "": operator must
  be Exists when key is empty

That failed the dry-run of the whole apps Kustomization, so nothing in
apps/home could be applied at all - including any secret rotation - until it was
fixed. Nothing was pruned or broken in the cluster: the rejected revision never
applied.

Restores the initContainers: key above the block; the container's own body is
untouched, so F6's intent (re-own the PVC as 1000:1000 instead of chmod 666 on
the dind socket) is preserved.

Verified: the file parses to tolerations=[dedicated/Equal/network/PreferNoSchedule],
initContainers=[fix-data-perms], containers=[dind, runner]; server-side dry-run of
this Deployment succeeds; server-side dry-run of all 116 non-Secret objects in
apps/home reports no errors.
2026-11-27 00:46:30 -05:00
35610c8d13 Merge pull request 'infra(logging): drop osint scrapy item payloads so 8 days fits the PVC' (#56) from wt/t_34ddaa83 into master 2026-11-27 05:45:51 +00:00
Lance Walters
4a933a0403 infra(logging): drop osint scrapy item payloads so 8 days fits the PVC
Measured during a crawl (2026-11-27 04:45-05:45Z): osint/news-scraper produced
~150 MB/h, 88 % of it one JSON item dump per crawled article (up to 4.7 kB per
line, the same rows are in the osint Postgres DB). At the observed 2.9x
compression that is ~10 GB over 192h and would not fit the 8Gi PVC, so drop
exactly those lines by prefix for that one container. Operational lines
(INFO/WARNING/ERROR, tracebacks, duplicate-URL warnings) still ship.

docs/logging.md: document the drop rule and the two measured regimes.
2026-11-27 00:45:42 -05:00
ec6e7436c0 Merge pull request 'docs(secrets-sops): sops-age exclusion + tested audit query' (#55) from secrets/sops-docs into master 2026-11-27 05:43:26 +00:00
3d6c8b4855 docs(secrets-sops): record flux-system/sops-age as an exclusion and add a tested audit query
* sops-age is the one Secret that by definition cannot be in git; it was missing
  from the exclusion table even though the key-location table covers it.
* replaces the placeholder reconciliation snippet with one that was actually run:
  it prints 77 live = 35 in git + 42 excluded, matching the table line for line,
  with nothing in git absent from the cluster.
2026-11-27 00:43:20 -05:00
cb387a8121 secops(f6): de-privilege CI job containers + runner uid, add Pod Security labels (#54) 2026-11-27 05:42:39 +00:00
9822647bf9 Merge pull request #53: osint: pin app image to amd64-6066ac8e0d6c 2026-11-27 05:41:22 +00:00
Lance Walters
584036631d osint: pin app image to amd64-6066ac8e0d6c (PR #71, openapi adminSession scheme)
The FastAPI app now publishes components.securitySchemes.adminSession
(apiKey/in:cookie/osint_session) and stamps security on every documented
operation from auth.is_public(). Merged as 6066ac8e0d6c in
sirius/osint-dashboard (PR #71); CI pushed
forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-6066ac8e0d6c
(digest sha256:bf5f3d4ffbb7ae8cbe54fcf5f5b81cd5a1815d8abf9e042c2804f5a2d207ae6c).

The live /openapi.json keeps advertising no securitySchemes until this tag
is running, which is what F17 flagged.
2026-11-27 00:41:02 -05:00
8619a8f07d Merge pull request 'infra(logging): Loki single-binary + Alloy DaemonSet with 192h bounded retention (F4)' (#52) from wt/t_34ddaa83 into master 2026-11-27 05:37:13 +00:00
Lance Walters
179257d8fb infra(logging): Loki single-binary + Alloy DaemonSet, 192h bounded retention (F4)
No log store existed: pod logs were kubelet files on the node and died with the
pod (~8h deepest history for a busy workload). Adds:

- Loki 3.7.1 single-binary (1 Deployment + 8Gi local-path PVC on siriussec),
  retention_period 192h with the compactor deleting on filesystem, ingest rate
  limits, so the store is time- and rate-bounded.
- Alloy 1.13.0 DaemonSet (all nodes, no RBAC, no API access) shipping
  /var/log/pods, /var/log/journal and the Pi's docker json logs. File sources
  read from byte 0 and stamp the timestamp from the line, so the history the
  nodes already held (18d cilium on linode, 31d registry on rpi) landed on day
  one instead of starting the 7-day clock at deploy time.
- Grafana datasource (uid loki) via the existing sidecar, ServiceMonitor,
  ingest-rate guard rule.
- docs/logging.md with the measured bytes/day, the 8-day projection and the
  runbook.

Measured: ~360-502 MB/day raw -> ~90 MB/day compressed, 192h -> <=0.8GiB, on a
node with 103GiB free (house floor 32GiB). Verified 7-day-old lines return for
kube-system cilium-agent and for the siriussec/linode journals, and survive a
Loki pod restart (PVC).
2026-11-27 00:36:56 -05:00
d7de2674a2 Merge pull request 'secrets: add the four monitoring SOPS files (F12 part 2, fix)' (#51) from secrets/sops-fix into master 2026-11-27 05:36:29 +00:00
6a506a37c6 secrets: add the four monitoring SOPS files their kustomization already lists (F12 part 2, fix)
#50 added monitoring/controllers/home/kustomization.yaml entries for
secret-grafana-admin / secret-grafana-secret-key / secret-alertmanager-telegram /
secret-cluster-backup-ssh but the four ciphertext files were not staged, so
kustomize build failed with 'no such file or directory' on the first entry and the
monitoring Kustomization went BuildFailed/ProgressingWithRetry (nothing was
applied or pruned — a failed build leaves the last applied state untouched —
so Grafana/Alertmanager never stopped).

Adds the missing files. Each was generated from the live object and decrypts to a
byte-identical data map, so the apply is a no-op.
2026-11-27 00:36:23 -05:00
b22239a6aa Merge pull request 'secrets: SOPS the backup SSH key + monitoring's hand-made Secrets (F12 part 2)' (#50) from secrets/sops-part2 into master 2026-11-27 05:30:37 +00:00
a4cc2d87bc secrets: SOPS the backup SSH key and monitoring's hand-made Secrets (F12, part 2)
Completes F12 on the objects deliberately held back until the delete-and-reconcile
drill on siriusdevops/siriusdevops-contact had proved the path works (it did:
deleted 05:29:03Z, recreated by Flux 05:29:05Z, byte-identical, pod restarted off
the recovered Secret and /health 200 — see docs/secrets-sops.md).

* cluster-backup-ssh in forgejo, sirius-growth and monitoring — three files, one
  plaintext ed25519 key: a Secret cannot cross namespaces and each backup
  CronJob mounts its own namespace's copy, so all three must exist and all three
  must be rotated together.
* monitoring/grafana-admin, monitoring/grafana-secret-key and
  monitoring/alertmanager-telegram, which are the *inputs* the prometheus-operator
  and Grafana consume; the operator's rendered prometheus-*/alertmanager-* objects
  stay excluded (a second writer would fight it).
* monitoring Kustomization gains the same sops decryption block as apps.

All six files were generated from the live objects and decrypt to a byte-identical
data map and type, so this apply is a no-op.
2026-11-27 00:30:24 -05:00
f2c6de0ccb Merge pull request 'controlplane: audit — full bodies for secret writes, metadata only for list/watch' (#49) from controlplane/apiserver-audit into master 2026-11-27 05:28:27 +00:00
Lance Walters
2c7eab2b0b controlplane: audit — full bodies for secret writes, metadata only for list/watch
Measured on the live cluster: the 22.8 GB/day burst was driven by `list secrets`
(1.9 MiB per event — every secret in the namespace) and by helm-controller
rewriting its release blobs. Only list/watch give up their bodies now, so
"who rewrote this secret, and to what" stays reconstructable; steady state is
0.79 GB/day / ~420 events/min, i.e. ~6 days inside 48 x 100 MiB.

Re-verified after the change: create secret (server dry-run) records
requestObject.data; get/patch behave the same.
2026-11-27 00:28:24 -05:00
7e5c9233ec Merge pull request 'docs: Hubble event-loss root cause, ring-depth change and the detector gate (F10)' (#48) from docs/hubble-event-loss into master 2026-11-27 05:25:41 +00:00
Lance Walters
6b44c2adf9 docs: Hubble event-loss root cause, ring-depth change and the detector gate (F10)
Records why hubble_lost_events_total{source="hubble_ring_buffer"} was
climbing with nothing dropped (backwards ring walk in getFlowRate hitting the
read boundary, cilium#46584), the 16383 capacity that covers the 60 s walk at
the 24 h peak on every node, the measured memory delta per node, the one-node-
at-a-time rollout, and the gate contract that a 30 min window with any loss may
not be reported as clean — with the alert/recorder names that enforce it.
2026-11-27 00:25:32 -05:00
ce13f756f9 Merge pull request 'docs(registry): rotate/add registry pull secrets through SOPS' (#47) from docs/registry-sops into master 2026-11-27 05:23:05 +00:00
1647f35ce0 docs(registry): rotate/add-namespace via the SOPS files, not kubectl
PR #45 landed the forgejo-pull Secrets as SOPS ciphertext in git while this doc
still described them as out-of-band. A kubectl apply of a new Secret is now
reverted by the next apps reconcile, so the rotation and add-a-namespace
recipes go through the encrypted file. Also records that the registry-reader
token is non-expiring and that a rotated value is picked up on the next pull.
2026-11-27 00:22:56 -05:00
5646572eaf Merge pull request 'controlplane: enable kube-apiserver audit logging (audit F1)' (#46) from controlplane/apiserver-audit into master 2026-11-27 05:20:37 +00:00
Lance Walters
f9d2594fe9 controlplane: enable kube-apiserver audit logging (audit F1)
The apiserver ran with no --audit-* flags at all: secret reads, pods/exec,
RBAC writes and serviceaccounts/token minting left no record anywhere.

- /etc/kubernetes/audit/audit-policy.yaml: RequestResponse for secrets
  get/write, pods/exec|attach|portforward, serviceaccounts/token, rbac.*,
  certificates.*, impersonate; Metadata for list/watch/update of secrets and
  for everything else (that split is what keeps 22.8 GB/day down to 2.5).
- static-pod flags: --audit-policy-file, --audit-log-path (JSON, 100 MiB x 48,
  maxage 7, compressed) + hostPath mounts for the policy dir and the log dir.
- install-audit.sh: idempotent, byte-identical re-application after a
  kubeadm upgrade silently regenerates the manifest (Flux does not own it).
- docs/kube-apiserver-audit-logging.md: design, measured volume, sensitivity
  (the log holds secret bodies), verify commands and rollback.
2026-11-27 00:20:29 -05:00
566834b5fb Merge pull request 'secrets: bring 29 hand-made cluster Secrets under Git via SOPS/age (audit F12)' (#45) from secrets/sops into master 2026-11-27 05:18:28 +00:00
c8f0834886 secrets: bring 29 hand-made cluster Secrets under Git via SOPS/age (audit F12)
Nothing in the cluster was reconciled from the repo: 67 hand-made Secrets and no
managed Secret at all, so a restore of this Git tree produced a cluster that would
not start. This commits the first-party ones as SOPS/age ciphertext and enables
Flux's sops decryptor.

* provider: SOPS + age (chosen over SealedSecrets: Flux already ships the sops
  decryptor, so no extra controller/CRD, and the age key is escrowed off-cluster).
* 29 Secrets across forgejo, siriusdevops, piedmont, sirius-growth, osint,
  metabase and customer1, as apps/base/<ns>/secret-<name>.sops.yaml with
  encrypted_regex ^(data|stringData)$ — names/namespaces stay reviewable.
* each file was generated from the LIVE object and decrypts to a byte-identical
  data map and type, so the first apply is a no-op (not a rotation).
* the CNPG bootstrap secrets (forgejo-pg-app, pg-app, sirius-growth-portal-db)
  are ours, not operator output — bootstrap.initdb.secret points at them, so a
  rebuild has no application password without them.
* forgejo-pull is included despite docs/registry-pull-auth.md calling it
  out-of-band: with imagePullSecrets on every workload it is the one Secret whose
  absence stops the whole cluster from pulling images.
* .gitignore keeps **/*secret*.yaml ignored and re-includes only .sops.yaml, so a
  plaintext Secret still cannot be committed; age.agekey stays ignored.
* excluded on purpose (controller/helm-owned): CNPG *-server/*-replication/*-ca,
  cnpg-system CA+webhook, cert-manager webhook CA, cilium/hubble certs, helm
  release records, prometheus-operator rendered prompts. Full table in
  docs/secrets-sops.md.

Key locations (never in git): Secret flux-system/sops-age (age.agekey) and
/root/sops/homek8s-age.key on the Linode, reached only over the mesh.
2026-11-27 00:18:14 -05:00
43353e9aa0 Merge pull request 'networking(hubble): deepen the event ring to 16383 flows and gate detection on loss (F10)' (#44) from netsec/hubble-event-loss into master 2026-11-27 05:17:26 +00:00
Lance Walters
8f98509c8f networking(hubble): deepen the event ring to 16383 flows and gate detection on loss (F10)
hubble_lost_events_total{source="hubble_ring_buffer"} was climbing at a
constant 12/min on siriussec (72,529 cumulative) and ~4/min on linode with
nothing dropped: Ring.read() synthesises a HUBBLE_RING_BUFFER lost event when
a backwards walk reaches the ring's read boundary, and getFlowRate() walks a
full minute on every hubble status / 5 s health probe / UI request. At
siriussec's ~80 flows/s the 4095-event default only holds ~51 s, so every
probe hit the boundary (cilium#46584).

16383 holds >= 60 s at the 24 h peak on every node (linode 196 flows/s ->
83 s, siriussec 101/s -> 161 s, rpi 38/s -> 431 s), so the walk exits on the
timestamp check instead. Ring accepts 2^n-1 only.

Also wire the sensor gate: recorders hubble:lost_events_increase_30m /
hubble:flows_processed_increase_30m, alert HubbleFlowWindowIncomplete when a
30 min window has any loss (a lossy window may not be reported as clean),
HubbleFlowLossMaterial above 0.1% of processed flows, and
HubbleFlowSensorMissing when the counters disappear entirely.
2026-11-27 00:16:47 -05:00
99cc3313f2 Merge pull request 'registry(auth): require authentication for image pulls (F11)' (#43) from fix/registry-anon-pull into master 2026-11-27 05:15:38 +00:00
bc942e2571 registry(auth): require auth for image pulls (audit F11)
Forgejo 16 mints an anonymous ("ghost user") registry token on /v2/token and
grants it Read on every package regardless of repo visibility, so all 18 app
images were world-downloadable — including images of private repos
(siriusdevops-site, phs-site, sirius-growth-*, sgs-leadgen).

* FORGEJO__service__REQUIRE_SIGNIN_VIEW=true: /v2/token answers UNAUTHORIZED
  to anonymous clients, anonymous manifests get 401. This is the documented
  switch in routers/api/packages/container (Authenticate) and
  services/context/package.go (determineAccessMode). Side effect: the Forgejo
  web UI/API becomes login-only for anonymous visitors.
* imagePullSecrets: [forgejo-pull] on all 18 workloads that pull from the
  registry (osint, piedmont, sirius-growth, siriusdevops). The
  kubernetes.io/dockerconfigjson Secret is per-namespace and out of band
  (never in git); docs/registry-pull-auth.md documents why, how to recreate
  it, and the verification commands. No containerd-level credential.
2026-11-27 00:15:20 -05:00
cea26863ec monitoring(alertmanager): enable the alert sink and wire the 33 PrometheusRules (F5) (#42) 2026-11-27 05:09:49 +00:00
d874d4afaf fix(networking): make the public gateway :8080 WireGuard-only (F2) (#41) 2026-11-27 05:09:33 +00:00
Lance Walters
181266d7d4 fix(networking): make the public gateway :8080 WireGuard-only
Finding F2 of the 2026-11-27 cluster netsec audit: cilium-envoy on siriussec
binds gateway-system/public on 0.0.0.0:8080, so anyone on 192.168.1.0/24 could
`curl -H 'Host: forgejo.siriusdevops.com' http://192.168.1.179:8080/` and get
Forgejo (and every public site) over plain HTTP — no Cloudflare TLS, WAF, rate
limits or bot protection, and credentials on the wire inside the LAN. Live:
200 / 14609 B before this change.

The `internal_gw` nft table that already makes 8081/8084-8087 WG-only simply
did not list 8080. Add it to all three rules (lo, mesh+pods, drop), and to the
rpi ufw guard so a future `gateway=true` relabel on the Pi cannot re-open it.

Nothing legitimate needs the LAN path: cloudflared runs on rpi and connects to
10.10.0.2:8080 from 10.10.0.1 over the mesh (`ss` on siriussec shows
`10.10.0.1:* -> 10.10.0.2:8080 ESTABLISHED`), which the 10.10.0.0/24 accept
covers. 10.244.0.0/16 stays accepted for in-cluster probes.

Verified both polarities: LAN 192.168.1.179:8080 -> timeout/DROP (from two
vantage points), mesh 10.10.0.2:8080 -> 200 for all five public hostnames, and
all five public URLs still 200 through Cloudflare.
2026-11-27 00:09:14 -05:00
175 changed files with 8162 additions and 307 deletions

View file

@ -0,0 +1,74 @@
name: backup-image
# Builds the backup tooling image used by the three nightly CronJobs
# (monitoring/grafana-backup, forgejo/cluster-backup, sirius-growth/leadgen-backup).
#
# Why this is a CI build at all (card t_9d0428d8): the jobs used to run
# `apk add rsync openssh-client` at container start, so the backup depended on
# the Alpine CDN at run time. Everything is baked here instead, from a base
# image pinned by digest, and the manifests pin the resulting image by digest.
#
# CI has no cluster credentials: this job only pushes an immutable :$sha tag to
# the in-cluster Forgejo registry and prints the digest to pin. The operator
# copies that digest into the three CronJob manifests in this same repo.
#
# amd64 only, on purpose: all three Jobs are nodeSelector'd to siriussec and
# the baked kubectl release checksum is amd64. Nothing here runs on rpi.
on:
push:
branches: [master]
paths:
- 'images/backup/**'
- '.forgejo/workflows/backup-image.yml'
workflow_dispatch:
jobs:
build:
runs-on: docker-amd64
steps:
- uses: actions/checkout@v4
# The job image (node:20-bullseye) has no docker CLI of its own; the
# runner mounts the dind sidecar's client and cli-plugins. Verify both
# instead of assuming, and fail loudly rather than half-pushing.
- name: Verify docker CLI + buildx
run: |
set -euo pipefail
command -v docker
docker version
docker buildx version
- name: Build and push (amd64, no attestation manifests)
env:
REG_USER: ${{ secrets.REGISTRY_USER }}
REG_PASS: ${{ secrets.REGISTRY_TOKEN }}
run: |
set -euo pipefail
sha=$(git rev-parse HEAD)
image=forgejo.siriusdevops.com/sirius/backup-tools
user="${REG_USER:-sirius}"
pass="${REG_PASS:-${{ github.token }}}"
echo "$pass" | docker login forgejo.siriusdevops.com -u "$user" --password-stdin
# --provenance=false --sbom=false: the tag must resolve to the single
# amd64 image manifest, so the digest a CronJob pins is exactly the
# image the pod runs (an index digest would resolve per-arch).
# --metadata-file carries the pushed manifest digest. Do NOT read it
# back with `buildx imagetools inspect`: Forgejo's /v2/token answers
# 403 to that scope set (measured), while push and kubelet pull are
# fine.
docker buildx build --platform linux/amd64 \
--provenance=false --sbom=false \
-t "$image:$sha" \
--push --metadata-file /tmp/build-meta.json images/backup
echo "pushed $image:$sha"
digest=$(tr -d '\n' < /tmp/build-meta.json \
| sed -n 's/.*"containerimage\.digest": *"\(sha256:[a-f0-9]*\)".*/\1/p')
[ -n "$digest" ] || { echo "::error::no containerimage.digest in build metadata"; cat /tmp/build-meta.json; exit 1; }
echo "BACKUP_TOOLS_DIGEST=$digest"
{
echo "### Pin this in the three backup CronJob manifests"
echo ""
echo '```'
echo "$image@$digest"
echo '```'
} | tee -a "${GITHUB_STEP_SUMMARY:-/dev/stdout}"

6
.gitattributes vendored Normal file
View file

@ -0,0 +1,6 @@
# `git diff` on an encrypted Secret is otherwise a wall of ciphertext.
# Enable the driver once per workstation (needs the age key in ~/.config/sops/age/keys.txt):
# git config --global diff.sopsdiffer.textconv 'sops decrypt --output-type yaml'
# Without that config the attribute is inert and git diffs the file as plain text.
*.sops.yaml diff=sopsdiffer
*.sops.yml diff=sopsdiffer

5
.gitignore vendored
View file

@ -4,5 +4,10 @@ age.agekey
secrets/ secrets/
**/*secret*.yaml **/*secret*.yaml
!**/kustomization.yaml !**/kustomization.yaml
# The one exception to the rule above: SOPS ciphertext. Only the `.sops.yaml`
# suffix is un-ignored, so a plaintext Secret file still cannot be committed.
# The age private key (`age.agekey`) stays ignored — it lives in
# flux-system/sops-age and on the Linode, never here. See docs/secrets-sops.md.
!**/secret-*.sops.yaml
.DS_Store .DS_Store
*.swp *.swp

9
.sops.yaml Normal file
View file

@ -0,0 +1,9 @@
# SOPS configuration for sirius/homek8s.
#
# Age recipient for every encrypted Secret in this repo. The matching private key
# is NOT in git: it lives in the cluster as flux-system/sops-age (key `age.agekey`)
# and is escrowed off-cluster — see docs/secrets-sops.md for both locations.
creation_rules:
- path_regex: (^|/)secret-[a-z0-9.-]+\.sops\.ya?ml$
encrypted_regex: ^(data|stringData)$
age: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp

View file

@ -1,8 +1,13 @@
.PHONY: apply diff storage gateway .PHONY: apply diff storage gateway check-sops
apply: apply:
kubectl apply -k infrastructure/home kubectl apply -k infrastructure/home
# Static guard: no secret-*.sops.yaml may sit in a tree whose Flux Kustomization
# cannot decrypt it (see docs/secrets-sops.md). No cluster or age key needed.
check-sops:
./scripts/check-sops-decryption.py
diff: diff:
kubectl diff -k infrastructure/home kubectl diff -k infrastructure/home

View file

@ -2,7 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- namespace.yaml - namespace.yaml
# Secrets are created out of band, before this Kustomization applies: # Secrets are reconciled by Flux from the secret-*.sops.yaml files in this
# directory (SOPS/age; decrypted by the `apps` Kustomization):
# customer1/pg-app basic-auth, postgres superuser # customer1/pg-app basic-auth, postgres superuser
# customer1/pg-users odoo/metabase/metabase_ro role passwords # customer1/pg-users odoo/metabase/metabase_ro role passwords
# customer1/odoo-config admin_passwd (database master password) # customer1/odoo-config admin_passwd (database master password)
@ -10,7 +11,7 @@ resources:
# customer1/metabase-admin email, password (Metabase's own login) # customer1/metabase-admin email, password (Metabase's own login)
# customer1/metabase-data-source-creds username=metabase_ro + password # customer1/metabase-data-source-creds username=metabase_ro + password
# customer1/metabase-secret-key MB_ENCRYPTION_SECRET_KEY # customer1/metabase-secret-key MB_ENCRYPTION_SECRET_KEY
# None of them appear in git; they are not managed (or pruned) by Flux. # Only ciphertext is committed; the age private key is not in git.
- postgres-init.yaml - postgres-init.yaml
- postgres.yaml - postgres.yaml
- odoo-init.yaml - odoo-init.yaml
@ -18,3 +19,17 @@ resources:
- metabase.yaml - metabase.yaml
- backup.yaml - backup.yaml
- httproute.yaml - httproute.yaml
# Default-deny ingress+egress + the tenant's allow list (audit F3 / t_fed52919).
- networkpolicy.yaml
# Tenant guardrails sized from the declared 1-replica shape (same card).
- quota.yaml
# Secrets, SOPS/age-encrypted in git. Flux decrypts them (the `apps`
# Kustomization carries a decryption block; key = flux-system/sops-age).
# Never add a plaintext Secret next to these — see docs/secrets-sops.md.
- secret-pg-app.sops.yaml
- secret-pg-users.sops.yaml
- secret-odoo-config.sops.yaml
- secret-odoo-admin.sops.yaml
- secret-metabase-admin.sops.yaml
- secret-metabase-data-source-creds.sops.yaml
- secret-metabase-secret-key.sops.yaml

View file

@ -3,5 +3,11 @@ kind: Namespace
metadata: metadata:
name: customer1 name: customer1
labels: labels:
pod-security.kubernetes.io/enforce: baseline
pod-security.kubernetes.io/enforce-version: latest
pod-security.kubernetes.io/warn: restricted
pod-security.kubernetes.io/warn-version: latest
pod-security.kubernetes.io/audit: restricted
pod-security.kubernetes.io/audit-version: latest
app.kubernetes.io/part-of: customer1 app.kubernetes.io/part-of: customer1
sirius.dev/purpose: lab-replica-of-client-stack sirius.dev/purpose: lab-replica-of-client-stack

View file

@ -0,0 +1,78 @@
# Tenant isolation for `customer1` (audit finding F3 / A5-1, card t_fed52919).
#
# Two objects, two jobs:
# 1. `default-deny` (networking.k8s.io/v1) selects every pod in the namespace
# for BOTH directions and allows nothing. It is the only object here that
# creates a deny — a Kubernetes NetworkPolicy with `podSelector: {}` and no
# rules is an unambiguous deny-all in Cilium's k8s-policy path, and unlike a
# CiliumClusterwideNetworkPolicy with `endpointSelector: {}` it cannot
# accidentally select kube-system/Flux/CoreDNS.
# 2. `customer1-allow` (CiliumNetworkPolicy) re-adds exactly the traffic the
# tenant needs. Cilium unions all policies that select an endpoint, so the
# deny above plus this allow list is the effective policy.
#
# Why a CiliumNetworkPolicy for the allows: the sources to permit are Cilium
# *entities* (`ingress` = the Gateway listener proxy, `host` = the node/kubelet),
# which a stock NetworkPolicy cannot name.
#
# What this namespace is allowed to talk to — and nothing else:
# * its own pods (odoo/metabase -> pg:5432, the pg-backup CronJob -> pg),
# * kube-dns on 53.
# It gets NO internet egress (world) and NO API-server egress: the sandbox has
# no external dependency (backup.yaml: dumps stay on the local PVC, the Job has
# `automountServiceAccountToken: false`). If odoo/metabase are ever resumed and
# need an external service, add it here explicitly — that is the point.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny
namespace: customer1
spec:
podSelector: {}
policyTypes:
- Ingress
- Egress
---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: customer1-allow
namespace: customer1
spec:
description: >-
Customer-1 tenant: gateway + kubelet ingress only, egress to own namespace
and cluster DNS only.
endpointSelector: {}
ingress:
# reserved:ingress Cilium Gateway/listener proxy on siriussec (8086/8087)
# reserved:host this node's kubelet probes / host-network datapath
# reserved:remote-node node-sourced traffic when the pod is on another node
# reserved:health cilium-health probes
- fromEntities:
- ingress
- host
- remote-node
- health
# Intra-namespace pod -> pod (app -> db, sidecars, the backup CronJob).
# Cilium enforces policy at BOTH ends, so this allow must exist in ingress as
# well as egress — measured on `piedmont`: with only the egress rule a pod
# could not reach its own Service (TimeoutError).
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: customer1
egress:
# Cluster DNS (CoreDNS only).
- toEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: kube-system
k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP
# Intra-namespace only: odoo/metabase -> pg:5432 and the backup Job -> pg.
- toEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: customer1

View file

@ -0,0 +1,80 @@
# `customer1` tenant guardrails (audit finding F3 / A5-1, card t_fed52919).
#
# The sandbox is parked (`replicas: 0`, `suspend: true`, both committed in Git —
# see the README and the F21 note in the audit), so these numbers are derived
# from the DECLARED shape, not from `kubectl top` of a running tenant. Measured
# 2026-11-27 with `kubectl -n customer1 get deploy -o json` +
# `get cronjob pg-backup -o json`:
#
# workload requests limits replicas
# metabase 250m / 1Gi 1 CPU / 2Gi 0 (-> 1 when resumed)
# odoo 200m / 512Mi – / 2Gi 0 (-> 1)
# pg 100m / 256Mi – / 1Gi 0 (-> 1)
# pg-backup 50m / 128Mi – / 512Mi suspended Job
# ------------------------------------------------------------------
# total 600m / 1.88Gi 1 CPU / 5.5Gi at 1 replica + 1 Job
#
# The quota is the declared total with room for the one thing that always
# happens on a resumed stack: a RollingUpdate keeps maxSurge=25% of one replica
# alive next to the old pod. So requests get ~2x headroom (2 CPU / 4Gi), limits
# ~2x the declared peak (4 CPU / 10Gi) — a tenant cannot use more than two
# replicas' worth of anything at once, and a runaway pod is still cut off by its
# own limit, which is the LimitRange's job.
#
# Storage: 35Gi is already bound (odoo-data 10Gi + odoo-extra-addons 5Gi +
# pg-data 10Gi + backup-data 10Gi) — measured with `kubectl -n customer1 get
# pvc`. 45Gi allows exactly one more 10Gi claim and nothing more.
#
# Do not copy these numbers to another namespace: they describe this stack.
apiVersion: v1
kind: ResourceQuota
metadata:
name: customer1-quota
namespace: customer1
labels:
app.kubernetes.io/part-of: customer1
spec:
hard:
# Compute. Requests ~2x the declared 1-replica total (550m/1792Mi).
requests.cpu: "2"
requests.memory: 4Gi
limits.cpu: "4"
limits.memory: 10Gi
# Object counts. 3 workloads x 2 pods during a rolling update = 6, plus the
# pg-backup Job and room for one debug pod.
pods: "12"
count/jobs.batch: "8"
count/cronjobs.batch: "2"
services: "6"
# Storage: 35Gi bound -> one more 10Gi claim.
requests.storage: 45Gi
persistentvolumeclaims: "6"
---
# Container defaults so the quota above is satisfiable by every pod in the
# namespace: a ResourceQuota that constrains requests.cpu/limits.cpu rejects any
# pod without them, and the LimitRange injects them. `max` is the per-container
# ceiling — 2Gi is exactly metabase's declared limit, so the parked stack
# schedules unchanged when it is resumed; anything bigger now needs a namespace
# change on purpose.
apiVersion: v1
kind: LimitRange
metadata:
name: customer1-limits
namespace: customer1
labels:
app.kubernetes.io/part-of: customer1
spec:
limits:
- type: Container
defaultRequest:
cpu: 100m
memory: 128Mi
default:
cpu: 500m
memory: 512Mi
max:
cpu: "1"
memory: 2Gi
min:
cpu: 50m
memory: 64Mi

View file

@ -0,0 +1,24 @@
apiVersion: v1
data:
email: ENC[AES256_GCM,data:pye3Ei9A453apvkVNrfqggFKyx/ATskG77WrMA==,iv:4ZcgCPJNFxCK7htIKuwR+3keDNmV3Knb7zqdhe+yxTc=,tag:VyYkzJUexigD9G9IbMPPhA==,type:str]
password: ENC[AES256_GCM,data:KLYg2onQai5UcYxAFjOqnTV86aXreASsBmE4t83f2YX8b8FM9G0tMcG6tnw6xP9eICKtxBh+Qlq6y/nvjRaVmg==,iv:o8zosg+KBh0QMm4JdqSZVSfl4Zx8QHumaeg9eb+kdcI=,tag:sLHNVvDq/qbyp8jtJ4Bo2A==,type:str]
kind: Secret
metadata:
name: metabase-admin
namespace: customer1
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBPamdJcnBNaVlCVndCYjZp
U240ZTc3K2dOeGZKT0EvYkQ0Nkk0ZjkxcG5nClcyZ2pYaDhwRUkrN0xXU0g4Mk0w
cmgrOXZvSWl2MDF6QWhuVXc0Q3Z4MU0KLS0tIGJVUVlZczhUSHp5elV1RnBwSzNy
a2tMNnJqbDlPZWcvek9zZDYvL21xbUEKm89bfzcfUXX7Dd6KEDdDx1Ka2kPU+WSS
t/XO7xYheieqkjhEGtFfT+HyOiFsI1Kq3vo/r/TPp1+5xh+5RlJksg==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:45Z"
mac: ENC[AES256_GCM,data:PXhSM6xorgIfCefgZkohRH8j+G/UHtZp1itgNcdEvn6SRNTSvLLi+evEIFA1Z9MbPsu9+Q/UtWVikeYMUj5ISriTOc260Z2J2AUrYB2PDqmizqS+rjVrDgqAhPuttBIh7Fk7WEQhQETHwtNPHWfk3T/MH324Ki7mWmru83xP4hw=,iv:CDHi7wczZXpPs8AMWDI6vx6JkY2Wb5de4vbUH3+4GCQ=,tag:Qw+mGUG6l5USLGFwH28BFA==,type:str]
version: 3.13.3

View file

@ -0,0 +1,24 @@
apiVersion: v1
data:
password: ENC[AES256_GCM,data:883FQISSJ2D3Kd+rWGC1DOdzKyG+QuUEvlMnQ3L6aDuXgBvXphhTmPhBfrOCR/J5ttGUBLBekzclNbxX37bVAw==,iv:XJ5zNft7ZnE2jsu7FUXbflV0mUdcNjE4R+QT//hmhfo=,tag:7tjYUC/iVDB/rkXE9r93gw==,type:str]
username: ENC[AES256_GCM,data:OD7PyqDx6EY6x0EEQvTLcw==,iv:ngjJgRODgdFVAbYBL4JMm+tv3kM7VvFiyb0KvY+O48Q=,tag:GwzHUK9BKgsXBMHsvBQ/Sw==,type:str]
kind: Secret
metadata:
name: metabase-data-source-creds
namespace: customer1
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBSc1MvOWIrdENjdUpJYmsy
a0hZZjBQRk9JOThoMWtoK0REdkZ1SVZJbGs0Ck1udWRxc2VWY2dVa2tuY2tjdVU1
cFNBb3FLWmtuZFZUSHRJd0tFWW9WUUUKLS0tIFQzV2dMeUJONGF4TVJmampHVWhQ
dnNJaGtlQjhFeEYwVUtLSUNCOFdJcFEKj1zVUr5nadbAE6vk5aErwrIHMNx0EyRY
9O8QPPzQq4kJpiCowLtf4TLXpGvbTCuvIQhddd1H6azOEEL49D3LdQ==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:45Z"
mac: ENC[AES256_GCM,data:KMhWpTBwsszg7Wiv0h0ojw62dJmqXXHCFoJI3UplEH72RaYAu4dFW8S3Id4NXyA4YuBOLzEMY2OQkuiklybSkgmTS3oefTT7yoQOqhkkkUc1qlHNmmhz2pS5qsdGnEaCw2fMeDrsQdFL2bBLbZn3Qi059OFDwQZcxqAS2EX6N6A=,iv:MUPOjzikSC1ftDKeG+oCPg13E28x53xXUJNPVndWClY=,tag:1A7fWGXe++VdAJumqLTXTw==,type:str]
version: 3.13.3

View file

@ -0,0 +1,23 @@
apiVersion: v1
data:
MB_ENCRYPTION_SECRET_KEY: ENC[AES256_GCM,data:JSp0PadR8hdBvLLHesQaHjHneGcj8t+w0JSaiua51JkY4vqvEJ90s65niamHXrdgWjaq3NS7nfS8PMkNfwHqfbiX309Wj3kN8oHRgMyfJpBbj+lnO5ieAw==,iv:rtqT8wlGTbH86MIbw+fDlXMkGyqesHziUGc6iQnao+I=,tag:k99H2PSPgaZobpjxa5UQSQ==,type:str]
kind: Secret
metadata:
name: metabase-secret-key
namespace: customer1
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBMS2pSRzc3ZVhIYXZiUytC
TmtTWWJCQ3B0SjZ5WCtCLzFVZWQ3YXdyTVJBCnVOa09HQmpIcUkzWmFGaVkvN1BX
S2ovaUhpYmJLQmhoUm9QRmNCN3UrbDgKLS0tIHpraFVzazJBaUNTVTlod1NTOE9Z
cThXbDhRSkNRQVJuYlR2YWhHT3htREEKESpWw+VvIYkR23yy6Q5Hvfm2kpiDUE/B
fijCO62TfCgujWxEWW6pmrm8KnTuyc94k5j2FTV/SiXwmynRYgsvbQ==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:45Z"
mac: ENC[AES256_GCM,data:6mYN/X5XhqcVEXWSsub/aSkVjvv3+iRE7lFcDjAJVlIgVAZ8TkTn4OywqauqhNc8yJQL3fenpOUwWGsqbte9iu8o02buc2D3vx+iMj/PHEa3nJEJLJ568oQont0rVRYeAmtcEkeQAUSLFWTPyyk41nwZQ93U4NpY2v13rCpDqC4=,iv:DcZa1YDTjIPNkhHLMrQZiLUWqEI7JyKlxLR/E5OylBk=,tag:w7mQWj06ZXOdN9303TZ8RA==,type:str]
version: 3.13.3

View file

@ -0,0 +1,24 @@
apiVersion: v1
data:
email: ENC[AES256_GCM,data:gI6NwFOxqUnFQzfXQJhvsv+zsFmw9RA5OwnglQ==,iv:Bb4TDSiS1OVNQAXBviA8Dw/kdi09K1uQl/4SVOijC1o=,tag:ThcEMoBBc7yl4RXqyIlb1Q==,type:str]
password: ENC[AES256_GCM,data:6u9gNzQtqDPDN/TyfqzcahX63JOoaKkph4Tgcsz7cSGRt/qpR/Vintnc+VbUeNhLIz8k1P3AI9XkWM1f25qEJQ==,iv:hhtJRFJFUZ4HR+6Cu8rhNdA5tb4g5V3xjMnNy6TTiUY=,tag:Ot84YjRft7xN63XNopRLgQ==,type:str]
kind: Secret
metadata:
name: odoo-admin
namespace: customer1
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBBNEd1MjlVU1Yzem1yWTdk
ZUZhdkc2VThWM3RrT1lUT1BYb3J3WmhKMVFzCjQzcjJsdGdDMHVzajlNUW42OWNi
VVdqM3pKd2hEelhHQmpHMjh1SW51N28KLS0tIHQxb3Y0M25ZYzFrNXJYVU4wS0Fw
N0hrUHhPc1YwaUxrU0RyY2JsbGIyM0EKhdd2YP9REMTNaQDMSZ9iZVoWmHysjLJv
y1jhciBxTpHP384gdJE2wDQftKvAkLtNMh2og0oZdHJnlQybP+CELA==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:45Z"
mac: ENC[AES256_GCM,data:L3RbLA3LdN6uV9NEKtjLpNNwFkBAvXdyT/A3EpYBzmM+3Vj6gFSg8NRSw1ttO4mlCIuebKqJ7rp1MUj0vx4VrnhDt8N/XSOuSh72XRFZpqjVSp9tXnJx6y3TkPo0+87kchFQC2i7MO9ysxKyNbhRQ8Fte7NDE73TM5K7Tbes6sM=,iv:C18NRt2JEBmZRZprpQr4YZNEUVto+sE0G+ZCQ4MU1tA=,tag:4YXb06SVaZkGO1y7LSnKdw==,type:str]
version: 3.13.3

View file

@ -0,0 +1,23 @@
apiVersion: v1
data:
admin_passwd: ENC[AES256_GCM,data:pBG7LujHDijWRpmmxs9ffv+QR8ASR4Am/IpOFV9GoEeYolG4OrRNEACU4QXS+1Fn1QnDvAVgsXQKeWC7ukwYCg==,iv:pV8OYTFdYzRKxNdLY3qNHSL1X/5FmCE6P4Uuia6Lp5k=,tag:v7ODHmLxlPPvDouU9XdVcg==,type:str]
kind: Secret
metadata:
name: odoo-config
namespace: customer1
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBHb0dVWENybXJEd3VVNzlI
N051b2tBYlpxNG10TmJWWmVGRUVqTVBiMlNnCnl5SnkzMTV0cXdldis1eWtlM0Nl
TzMrR2ZEREdlZzZ6am5aQU5uQnhoWlUKLS0tIEpiVHJIT1V1aVF1NmJrajVDOVRt
QmQvWkx5UTNRd2RRMk9iVld1dVExeGcK5fIhbRpE9AyvhlXSRbvHQDqaAA1LONKC
LqN0Gsald5QMH9tvQFRFJMnjVOpi1mgfOi3ErwQhgDO8GVn2HmPjPg==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:45Z"
mac: ENC[AES256_GCM,data:+bwR9y/ILXyRwIVABTa6RIsK87a7+P+yFChNKB6Li6oukj2pJhEfrE9LIKdqOa24sg7IbAz2f+IyQ86qnR2zKcMUENdlkDq353arta1nCFxZ6A49XVwVXYjbj+OrnFRt3fJBuLhkSwutcXBXNZk5LL4KDmErw75RAAcsNMNjsPA=,iv:/xM9lqO7UCA3S+bRq8DJg4N6YLo5EcCnRSlGNY5CX54=,tag:3nIT7ZXueXmgKL+HeocINw==,type:str]
version: 3.13.3

View file

@ -0,0 +1,24 @@
apiVersion: v1
data:
password: ENC[AES256_GCM,data:8TOZ9hLg1NswEAhf7GFOCB6PSrD8MyBzlYXsDy4kXgRgLaIW2Lm/nTIo9g8IgZQESA/6q/rKaF4vnIJJkaHtZg==,iv:1/sOnAtyjiOE74O02B8aHd2zSl4yY5db/Zn4jmC556s=,tag:WoAGHpZSRWFjIZ6Nbzae5w==,type:str]
username: ENC[AES256_GCM,data:ERoiT+V2+l7/81l6,iv:Dt1Vidd67w0v+trgaEqmpRYS4GqswMm6f+tHS6N1O7o=,tag:DSr46jx9du9nmO+dPXf7dw==,type:str]
kind: Secret
metadata:
name: pg-app
namespace: customer1
type: kubernetes.io/basic-auth
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnZWR5SEFZcEVlS0ZEWnNI
TUZUakowdlRvdXhubGR2UmV6SUJITHhXd1Y0ClNiQWl4Y2IzRE5raEE0S2ZVRWVE
b056bHFRZ1E3TFlobDVzaHhpK0xneGsKLS0tIDZRaUJnNmF3SGhtc1NRVGQ0TGdI
aGNYbkh6dWN6ZEZtUTVhUHRjOWFZK28KbkBCjLV7ao5IaQIdBQvZBVi59XXVqneH
BKp+F0OuqRNMCC0B3nQothimBFd2fQTKQ24TAVAji8H4ScK3djnHLQ==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:44Z"
mac: ENC[AES256_GCM,data:ZDeCBfrq7ENthn4MJoLtRS5swjFUoKXeR7Us/7VcunkeDomuEtQWC9T3j57HQujLgKOMWZvAi9f+i6DRi3/UkrwlzQHuGQPPLvGk40pMfpu7ydcTQAiwgC94slGouxhY2/yTkCCJvP/76bvnXpAuunBxta+RikMlruehAC5wBCY=,iv:iVrJh5Ijz9E7FnWHVyfuEr6qG6jRSJ1wySDbXKBaC9I=,tag:yW/4EclmKgNb1kJcz1Vz8Q==,type:str]
version: 3.13.3

View file

@ -0,0 +1,25 @@
apiVersion: v1
data:
metabase_password: ENC[AES256_GCM,data:L7rJGclU3XcAXVbQL8RKEYY3a/if538EDH+TGX9Aw27velxwGOGhHb2sJ4fqI5Or6rmJlgh/UdvWrgJ9lZdzdw==,iv:oG9OUeXcxl5qizX65thHggI0QcPs5/Mv/enSZtt+VF4=,tag:ZUKXEPLVQjJ0778S8B79VQ==,type:str]
metabase_ro_password: ENC[AES256_GCM,data:ozf71aGKA3CFRzaLop9jzliaXPXZ5lmhY5YEIKXBx3AhMtDYmA5FOlJHsORHP3RB1vlPI9EChmQDTRxg1gzOBg==,iv:C4Olqkno9gvWIjh+nKP/dld7586RK3CE/s0mma+4bgQ=,tag:J0+1EKGWiuNAXTE0liUEEw==,type:str]
odoo_password: ENC[AES256_GCM,data:OygJFdgceU2rlA4Gcf+jcMtmLBRH4Tpv4cI24oE7maovzd/5fxDPvAQJOKeJafE70LaLkdmP0GbnCbK5DGZH+A==,iv:85yaLhT4zFRnglDKPbHcA1hsyJCckqUotLsz+Kssa/o=,tag:rfter+CQbKtm9mbwsxwWqw==,type:str]
kind: Secret
metadata:
name: pg-users
namespace: customer1
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBlcEJFOTRJT1R6WG41b3Nj
c3dTMnhxTllNVDllVndGUS9UdHVGQ2d6c0RJCklHNDhYTVo5SFErdlRvanNNeDhi
MVBuYm1WMFJJMHRMOEFYTm1TbDhueGsKLS0tICtoenNqKzVwSGxIdisvUG92UVBG
VHZkT3ZiRlk0Y2FmdUIrQ1c5VnNFajAKOE2XsfMeAaXMJW7Ao4A9GyYuGShNMl+K
Z+W64wvP3Mub7496laYNccA/Ve/WklZcBdzVPSErWVVaSuId0/6TEA==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:44Z"
mac: ENC[AES256_GCM,data:VIKZNuiKBQH04Y9EcYzrpoO9hQ85pOS9Iy13Pqgi/MkFm+uMzzEORB9sLdjGK0jQrfYqmzxnTpX4vTW0RXtlzXrFp+ZrrPOlOnjK5qwzLk6T+fz4vIGPi0TDAyWZgNO/xO+fLQhNcGcwkUlPzW+WwZRtg3+B8CfU0cPtfIl4UCM=,iv:AxvNn+3vjOMIsmqfYDDsZGKQuIc0b4RoISc4fVrl4WM=,tag:PVVa4GSMVe833JXFtlHpAA==,type:str]
version: 3.13.3

View file

@ -0,0 +1,35 @@
apiVersion: v1
kind: Namespace
metadata:
name: ci-runners
# The Forgejo Actions CI capsule: three runner Deployments (each with a
# privileged docker-in-docker sidecar), their data PVCs, and the nightly
# prune CronJob (hostPath `/var/run/docker.sock`).
#
# `enforce: privileged` is deliberate and is the whole point of this
# namespace existing. Pod Security has no per-workload exception: if these
# pods share `forgejo`, that namespace can only ever be warn/audit, i.e. no
# namespace in the cluster enforces anything. Isolating the capsule here lets
# `forgejo` enforce `baseline` (Forgejo, Postgres, backups) while this
# namespace keeps the one shape that genuinely needs node root and is
# labelled as such in Git.
#
# This is containment, not a grant of new privilege: the dind sidecar was
# already privileged, and CI job containers are unprivileged
# (`container.privileged: false` in the runner ConfigMap). Keep this
# namespace free of anything that is not part of the CI capsule, and give it
# its own NetworkPolicy/RBAC scope rather than widening it.
#
# warn/audit are `privileged` too, on purpose: at that level PSA prints and
# records nothing, which is the honest signal — everything here is allowed by
# design, and the namespace holds only the CI capsule. (Warn/audit at
# `restricted` would emit the same five violations for every pod, every
# restart, and train everyone to ignore them.) Anything added here that is not
# part of the capsule is a review failure in Git, not an admission event.
labels:
pod-security.kubernetes.io/enforce: privileged
pod-security.kubernetes.io/enforce-version: latest
pod-security.kubernetes.io/warn: privileged
pod-security.kubernetes.io/warn-version: latest
pod-security.kubernetes.io/audit: privileged
pod-security.kubernetes.io/audit-version: latest

View file

@ -87,12 +87,10 @@ data:
# (the node runs close to DiskPressure and `local-path` lives on it). # (the node runs close to DiskPressure and `local-path` lives on it).
set -euo pipefail set -euo pipefail
# alpine/k8s ships kubectl/bash but not rsync/ssh; install them per run # No package install here on purpose: rsync/openssh-client/bash/kubectl are
# (~2 s). Nothing else is needed: the DB dumps run inside the CNPG pod. # baked into the pinned image (images/backup/Dockerfile) and this pod's
if ! command -v rsync >/dev/null || ! command -v ssh >/dev/null; then # egress policy admits DNS, 10.10.0.5:22 and the API only, so a runtime
echo "== installing rsync + openssh-client" # fetch would fail rather than silently dial the Alpine CDN (t_9d0428d8).
apk add --no-cache rsync openssh-client >/dev/null
fi
BACKUP_HOST=${BACKUP_HOST:[email protected]} BACKUP_HOST=${BACKUP_HOST:[email protected]}
BACKUP_DIR=${BACKUP_DIR:-/root/cluster-backup} BACKUP_DIR=${BACKUP_DIR:-/root/cluster-backup}
@ -246,16 +244,20 @@ spec:
spec: spec:
restartPolicy: Never restartPolicy: Never
serviceAccountName: cluster-backup serviceAccountName: cluster-backup
# Pulled from the in-cluster Forgejo registry (which requires auth).
imagePullSecrets:
- name: forgejo-pull
# The forgejo-data PVC is local-path on siriussec; the pod must run # The forgejo-data PVC is local-path on siriussec; the pod must run
# where the volume is. # where the volume is.
nodeSelector: nodeSelector:
kubernetes.io/hostname: siriussec kubernetes.io/hostname: siriussec
containers: containers:
- name: backup - name: backup
# alpine/k8s carries kubectl 1.36.4 (== cluster version) so the # python3.12-alpine + rsync + openssh-client + bash + kubectl
# CNPG dumps can be taken through the exec API; rsync + openssh # v1.36.4 (== cluster version, so the CNPG dumps can be taken
# are added at start (the pod has normal egress). # through the exec API), all baked at build time and pinned by
image: alpine/k8s:1.36.4 # digest. Nothing is installed at run time.
image: forgejo.siriusdevops.com/sirius/backup-tools@sha256:cc8dc1645111b3a80b7c4d5168f6bce3002cae7417b3725683c057976f6e379a
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: ["/bin/bash", "/scripts/backup.sh"] command: ["/bin/bash", "/scripts/backup.sh"]
env: env:

View file

@ -58,6 +58,17 @@ spec:
# Bot signup lockdown: admin-only account creation (web + API). # Bot signup lockdown: admin-only account creation (web + API).
- name: FORGEJO__service__DISABLE_REGISTRATION - name: FORGEJO__service__DISABLE_REGISTRATION
value: "true" value: "true"
# Public-repo browsing is ON. Audit F11 had turned this on because
# Forgejo issues anonymous ("ghost user") registry tokens at
# /v2/token with Read on every package, so with public browsing
# every app image was world-pullable. That coupling is now cut at
# the edge instead: a Cloudflare zone custom rule ("Block anonymous
# Forgejo registry tokens") blocks /v2/token unless the request
# carries Basic auth, so anonymous pulls get 403 while containerd
# (which sends its `forgejo-pull` dockerconfigjson credentials)
# still pulls. Re-check that rule before turning this back to true.
- name: FORGEJO__service__REQUIRE_SIGNIN_VIEW
value: "false"
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /data mountPath: /data

View file

@ -0,0 +1,27 @@
---
# Kata Containers microVM RuntimeClass for the CI capsule (card t_8aa4af50).
#
# What this buys and what it does NOT: a pod using this class still declares
# `privileged: true` — a nested dockerd needs CAP_SYS_ADMIN + CAP_NET_ADMIN in
# the pod spec, and PSA `baseline` forbids exactly those two, so `ci-runners`
# stays at `enforce: privileged` (docs/pod-security.md). What changes is what
# privilege applies to: the container runs inside a QEMU/KVM microVM, so
# "privileged" means root in a VM with no host namespaces, no host kernel and
# only the volumes the pod mounts — an escape has to beat KVM first.
#
# The handler name `kata-qemu` must exist in containerd on every node that can
# run a pod with this class (drop-in /etc/containerd/conf.d/50-kata.toml,
# kata-static 4.4.0 under /opt/kata). Installed on rpi 2026-11-27; not yet on
# siriussec — that is why only the rpi-pinned deploy runner uses this class.
apiVersion: node.k8s.io/v1
kind: RuntimeClass
metadata:
name: kata-qemu
handler: kata-qemu
# VM overhead is charged to the pod so the scheduler accounts for it. The VM
# itself is sized from the pod's memory limits (2Gi here) plus the kata
# agent/kernel.
overhead:
podFixed:
cpu: 250m
memory: 160Mi

View file

@ -1,8 +1,17 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
# Two namespaces: `forgejo` (enforce: baseline) and `ci-runners`
# (enforce: privileged — the CI capsule). Namespace objects sort first.
- namespace.yaml - namespace.yaml
- ci-runners-namespace.yaml
- httproute.yaml - httproute.yaml
# Default-deny ingress+egress + the namespace allow list (audit F3 / t_fed52919).
- networkpolicy.yaml
# Egress lockdown for the cluster-backup pod: DNS + 10.10.0.5:22 + the API
# only. The allow list above cannot be narrowed per pod, so the deny for
# `world` in this policy is what applies to the job (card t_9d0428d8).
- networkpolicy-backup.yaml
- pvc.yaml - pvc.yaml
- cluster.yaml - cluster.yaml
- podmonitor.yaml - podmonitor.yaml
@ -12,10 +21,19 @@ resources:
- deployment.yaml - deployment.yaml
- service.yaml - service.yaml
- runner-configmap.yaml - runner-configmap.yaml
# The runner PVCs/Deployments below and the prune CronJob — plus the two
# runner-token Secrets near the bottom — live in namespace `ci-runners`,
# not `forgejo`: the dind sidecars need `privileged` and the prune Job needs a
# hostPath socket, both of which `forgejo` now rejects at admission
# (enforce: baseline).
#
# Static PVs/PVCs pinned to rpi: dynamic local-path cannot provision there # Static PVs/PVCs pinned to rpi: dynamic local-path cannot provision there
# (its helper pod is hardcoded to siriussec). Must sort before the runner # (its helper pod is hardcoded to siriussec). Must sort before the runner
# Deployments that consume the claims. # Deployments that consume the claims.
- runner-dind-storage.yaml - runner-dind-storage.yaml
# Cluster-scoped RuntimeClass for the Kata microVM that the rpi deploy runner
# uses (card t_8aa4af50). Its handler exists in containerd on rpi only.
- kata-runtimeclass.yaml
- runner-arm64.yaml - runner-arm64.yaml
- runner-amd64.yaml - runner-amd64.yaml
- runner-deploy-arm64.yaml - runner-deploy-arm64.yaml
@ -23,3 +41,14 @@ resources:
# Nightly disaster-recovery backup of forgejo-data + every CNPG database to # Nightly disaster-recovery backup of forgejo-data + every CNPG database to
# the Linode VPS. Lives here because a PVC cannot be mounted cross-namespace. # the Linode VPS. Lives here because a PVC cannot be mounted cross-namespace.
- cluster-backup.yaml - cluster-backup.yaml
# Secrets, SOPS/age-encrypted in git. Flux decrypts them (the `apps`
# Kustomization carries a decryption block; key = flux-system/sops-age).
# Never add a plaintext Secret next to these — see docs/secrets-sops.md.
- secret-forgejo-pg-app.sops.yaml
- secret-forgejo-runner-amd64-token.sops.yaml
- secret-forgejo-runner-deploy-arm64-token.sops.yaml
- secret-cluster-backup-ssh.sops.yaml
# Registry pull credential: cluster-backup now runs an image from the
# in-cluster Forgejo registry instead of alpine/k8s from Docker Hub
# (card t_9d0428d8).
- secret-forgejo-pull.sops.yaml

View file

@ -2,3 +2,29 @@ apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
name: forgejo name: forgejo
# Pod Security: `enforce: baseline` here. Everything that lives in this
# namespace — Forgejo itself, the CNPG Postgres cluster, the nightly
# cluster-backup CronJob — is baseline-clean (no privileged, no hostPath,
# no host namespaces, no added capabilities), so the enforcement is real
# rather than decorative.
#
# The Actions runners are NOT here any more. A docker-in-docker sidecar
# cannot lose `privileged: true` on these nodes (procfs needs CAP_SYS_ADMIN,
# kubelet mounts /sys/fs/cgroup read-only for non-privileged pods, rootless
# dind is blocked by the masked /proc and the absent /dev/net/tun — all
# measured, see docs/pod-security.md), so the three runner Deployments, their
# PVCs and the prune CronJob live in `ci-runners`, which enforces PSA at
# `privileged` on purpose. Moving them out is what lets this namespace
# enforce baseline: if a runner (or anything else privileged/hostPath) is
# ever added here, admission rejects it instead of silently accepting it.
#
# warn/audit stay at `restricted`: a future pod that is baseline-clean but
# not restricted-clean (e.g. missing seccomp/runAsNonRoot) is still printed
# and recorded as audit annotations.
labels:
pod-security.kubernetes.io/enforce: baseline
pod-security.kubernetes.io/enforce-version: latest
pod-security.kubernetes.io/warn: restricted
pod-security.kubernetes.io/warn-version: latest
pod-security.kubernetes.io/audit: restricted
pod-security.kubernetes.io/audit-version: latest

View file

@ -0,0 +1,64 @@
# Egress lockdown for the nightly cluster-backup CronJob (card t_9d0428d8).
#
# Why: the job used to `apk add --no-cache rsync openssh-client` at container
# start, so each run depended on the Alpine CDN (Fastly 151.101.x.132:443) and
# tripped `egress-new-dst` whenever that anycast address rotated. rsync/ssh/
# bash/kubectl are baked into images/backup/Dockerfile now.
#
# `forgejo-allow` (networkpolicy.yaml) selects every pod in this namespace and
# allows `world`, so a pod-scoped allow list alone would NOT restrict the job —
# Cilium unions multiple policies. The `egressDeny` for `world` below is what
# actually closes it (deny always beats allow), and it is scoped to this pod by
# the endpointSelector, so Forgejo's own webhooks/mirror/avatar egress is
# untouched.
#
# Allow list, and nothing else:
# * cluster DNS;
# * [email protected]:22 — the Linode node's InternalIP, so `remote-node`, not
# `world` (the rsync target and every ssh_r call);
# * kube-apiserver on 6443/443 — `kubectl get cluster` for the CNPG primary
# and `kubectl exec ... pg_dump` for both CNPG and the plain Postgres
# Deployment. Port-scoped on purpose: the apiserver shares its host IP with
# the internal Gateway listeners on 8081/8084-8087.
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: cluster-backup-egress
namespace: forgejo
labels:
app: cluster-backup
spec:
description: >-
cluster-backup pod: cluster DNS, SSH to the backup host (10.10.0.5:22) and
the API (6443/443) only; no internet egress at run time.
endpointSelector:
matchLabels:
app: cluster-backup
egress:
- toEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: kube-system
k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP
- toEntities:
- remote-node
toPorts:
- ports:
- port: "22"
protocol: TCP
- toEntities:
- kube-apiserver
toPorts:
- ports:
- port: "6443"
protocol: TCP
- port: "443"
protocol: TCP
egressDeny:
- toEntities:
- world

View file

@ -0,0 +1,143 @@
# Tenant isolation for `forgejo` (audit finding F3 / A5-1, card t_fed52919).
#
# `default-deny` (stock NetworkPolicy, podSelector {}, both directions) is the
# deny. `forgejo-allow` (CiliumNetworkPolicy) re-adds what this namespace uses:
# ingress: the Cilium Gateway proxy (`reserved:ingress`) for
# forgejo.siriusdevops.com -> forgejo:3000; the CI runners in
# `ci-runners` on 3000 only (they register/poll over the PUBLIC URL,
# so THAT traffic arrives as `reserved:ingress` — but their image
# pushes go pod->pod to the internal ClusterIP
# `forgejo.forgejo.svc.cluster.local:3000`
# (`PUSH_REGISTRY` in each repo's `.forgejo/workflows/build.yml`,
# docker daemon in the dind sidecar of the runner pod). Pod->pod is
# not `reserved:ingress`, so `default-deny` dropped it and every
# image build failed 2026-11-27 .. 2026-12-05 with
# `Get "http://forgejo.forgejo.svc.cluster.local:3000/v2/": request
# canceled ... Client.Timeout exceeded` — the cross-namespace rule IS
# required; do not delete it as redundant. Node/health entities
# cover kubelet probes; Prometheus in `monitoring` is allowed on
# 9187 only (the
# `cnpg-pg` PodMonitor scrapes the CNPG instance manager), and the
# CNPG operator in `cnpg-system` on 8000 only — the instance
# manager's HTTPS status endpoint the operator reads to derive the
# system ID and drive failover (card t_4210edec).
# egress: cluster DNS; its own pods (forgejo -> pg-rw:5432); `world` for
# outbound HTTPS (Forgejo webhooks, avatar/mirror fetches, the
# public-URL callbacks the runner flow needs); node IPs on 22, which
# is the nightly `cluster-backup` CronJob rsyncing to
# [email protected]; and `kube-apiserver`, needed by the CNPG instance
# manager and by cluster-backup's `kubectl get cluster` /
# `kubectl exec` DB dumps.
#
# The CI runner pods themselves are NOT in this namespace (they moved to
# `ci-runners` for `enforce: privileged`); `forgejo-allow` only grants them
# forgejo:3000, which is the registry push path the builds depend on.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny
namespace: forgejo
spec:
podSelector: {}
policyTypes:
- Ingress
- Egress
---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: forgejo-allow
namespace: forgejo
spec:
description: >-
forgejo: gateway + kubelet + Prometheus + ci-runners registry-push ingress;
egress to own namespace, cluster DNS, the internet, SSH on node IPs and the
API.
endpointSelector: {}
ingress:
- fromEntities:
- ingress
- host
- remote-node
- health
# Intra-namespace pod -> pod (app -> db, sidecars, the backup CronJob).
# Cilium enforces policy at BOTH ends, so this allow must exist in ingress as
# well as egress — measured on `piedmont`: with only the egress rule a pod
# could not reach its own Service (TimeoutError).
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: forgejo
# CI runners (`ci-runners`) push images to the in-cluster registry at
# forgejo.forgejo.svc.cluster.local:3000 (PUSH_REGISTRY in each repo's
# build workflow; the docker daemon lives in the dind sidecar of the same
# pod, so one namespace selector covers runner + sidecar). Registration and
# polling use the public URL and arrive as `reserved:ingress`, but the push
# is pod -> pod and default-deny drops it without this rule. Port-scoped on
# purpose: the registry API only, nothing else in the namespace.
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: ci-runners
toPorts:
- ports:
- port: "3000"
protocol: TCP
# The CNPG operator (`cnpg-system`) reads the instance manager's HTTPS
# status endpoint to derive the system ID and drive switchover/promotion.
# Without it the Cluster reports `Instance Status Extraction Error` and
# Ready=False while the pods serve traffic, and automated failover is dead
# (card t_4210edec). Scoped to 8000: not 5432, not the whole namespace.
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: cnpg-system
app.kubernetes.io/name: cloudnative-pg
toPorts:
- ports:
- port: "8000"
protocol: TCP
# Prometheus scrapes the CNPG `pg` instance manager on 9187.
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: monitoring
toPorts:
- ports:
- port: "9187"
protocol: TCP
egress:
- toEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: kube-system
k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP
- toEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: forgejo
# Outbound HTTPS: webhooks, mirrors, avatar fetching.
- toEntities:
- world
# cluster-backup rsync/ssh to [email protected] (the Linode node).
- toEntities:
- remote-node
toPorts:
- ports:
- port: "22"
protocol: TCP
# CNPG instance manager and cluster-backup's kubectl calls. Port-scoped on
# purpose: the apiserver is host-networked on 10.10.0.2 and Cilium attaches
# the `kube-apiserver` identity to that whole node IP — an unscoped entity
# rule also opens 8081/8084/8085/8086/8087 (the internal Gateway listeners)
# and :10250/:9100 on the same address. Measured: 10.10.0.2:8085 was OPEN
# from this namespace until the ports were named. 443 is the service port
# kubectl dials (kubernetes.default:443 -> backend 6443).
- toEntities:
- kube-apiserver
toPorts:
- ports:
- port: "6443"
protocol: TCP
- port: "443"
protocol: TCP

View file

@ -38,6 +38,13 @@ kind: ConfigMap
metadata: metadata:
name: forgejo-actions-queries name: forgejo-actions-queries
namespace: forgejo namespace: forgejo
labels:
# Tells the CNPG instance manager to re-read this ConfigMap on change.
# Without it a query fix (like the actions_runners dedupe below) does not
# reach the exporter until someone runs `kubectl cnpg reload` or the pod
# restarts — i.e. the fix appears to do nothing and /metrics keeps 500ing.
# This is a live reload of the queries, not a PostgreSQL restart.
cnpg.io/reload: ""
data: data:
queries: | queries: |
# Queue depth: jobs handed to a runner that have not started, plus the age # Queue depth: jobs handed to a runner that have not started, plus the age
@ -97,11 +104,28 @@ data:
# How long ago each runner last polled Forgejo. This is the only signal that # How long ago each runner last polled Forgejo. This is the only signal that
# says "the runner process is alive" independently of the pod being Ready — # says "the runner process is alive" independently of the pod being Ready —
# a runner that cannot reach the forge stays Running but goes stale here. # a runner that cannot reach the forge stays Running but goes stale here.
#
# This query MUST return at most one row per `runner` label value. The
# exporter treats a duplicate label set as a programming error and answers
# the whole /metrics request with HTTP 500 — which also drops every
# pg_stat_*/cnpg_pg_* series, not just this one (incident t_290ff037).
#
# Two defences, both needed:
# * `r.deleted IS NULL` — Forgejo soft-deletes a runner (sets `deleted` to
# an epoch, keeps the row), so stale registrations survive in the table
# after a runner is removed. They are not real runners and stay hidden
# from the admin API, but a raw table read would see them.
# * `GROUP BY r.name` with `max(last_online)` — the label *is* the name, so
# two live rows that share a name (a re-registered runner, or one pod
# started from a copied runner.ini) would otherwise collide. Reporting
# the most recent poll per name is the semantic we want anyway.
actions_runners: actions_runners:
query: | query: |
SELECT r.name AS runner SELECT r.name AS runner
, COALESCE(EXTRACT(EPOCH FROM pg_catalog.now())::bigint - NULLIF(r.last_online, 0), -1) AS last_online_seconds , COALESCE(EXTRACT(EPOCH FROM pg_catalog.now())::bigint - NULLIF(max(r.last_online), 0), -1) AS last_online_seconds
FROM action_runner r FROM action_runner r
WHERE r.deleted IS NULL
GROUP BY r.name
metrics: metrics:
- runner: - runner:
usage: "LABEL" usage: "LABEL"

View file

@ -35,18 +35,18 @@ apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: forgejo-prune name: forgejo-prune
namespace: forgejo namespace: ci-runners
labels: labels:
app: forgejo-runner app: forgejo-runner
role: prune role: prune
--- ---
# Least privilege: the job needs to find dind pods (get/list) and to run # Least privilege: the job needs to find dind pods (get/list) and to run
# docker inside them (pods/exec create) — in namespace forgejo only. # docker inside them (pods/exec create) — in namespace ci-runners only.
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
metadata: metadata:
name: forgejo-prune name: forgejo-prune
namespace: forgejo namespace: ci-runners
labels: labels:
app: forgejo-runner app: forgejo-runner
role: prune role: prune
@ -62,7 +62,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding
metadata: metadata:
name: forgejo-prune name: forgejo-prune
namespace: forgejo namespace: ci-runners
labels: labels:
app: forgejo-runner app: forgejo-runner
role: prune role: prune
@ -73,13 +73,13 @@ roleRef:
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: forgejo-prune name: forgejo-prune
namespace: forgejo namespace: ci-runners
--- ---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: forgejo-prune-scripts name: forgejo-prune-scripts
namespace: forgejo namespace: ci-runners
labels: labels:
app: forgejo-runner app: forgejo-runner
role: prune role: prune
@ -166,12 +166,12 @@ data:
dind-daemons.sh: | dind-daemons.sh: |
#!/bin/sh #!/bin/sh
# Prune every in-cluster dind daemon, discovered by label. # Prune every in-cluster dind daemon, discovered by label.
# Selector: pods with app=forgejo-runner in namespace forgejo that have a # Selector: pods with app=forgejo-runner in namespace ci-runners that have a
# container named `dind`. Nothing here is keyed to a pod name, so a new # container named `dind`. Nothing here is keyed to a pod name, so a new
# dind runner (e.g. the arm64 migration) is pruned the night it appears. # dind runner (e.g. the arm64 migration) is pruned the night it appears.
set -u set -u
NS=${NAMESPACE:-forgejo} NS=${NAMESPACE:-ci-runners}
CAP_BYTES=${CACHE_CAP_BYTES:-4000000000} CAP_BYTES=${CACHE_CAP_BYTES:-4000000000}
CACHE_AGE_H=${CACHE_AGE_H:-72} CACHE_AGE_H=${CACHE_AGE_H:-72}
CONTAINER_AGE_H=${CONTAINER_AGE_H:-48} CONTAINER_AGE_H=${CONTAINER_AGE_H:-48}
@ -263,7 +263,7 @@ apiVersion: batch/v1
kind: CronJob kind: CronJob
metadata: metadata:
name: forgejo-runner-prune name: forgejo-runner-prune
namespace: forgejo namespace: ci-runners
labels: labels:
app: forgejo-runner app: forgejo-runner
role: prune role: prune
@ -343,7 +343,7 @@ spec:
command: ["/bin/sh", "/scripts/dind-daemons.sh"] command: ["/bin/sh", "/scripts/dind-daemons.sh"]
env: env:
- name: NAMESPACE - name: NAMESPACE
value: forgejo value: ci-runners
- name: CACHE_CAP_BYTES - name: CACHE_CAP_BYTES
value: "4000000000" value: "4000000000"
- name: CACHE_AGE_H - name: CACHE_AGE_H

View file

@ -2,7 +2,7 @@ apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
name: forgejo-runner-amd64 name: forgejo-runner-amd64
namespace: forgejo namespace: ci-runners
spec: spec:
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
@ -15,7 +15,7 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: forgejo-runner-amd64 name: forgejo-runner-amd64
namespace: forgejo namespace: ci-runners
labels: labels:
app: forgejo-runner app: forgejo-runner
arch: amd64 arch: amd64
@ -25,6 +25,12 @@ spec:
matchLabels: matchLabels:
app: forgejo-runner app: forgejo-runner
arch: amd64 arch: amd64
# RWO PVC: never two pods on one data-root. Consequence to know before you
# touch this template: a rollout SIGKILLs the job container of any run in
# flight, and Forgejo then reports that run as a plain failure with the log
# cut off mid-step (no `exitcode` line) — seen as a 14 min "failing" push on
# sirius/sirius-growth, card t_29249bf0. Land template changes while the
# runner is idle.
strategy: strategy:
type: Recreate type: Recreate
template: template:
@ -36,7 +42,9 @@ spec:
nodeSelector: nodeSelector:
kubernetes.io/hostname: siriussec kubernetes.io/hostname: siriussec
securityContext: securityContext:
fsGroup: 0 # Group on the data volume; matches the runner's gid so the cache dir
# stays writable even before fix-data-perms re-owns it.
fsGroup: 1000
initContainers: initContainers:
- name: register - name: register
image: alex3305/forgejo-runner-dind:13-dind-rootless-28 image: alex3305/forgejo-runner-dind:13-dind-rootless-28
@ -68,6 +76,42 @@ spec:
subPath: amd64.toml subPath: amd64.toml
- name: data - name: data
mountPath: /data mountPath: /data
# The runner container runs as uid 1000 (the image's own user) and needs
# to read its registration and write the actions cache on this PVC.
# Both were created by root before this change, so re-own them once per
# start. Scoped on purpose: a recursive chown of the whole PVC would
# walk the dind data-root (tens of GB on the Pi).
- name: fix-data-perms
image: docker:27-dind
imagePullPolicy: IfNotPresent
securityContext:
# root is needed for exactly one thing: chown of the PVC.
runAsUser: 0
command:
- sh
- -c
- |
set -e
chown 1000:1000 /data
# Re-own the trees the runner itself writes: runner.ini, the act
# cache (cache/) and the action-repo checkout cache (.cache/act/).
# The re-own MUST be recursive. A top-level owner check is exactly
# what let this through once: /data/.cache was already 1000 while
# the git packs inside it were still root:root from the pre-uid-1000
# runner, so the guard skipped the one file that mattered and every
# job died in actions/checkout before any step ran:
# open /data/.cache/act/actions-checkout@v4/.git/objects/pack/
# pack-<id>.pack: permission denied
# (card t_29249bf0: 3 s red X, zero steps.) A few thousand small
# files; the dind data-root (/data/docker, tens of GB) stays
# root-owned and is deliberately not walked.
for d in /data/cache /data/.cache /data/runner.ini; do
if [ -e "$d" ]; then chown -R 1000:1000 "$d"; fi
done
true
volumeMounts:
- name: data
mountPath: /data
containers: containers:
- name: dind - name: dind
image: docker:27-dind image: docker:27-dind
@ -92,12 +136,14 @@ spec:
# layer uploads >~100MB, so in-cluster pushes are the reliable # layer uploads >~100MB, so in-cluster pushes are the reliable
# path for large images. # path for large images.
dockerd --host=unix:///var/run/docker.sock --tls=false --mtu=1420 \ dockerd --host=unix:///var/run/docker.sock --tls=false --mtu=1420 \
--group 1000 \
--insecure-registry=forgejo.forgejo.svc.cluster.local:3000 & --insecure-registry=forgejo.forgejo.svc.cluster.local:3000 &
pid=$! pid=$!
i=0 i=0
while [ "$i" -lt 30 ]; do while [ "$i" -lt 30 ]; do
# Readiness only: ownership is set by `dockerd --group 1000`
# (socket 0660 root:1000) so the runner's uid 1000 can use it.
if [ -S /var/run/docker.sock ]; then if [ -S /var/run/docker.sock ]; then
chmod 666 /var/run/docker.sock
break break
fi fi
i=$((i+1)) i=$((i+1))
@ -105,6 +151,31 @@ spec:
done done
wait "$pid" wait "$pid"
securityContext: securityContext:
# Cannot be dropped on these nodes. Verified live 2026-11-27
# (card t_2bbe34a8): a pod with `privileged: false` cannot host a
# container runtime in this cluster, at three independent points:
# 1. dind's own containers need CAP_SYS_ADMIN: runc mounts a fresh
# procfs per container, and without the capability the daemon
# fails with `mount src=proc ... operation not permitted`.
# 2. kubelet mounts /sys/fs/cgroup read-only for non-privileged
# pods, so dockerd cannot create /sys/fs/cgroup/docker
# ("read-only file system") and no container can start.
# 3. rootless dind (docker:27-dind-rootless) dies earlier: a
# nested user namespace cannot mount procfs because the pod's
# /proc is masked (kernel mount_too_revealing), and
# procMount: Unmasked is only accepted with hostUsers: false —
# where newuidmap cannot map subuids and /dev/net/tun cannot be
# created (mknod is refused in a userns pod, and hostPath is
# forbidden under Pod Security baseline).
# What this file *does* remove: the runner's uid 0, the privileged
# flag on CI job containers (runner configmap), and the old
# chmod-666 socket race.
#
# Consequence: this Deployment cannot live in namespace
# `forgejo` (PSA enforce: baseline there). All three runners,
# their PVCs and the prune CronJob live in `ci-runners`,
# which enforces PSA at `privileged` by design — keep that
# namespace free of anything but this CI capsule.
privileged: true privileged: true
volumeMounts: volumeMounts:
- name: dind-run - name: dind-run
@ -126,14 +197,12 @@ spec:
- name: runner - name: runner
image: code.forgejo.org/forgejo/runner:5.0.1 image: code.forgejo.org/forgejo/runner:5.0.1
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
# The image runs as uid 1000. The dind socket is created 660
# root:docker and the one-shot chmod 666 in the dind container can
# race a dockerd restart, after which the runner crashloops on
# "permission denied ... /var/run/docker.sock" (its wait loop only
# checks that the socket exists). Running the runner as root removes
# the dependency on that race; it is the uid the dind setup assumes.
securityContext: securityContext:
runAsUser: 0 # The image's own user. No root needed: the dind socket is 0660
# root:1000 (`dockerd --group 1000`) and fix-data-perms owns the PVC
# as 1000:1000, so the actions cache is writable.
runAsUser: 1000
runAsGroup: 1000
command: command:
- sh - sh
- -c - -c

View file

@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: forgejo-runner-arm64 name: forgejo-runner-arm64
namespace: forgejo namespace: ci-runners
labels: labels:
app: forgejo-runner app: forgejo-runner
arch: arm64 arch: arm64
@ -12,7 +12,12 @@ spec:
matchLabels: matchLabels:
app: forgejo-runner app: forgejo-runner
arch: arm64 arch: arm64
# RWO PVC: never two pods on one data-root. # RWO PVC: never two pods on one data-root. Consequence to know before you
# touch this template: a rollout SIGKILLs the job container of any run in
# flight, and Forgejo then reports that run as a plain failure with the log
# cut off mid-step (no `exitcode` line) — seen as a 14 min "failing" push on
# sirius/sirius-growth, card t_29249bf0. Land template changes while the
# runner is idle.
strategy: strategy:
type: Recreate type: Recreate
template: template:
@ -23,6 +28,10 @@ spec:
spec: spec:
nodeSelector: nodeSelector:
kubernetes.io/hostname: rpi kubernetes.io/hostname: rpi
# Group on the data volume; matches the runner gid so the actions cache
# stays writable after fix-data-perms re-owns it.
securityContext:
fsGroup: 1000
tolerations: tolerations:
- key: dedicated - key: dedicated
operator: Equal operator: Equal
@ -31,6 +40,44 @@ spec:
# No supplementalGroups: there is no host docker socket and no host # No supplementalGroups: there is no host docker socket and no host
# docker gid to match any more. The only daemon this runner talks to is # docker gid to match any more. The only daemon this runner talks to is
# the privileged `dind` sidecar below. # the privileged `dind` sidecar below.
initContainers:
# The runner container runs as uid 1000 (the image's own user) and needs
# to read its registration and write the actions cache on this PVC.
# Both were created by root before this change, so re-own them once per
# start. Scoped on purpose: a recursive chown of the whole PVC would
# walk the dind data-root (tens of GB on the Pi).
- name: fix-data-perms
image: docker:27-dind
imagePullPolicy: IfNotPresent
securityContext:
# root is needed for exactly one thing: chown of the PVC.
runAsUser: 0
command:
- sh
- -c
- |
set -e
chown 1000:1000 /data
# Re-own the trees the runner itself writes: runner.ini, the act
# cache (cache/) and the action-repo checkout cache (.cache/act/).
# The re-own MUST be recursive. A top-level owner check is exactly
# what let this through once: /data/.cache was already 1000 while
# the git packs inside it were still root:root from the pre-uid-1000
# runner, so the guard skipped the one file that mattered and every
# job died in actions/checkout before any step ran:
# open /data/.cache/act/actions-checkout@v4/.git/objects/pack/
# pack-<id>.pack: permission denied
# (card t_29249bf0: 3 s red X, zero steps.) A few thousand small
# files; the dind data-root (/data/docker, tens of GB) stays
# root-owned and is deliberately not walked.
for d in /data/cache /data/.cache /data/runner.ini; do
if [ -e "$d" ]; then chown -R 1000:1000 "$d"; fi
done
true
volumeMounts:
- name: data
mountPath: /data
containers: containers:
# In-pod Docker daemon. Same shape as forgejo-runner-amd64: privileged, # In-pod Docker daemon. Same shape as forgejo-runner-amd64: privileged,
# socket on an emptyDir shared with the runner, data-root on the PVC. # socket on an emptyDir shared with the runner, data-root on the PVC.
@ -58,12 +105,13 @@ spec:
# so without this `docker push 10.10.0.1:5000/...` from a job # so without this `docker push 10.10.0.1:5000/...` from a job
# fails with "server gave HTTP response to HTTPS client". # fails with "server gave HTTP response to HTTPS client".
dockerd --host=unix:///var/run/docker.sock --tls=false --mtu=1420 \ dockerd --host=unix:///var/run/docker.sock --tls=false --mtu=1420 \
--group 1000 \
--insecure-registry=10.10.0.1:5000 & --insecure-registry=10.10.0.1:5000 &
pid=$! pid=$!
i=0 i=0
while [ "$i" -lt 30 ]; do while [ "$i" -lt 30 ]; do
# Readiness only; ownership is set by dockerd --group 1000.
if [ -S /var/run/docker.sock ]; then if [ -S /var/run/docker.sock ]; then
chmod 666 /var/run/docker.sock
break break
fi fi
i=$((i+1)) i=$((i+1))
@ -71,6 +119,25 @@ spec:
done done
wait "$pid" wait "$pid"
securityContext: securityContext:
# Cannot be dropped on these nodes. Verified live 2026-11-27
# (card t_2bbe34a8): a pod with `privileged: false` cannot host a
# container runtime in this cluster, at three independent points:
# 1. dind's containers need CAP_SYS_ADMIN (runc mounts a fresh
# procfs per container).
# 2. kubelet mounts /sys/fs/cgroup read-only for non-privileged
# pods, so dockerd cannot create /sys/fs/cgroup/docker
# ("read-only file system") — no container can start.
# 3. rootless dind (docker:27-dind-rootless) dies earlier: a
# nested user namespace cannot mount procfs because the pod's
# /proc is masked (kernel mount_too_revealing), and
# procMount: Unmasked is only allowed with hostUsers: false,
# where newuidmap cannot map subuids, and /dev/net/tun cannot
# be created (mknod is refused inside a userns pod; hostPath
# is forbidden by Pod Security baseline).
# What *is* removed: privileged job containers (runner configmap),
# the runner's uid 0, and the host docker socket (no hostPath).
# This pod lives in namespace ci-runners (enforce:
# privileged), not forgejo (enforce: baseline) — see runner-amd64.yaml.
privileged: true privileged: true
volumeMounts: volumeMounts:
- name: dind-run - name: dind-run
@ -98,13 +165,12 @@ spec:
# job in onionwire/siriusdevops-contact. # job in onionwire/siriusdevops-contact.
image: code.forgejo.org/forgejo/runner:5.0.1 image: code.forgejo.org/forgejo/runner:5.0.1
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
# uid 1000 in this image vs a `660 root:docker` dind socket: the dind
# container's one-shot chmod 666 can race a dockerd restart and the
# runner's wait loop only checks that the socket exists, so it would
# crashloop on "permission denied". Running as root is what the amd64
# runner proved deterministic (2eff85b).
securityContext: securityContext:
runAsUser: 0 # The image's own user. No root needed: the dind socket is 0660
# root:1000 (`dockerd --group 1000`) and fix-data-perms owns the PVC
# as 1000:1000, so the actions cache is writable.
runAsUser: 1000
runAsGroup: 1000
command: command:
- sh - sh
- -c - -c

View file

@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: forgejo-runner-config name: forgejo-runner-config
namespace: forgejo namespace: ci-runners
data: data:
arm64.toml: | arm64.toml: |
log: log:
@ -26,7 +26,12 @@ data:
enabled: true enabled: true
dir: /data/cache dir: /data/cache
container: container:
privileged: true # CI job containers run unprivileged. They still get the dind socket (a
# bind mount in `options` below), which is what the build/deploy
# workflows actually need; nothing in them needs extra capabilities.
# This was `true` until card t_2bbe34a8 (audit F6): a privileged job
# container inside a privileged dind was node root twice over.
privileged: false
# No docker_host here: setting it makes the runner inject the socket bind # No docker_host here: setting it makes the runner inject the socket bind
# into the job container itself, which collides with the explicit # into the job container itself, which collides with the explicit
# -v /var/run/docker.sock in options ("Duplicate mount point"). The # -v /var/run/docker.sock in options ("Duplicate mount point"). The
@ -69,16 +74,28 @@ data:
enabled: true enabled: true
dir: /data/cache dir: /data/cache
container: container:
privileged: true # CI job containers run unprivileged. They still get the dind socket (a
# bind mount in `options` below), which is what the build/deploy
# workflows actually need; nothing in them needs extra capabilities.
# This was `true` until card t_2bbe34a8 (audit F6): a privileged job
# container inside a privileged dind was node root twice over.
privileged: false
# Same injection as arm64.toml: the job container is node:20-bullseye, # Same injection as arm64.toml: the job container is node:20-bullseye,
# which has no docker CLI and no buildx, and deploy-site.yml needs both. # which has no docker CLI and no buildx, and deploy-site.yml needs both.
# Both come from the dind sidecar's own filesystem. binfmt/QEMU is # Both come from the dind sidecar's own filesystem.
# registered kernel-globally on the Pi (the POC pod's #
# /proc/sys/fs/binfmt_misc was empty yet an amd64 build ran as x86_64), # NO --memory/--memory-swap on this runner: under Kata the guest cgroup
# so the `--platform linux/amd64` cross build works inside the pod. # root is `domain threaded` (only cpuset/cpu/pids are delegated), so
# --memory caps the job container only (sibling `docker run` containers a # dockerd cannot apply a memory limit to a job container and every job
# workflow spawns are outside the runner's control). # dies at `docker run` with
options: -v /usr/local/bin/docker:/usr/bin/docker:ro -v /usr/local/libexec/docker/cli-plugins:/usr/local/lib/docker/cli-plugins:ro -v /var/run/docker.sock:/var/run/docker.sock --memory 3g --memory-swap 3g # unable to apply cgroup configuration: cannot enter cgroupv2
# "/sys/fs/cgroup/docker" with domain controllers -- it is in threaded mode
# (measured 2026-11-27, run 1442). The bound is now the microVM itself:
# the dind container's 2Gi limit sizes the VM, so a runaway job still
# cannot touch the Pi's memory, and an OOM kills the VM (visible pod
# restart) instead of one job container. Jobs on the runc runners keep
# their limits.
options: -v /usr/local/bin/docker:/usr/bin/docker:ro -v /usr/local/libexec/docker/cli-plugins:/usr/local/lib/docker/cli-plugins:ro -v /var/run/docker.sock:/var/run/docker.sock
valid_volumes: valid_volumes:
- "**" - "**"
@ -98,7 +115,12 @@ data:
enabled: true enabled: true
dir: /data/cache dir: /data/cache
container: container:
privileged: true # CI job containers run unprivileged. They still get the dind socket (a
# bind mount in `options` below), which is what the build/deploy
# workflows actually need; nothing in them needs extra capabilities.
# This was `true` until card t_2bbe34a8 (audit F6): a privileged job
# container inside a privileged dind was node root twice over.
privileged: false
# No docker_host: it injects the socket bind into the job container, # No docker_host: it injects the socket bind into the job container,
# which collides with the explicit -v /var/run/docker.sock in options # which collides with the explicit -v /var/run/docker.sock in options
# ("Duplicate mount point"). The options bind is the deliberate choice. # ("Duplicate mount point"). The options bind is the deliberate choice.

View file

@ -19,7 +19,7 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: forgejo-runner-deploy-arm64 name: forgejo-runner-deploy-arm64
namespace: forgejo namespace: ci-runners
labels: labels:
app: forgejo-runner app: forgejo-runner
arch: arm64 arch: arm64
@ -30,6 +30,12 @@ spec:
matchLabels: matchLabels:
app: forgejo-runner app: forgejo-runner
role: deploy role: deploy
# RWO PVC: never two pods on one data-root. Consequence to know before you
# touch this template: a rollout SIGKILLs the job container of any run in
# flight, and Forgejo then reports that run as a plain failure with the log
# cut off mid-step (no `exitcode` line) — seen as a 14 min "failing" push on
# sirius/sirius-growth, card t_29249bf0. Land template changes while the
# runner is idle.
strategy: strategy:
type: Recreate type: Recreate
template: template:
@ -46,6 +52,16 @@ spec:
operator: Equal operator: Equal
value: network value: network
effect: PreferNoSchedule effect: PreferNoSchedule
# Kata microVM (apps/base/forgejo/kata-runtimeclass.yaml, installed on rpi
# only). The pod is still `privileged: true` — a nested dockerd needs
# SYS_ADMIN+NET_ADMIN in the spec and PSA baseline forbids those two, so
# `ci-runners` stays at enforce: privileged (docs/pod-security.md). Kata
# changes the *consequence*: that privilege is VM root, not rpi's host
# root. Rollback of this whole experiment is this one field.
runtimeClassName: kata-qemu
# Group on the data volume, matching the runner gid (see fix-data-perms).
securityContext:
fsGroup: 1000
initContainers: initContainers:
# Registration guard, NOT a registration step. The runner's identity # Registration guard, NOT a registration step. The runner's identity
# (`runner.ini`, action_runner id 14 / uuid a41aad73-…) is copied onto # (`runner.ini`, action_runner id 14 / uuid a41aad73-…) is copied onto
@ -73,6 +89,41 @@ spec:
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /data mountPath: /data
# The runner container runs as uid 1000 (the image's own user) and needs
# to read its registration and write the actions cache on this PVC.
# Both were created by root before this change, so re-own them once per
# start. Scoped on purpose: a recursive chown of the whole PVC would
# walk the dind data-root.
- name: fix-data-perms
image: docker:27-dind
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 0
command:
- sh
- -c
- |
set -e
chown 1000:1000 /data
# Re-own the trees the runner itself writes: runner.ini, the act
# cache (cache/) and the action-repo checkout cache (.cache/act/).
# The re-own MUST be recursive. A top-level owner check is exactly
# what let this through once: /data/.cache was already 1000 while
# the git packs inside it were still root:root from the pre-uid-1000
# runner, so the guard skipped the one file that mattered and every
# job died in actions/checkout before any step ran:
# open /data/.cache/act/actions-checkout@v4/.git/objects/pack/
# pack-<id>.pack: permission denied
# (card t_29249bf0: 3 s red X, zero steps.) A few thousand small
# files; the dind data-root (/data/docker, tens of GB) stays
# root-owned and is deliberately not walked.
for d in /data/cache /data/.cache /data/runner.ini; do
if [ -e "$d" ]; then chown -R 1000:1000 "$d"; fi
done
true
volumeMounts:
- name: data
mountPath: /data
containers: containers:
- name: dind - name: dind
image: docker:27-dind image: docker:27-dind
@ -81,30 +132,87 @@ spec:
- sh - sh
- -c - -c
- | - |
set -e
# --- Data root: ext4 on a loop device, not the virtiofs mount ---
# Under Kata every Kubernetes volume is a virtiofs share, and
# overlayfs refuses virtiofs as an upperdir ("failed to mount
# overlay: invalid argument"), which leaves Docker on `vfs`
# (layer copies). A loop-backed ext4 image on the PVC restores
# overlay2: measured inside the guest 2026-11-27, Storage Driver
# overlay2, 16 GiB volume, survives pod restarts because the image
# file lives on the claim. Losing it only costs a cold image cache.
IMG=/data-docker/kata-ext4.img
[ -f "$IMG" ] || fallocate -l 16G "$IMG"
[ -b /dev/loop0 ] || mknod /dev/loop0 b 7 0
if ! losetup -a | grep -q "$IMG"; then
losetup /dev/loop0 "$IMG"
fi
blkid /dev/loop0 | grep -q 'TYPE="ext4"' || mkfs.ext4 -q -F -L katadocker /dev/loop0
mount /dev/loop0 /var/lib/docker
echo "dind data-root: $(df -hT /var/lib/docker | tail -1)"
# --insecure-registry: the Pi registry is plain HTTP on the WG # --insecure-registry: the Pi registry is plain HTTP on the WG
# hub IP. Docker only treats 127.0.0.0/8 as insecure by default, # hub IP. Docker only treats 127.0.0.0/8 as insecure by default,
# so without this `docker push 10.10.0.1:5000/...` from a job # so without this `docker push 10.10.0.1:5000/...` from a job
# fails with "server gave HTTP response to HTTPS client". # fails with "server gave HTTP response to HTTPS client".
dockerd --host=unix:///var/run/docker.sock --tls=false --mtu=1420 \ dockerd --host=unix:///var/run/docker.sock --tls=false --mtu=1420 \
--group 1000 \
--insecure-registry=10.10.0.1:5000 & --insecure-registry=10.10.0.1:5000 &
pid=$! pid=$!
i=0 i=0
while [ "$i" -lt 30 ]; do while [ "$i" -lt 30 ]; do
# Readiness only: ownership is set by `dockerd --group 1000`.
if [ -S /var/run/docker.sock ]; then if [ -S /var/run/docker.sock ]; then
chmod 666 /var/run/docker.sock
break break
fi fi
i=$((i+1)) i=$((i+1))
sleep 1 sleep 1
done done
# --- binfmt: the deploy cross-builds linux/amd64 under qemu ---
# deploy-site.yml runs `docker buildx build --platform linux/amd64`
# and until now that worked because the Pi HOST kernel had the
# qemu binfmt handlers registered. A Kata pod has its own guest
# kernel, so nothing is registered and the build dies with
# `exec format error` / `buildkit-qemu-x86_64: not found`.
# Registering inside the guest is per-VM state: it must run on
# every pod start. The tonistiigi/binfmt image is cached in the
# data-root after the first start, and the registration uses the
# F flag (interpreter fd is held by the kernel), so the image can
# exit immediately afterwards.
mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc 2>/dev/null || true
if ! grep -q . /proc/sys/fs/binfmt_misc/qemu-x86_64 2>/dev/null; then
i=0
until docker run --rm --privileged tonistiigi/binfmt --install amd64 >/dev/null 2>&1; do
i=$((i+1))
if [ "$i" -ge 3 ]; then
echo "WARNING: could not register qemu-x86_64 binfmt; amd64 cross builds will fail" >&2
break
fi
sleep 3
done
fi
grep -q . /proc/sys/fs/binfmt_misc/qemu-x86_64 2>/dev/null &&
echo "binfmt: qemu-x86_64 registered" || echo "binfmt: NOT registered" >&2
# Job containers must not start before the daemon AND the
# cross-build emulation are ready; the runner waits on this file.
touch /var/run/dind-ready
wait "$pid" wait "$pid"
securityContext: securityContext:
# Still required UNDER KATA: the caps a nested dockerd needs
# (SYS_ADMIN for mounts/overlay, NET_ADMIN for docker0/iptables)
# are caps the pod spec must add, and PSA `baseline` forbids both —
# no runtime works around that (measured: sysbox, gVisor, Kata, see
# docs/pod-security.md). What Kata changes is the blast radius: this
# is root inside a QEMU/KVM microVM, with no host namespaces and no
# host kernel, not root on rpi. On a runc runner the same flag is
# host root.
privileged: true privileged: true
volumeMounts: volumeMounts:
- name: dind-run - name: dind-run
mountPath: /var/run mountPath: /var/run
# The claim holds the loop-backed ext4 image (kata-ext4.img) rather
# than being dockerd's data-root directly: see the startup script.
- name: data - name: data
mountPath: /var/lib/docker mountPath: /data-docker
subPath: docker subPath: docker
resources: resources:
# Deliberately smaller than the shared runner's 4Gi. A deploy is two # Deliberately smaller than the shared runner's 4Gi. A deploy is two
@ -125,15 +233,23 @@ spec:
image: code.forgejo.org/forgejo/runner:5.0.1 image: code.forgejo.org/forgejo/runner:5.0.1
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
securityContext: securityContext:
runAsUser: 0 # Image default user. The dind socket is 0660 root:1000
# (`dockerd --group 1000`) and fix-data-perms owns the PVC as
# 1000:1000, so no root is needed here.
runAsUser: 1000
runAsGroup: 1000
command: command:
- sh - sh
- -c - -c
- | - |
set -e set -e
# Wait for the dind sidecar AND its per-VM extras (loop-backed
# data-root, qemu-x86_64 binfmt) — under Kata both are set up
# inside the guest on every pod start, so the socket alone is not
# "ready". dind touches /var/run/dind-ready last.
i=0 i=0
while [ "$i" -lt 60 ]; do while [ "$i" -lt 90 ]; do
if [ -S /var/run/docker.sock ]; then if [ -S /var/run/docker.sock ] && [ -e /var/run/dind-ready ]; then
break break
fi fi
i=$((i+1)) i=$((i+1))
@ -165,4 +281,17 @@ spec:
persistentVolumeClaim: persistentVolumeClaim:
claimName: forgejo-runner-deploy-arm64-dind claimName: forgejo-runner-deploy-arm64-dind
- name: dind-run - name: dind-run
emptyDir: {} # tmpfs on purpose, NOT the default disk-backed emptyDir: under Kata a
# disk emptyDir is a virtiofs share, and a unix socket created on
# virtiofs is visible to the other containers in the pod but
# unconnectable. Measured 2026-11-27: the runner crashlooped on
# `cannot ping the docker daemon ... unix:///var/run/docker.sock`
# although `ls -l` showed the socket `srw-rw---- root:1000`, while the
# dind sidecar's own `docker version` on the same path worked. A
# memory-backed emptyDir is a tmpfs inside the guest, so the socket is
# a real inode the runner and the job containers can both connect to,
# and the existing `-v /var/run/docker.sock` job option keeps working.
# 64Mi holds the socket, the `dind-ready` marker and nothing else.
emptyDir:
medium: Memory
sizeLimit: 64Mi

View file

@ -64,7 +64,7 @@ apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
name: forgejo-runner-arm64-dind name: forgejo-runner-arm64-dind
namespace: forgejo namespace: ci-runners
labels: labels:
app: forgejo-runner app: forgejo-runner
arch: arm64 arch: arm64
@ -108,7 +108,7 @@ apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
name: forgejo-runner-deploy-arm64-dind name: forgejo-runner-deploy-arm64-dind
namespace: forgejo namespace: ci-runners
labels: labels:
app: forgejo-runner app: forgejo-runner
role: deploy role: deploy

View file

@ -0,0 +1,24 @@
apiVersion: v1
data:
id_ed25519: ENC[AES256_GCM,data:amT/cj/RxpH62Bikn6MgHAZSud+3pzC80QgLFfbE7s83HPzndasB6HHG5FCjuhcU47IkyYwtpZXGa5BkAT5Ohidei6dV9+AbdLuTMer1UbIiPt5WQ6oUFysfTQrmwShbLH8imTr7j/xZ1/0gNpVrXGWjM4udKFqPoACR52JQsGSdH6dNleRyeZhxWmIiqwG5iFY8kJL4ARzTsjZNGCGVLalZFE+QKxiiQo+FTpjNMit+FNub4S8Q6lmHDHC5+gCLSOpJs+V1Jeijp7HCKQEzqgFzt3Gfj/HRHmmqQNHqB0OoP8+pJJ8dWxroHMf3zQv0DHj23Uer3zVpECzL3WInzLvGFq/E5CRbmDgPPaQJLTgy0YYdTwugBR6nf5PfjtJzeXV+EkoaNLsoywCdRwJ2HiT1B5dqZ0TsWu4WnyQzGev8fnfFsQcLxPTUcdhLKwqpFc0esScSPniRHgexR2A2HZqSQkpL5j2eAB/Hmsv9/632fd8iySliSISvwXb0Wv2T5BD5kQPMVqeWK6nmRWQeh2tI+IZbWUPSb6vSKgqQDNgtbL2m2uGV1rEMMdYONZrqzqPPwSWIK2QDoa2IhL50EvtQBk7/lFhVyYD/+k2zNc1jpptV/PTkWd3x4TMki/rVWBDIr87xkCMnAcx0+epMI9y07PpiEPO1OhG6GMNvDSO0B6UpN++RzouO2jgK649Kwk1Qsng9/jva4IasRxXon0biw4fxlKaWZR+pZyNmaSk=,iv:8sYhy8yMT59au1yHGhsfXFS9O4VXbYUMp6DNAjnUL+c=,tag:auvDjZ4Q+qVPNsGhHLkBYg==,type:str]
known_hosts: ENC[AES256_GCM,data:UHGQnYI70Gu3hEhwQKeilrvqNpQcrHyQHSO1Z079Ono6FzGR2yy+0vTBjvu8Jv9jiJKpBvs8INjXgN4RmBsOquuUsTt44Z6efVLZVlU8EsX/w7VIYdovFO5N43opOgeojhMZYb6BpdxF7oA7+VuG/J/AMHjAY2qKd/lESQ==,iv:KE/Nr2RiWFeS+jD289z07JHLxdSI6zqThrFkkmPJQEU=,tag:le8FwTGLY72La1/fiTeQJA==,type:str]
kind: Secret
metadata:
name: cluster-backup-ssh
namespace: forgejo
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBENlJFaTFnbkJkMWdkSTdz
Rm03VFo2OG52NFQzRkZpa1ZNNHRiY1kva2dFCm01Vmc0YlFyRGZBUDMweTZrVzNH
YTJjY2YrTHV1VFNXSEM4b1hHcFFkSUUKLS0tIGdNOExKc3BldmFtYmpNcVNqTzk1
VTM3ZEgyK1k0YldmejRERWVhK1BrakEKJQP4I7pCfLn5BYEwEb4I9K1fpYnKL4w+
Jf3c1c+qNaaet9nDrP2WW1L6rug+K6iAkR1H6ywHVKH7Ue1Ft5T/Lw==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:29:49Z"
mac: ENC[AES256_GCM,data:2RqTlxczkP9OHpqmjwdkOM3Ha68tIfvCnLOl/A2pqERR2bkxnWP87vVCKs3pZBZffQCU8NuK27yzBPSCHAPl4GUgt7QaUFHdHgsrbXIbDw1ZJ8ZVNLeIg2kLkJognhA1VOZZgL1oEKR+djBrqFJvHUWQfbkLrtoW5Rch/Qv+eDA=,iv:03IgpSHCqJuhFCykSjdqQhmoZfk6JNm4TxQtrtMY23E=,tag:Ln9PynG0Jll+0ZHC6D6l/w==,type:str]
version: 3.13.3

View file

@ -0,0 +1,24 @@
apiVersion: v1
data:
password: ENC[AES256_GCM,data:H4walqRkdqsGO3cz,iv:dNH/Nz3J5c7M4e63af8m61Z36yIoNk4amyzdBE8/Pl0=,tag:MHn7hR/XtLnSIwmPgzwEOg==,type:str]
username: ENC[AES256_GCM,data:mEySjuVo1GP9rKo0,iv:IG+GwOj9QuRh72XLjoG/Ho5MToL7g2PPZzziGlGCMvo=,tag:dR/oB5baTxayoHZzCxbBSg==,type:str]
kind: Secret
metadata:
name: forgejo-pg-app
namespace: forgejo
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBrQ29kbmRoYk4vbVlRZ3Fy
SUFCNnRtZDR0aGQvb0p5WXh1a296QXkveUVVCnlrTzBKSXNvNmRTZ0NTVzVSRHF1
YldwUlZVSld4dHBnQ2xSeUJVVm9LSEkKLS0tIDR1bDFhRGJkM2dUZ0phRGw2Qkxt
a1p2ckF1UDJCQmtMMThrbE1ydGpFODgKbslEW80bDRppJ+ZlBPS4HWbYZ/s+NeCm
ZoH/JkANBSlIJqb1osQDfSnJ6aBOkIGZcmSFR7GznvO1DsO9TaFUVg==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:42Z"
mac: ENC[AES256_GCM,data:k+L4q6BRMFWIjKm1MA+TSpSa9yWCN7KX/6US5HU/+cnrM4hIhBdgdLuCSZjgm0A/Ny8L3unGRK0vdtyU8EVSaQItd2PyhGgZpyzkGkbcme/DzT9ylCJtQTfG3r41Xtya8DHgEppeTmvRWFBGtV2rIYpb0+LtvMcyvf0mLs2MS/k=,iv:x+r5X+NNpcW/wsMx1Lv2FibF6IH7bIcxuEKSEen2LEI=,tag:zsUj99VwOig4jzcp4P+cXQ==,type:str]
version: 3.13.3

View file

@ -0,0 +1,23 @@
apiVersion: v1
data:
.dockerconfigjson: ENC[AES256_GCM,data:QS5gZUJ0zi3YYSaCpJWSCA/JakeknWmlQ8WVKlyxh2k4zo/Ul33lhH5iQP27Z3ec6FyEtV8TUSdhkq1wGSCF7cRu00ze4qljMuviU35x2Dl5aMc7JEWvRPnypoBYNmTRulPZh5E3GdiR9VUzok643P0igJyHlQBjO8HkLiuZ41Zd7JYordQRPTH4tXlDbiJPEPfkMEyFHY/6XdEEUNv5eIUyb004d1xZccnGaMwliVNBL5xIbJpb4Bza9/Z8NYsq70cmjHH/hFq7uotnSt3B53vPnwf6Rsq9j44i3M0xQjHQf+QYa34mFncHznwxPczLo8wcmKFmZYkNZNXxzc/NryeC4w950GUZ+cSO1UKLhS8IGIal8S05IWmeIuda1k9V,iv:AN7Fn/JmSYqiERsqneSOMeV3kMRGcawgV4Y9iJrjF7E=,tag:XwEZy+ULOGiFTW1diodMgg==,type:str]
kind: Secret
metadata:
name: forgejo-pull
namespace: forgejo
type: kubernetes.io/dockerconfigjson
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBjTmlMUDZOdnc1U3RGM1Jh
TTNmU3pRV3M1Y2lkNitqMkE0WHRZdXNOSlRJCnZ2eDB3ZXpvWDR6dHJBeWJpdElI
a24xelp4dGluNXNGUzJYOWlPNzdwM0EKLS0tIGJuUk1CUEEvZlVWYlFKTnVwWVRS
M2o5LzBJSEpXaklKc0ZMZ0FDa3NlV0UKmNVnlKd/Xqbisox3hrAeK45sbLJW5yS3
Y6KfweCLwk6edQ9YflAvmk2FWVi0PIMdmloObXVSvB/ZY+jeLlK4lA==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-12-04T05:28:22Z"
mac: ENC[AES256_GCM,data:goW5PeSFtc0ga5gTDAZpYFQ8xBTXA2dgOomUK9t9GX3T7nswhu6fmfXJ2zjqyYLKJ5wnVEY4pvwx9RThEpU0khcP8iBqyrzUvIEXUsoQ5lTegRxgyuowPKWBkQcrJPx5GEgHSJr5J6XlDKbbCeOW0SxnerPhpJ03ueh3yULPgKw=,iv:Z/hm3jpUXzWeabPXuecuAIm+bemjluy/xjas8dg7bUY=,tag:3coZnG6p2v6ZT0raG7b1IQ==,type:str]
version: 3.13.3

View file

@ -0,0 +1,23 @@
apiVersion: v1
data:
token: ENC[AES256_GCM,data:TT4kDSMmP259CxpdexoWaHlaBl5hOnYqUDHTPW2hBqiyrvvaCDNmLtVeYCpekdljTTNGE9NhOoA=,iv:Ynh6mW0xb/O2JYKBG/AtWJoAkJT2Z2hWqTaRL7zA+ds=,tag:nhO9I6WNb2mL3DxvQtZROg==,type:str]
kind: Secret
metadata:
name: forgejo-runner-amd64-token
namespace: ci-runners
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBseXNtekZHaUdLbnJTUGVo
cDYxdVBSVWdNU2x3amYwZHVVeTYyS0Y2eER3CnMxZmRiaGQycnZwMzMzV1lLUnBW
RXozMkRKdmlCZ0pWdTN4RlhrZWY5UzgKLS0tIG45b2puajRzVHFPa1U5Q0ltc0Iw
V0YrbFlHdVFQR3lPR3lYZkUzc2dXaW8KLLBVWz48aA3NzxTPXun2Eu7+pTnv0BB4
k84ePj2d6bMe64BQ9K9q1uieW/LQuXtwV0lMbfSXw5GAPCxBzs6vCA==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T06:18:39Z"
mac: ENC[AES256_GCM,data:+hlch3XHEHTl+PUFjAjIL/cJdGIJBtwlA3gldWYpUVtsKOPJ2Vfi5DUfwodvpTCSjZYTTipR4Kz2BoAhQ9y+vVMGfTKko/1fA5UMjf74uiCXhur0B2vyAcFUn79xrZql/J6q7DmkufHveS7baNd5YRQSLV6Catm70IkIL81o1/Q=,iv:6esPz9ggtY0+5NedEfET0NfX39xw5fwokVNQB3ak24s=,tag:+5WduOvKK35AV65auauM2Q==,type:str]
version: 3.13.3

View file

@ -0,0 +1,23 @@
apiVersion: v1
data:
token: ENC[AES256_GCM,data:e30FrA4NWWy3dSIL1cuzYIWRzcakdC0s3ij9HjoLnkeMEznrg3Y50QgQlnKwilF+DpEdWYmVJRI=,iv:ZKFHDaC0WJF2fFazCb0Z/QhAEk1HIdB+puaOqqCqo9E=,tag:FGSd0IVL16rJr94lBAnVTA==,type:str]
kind: Secret
metadata:
name: forgejo-runner-deploy-arm64-token
namespace: ci-runners
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBzbzJicHJ4V0RFc2Q0ZGpT
Z3ZGVHgxbnpUOXZZUHhydHBVRnlJUFNFbURrClJzRWVFaUhKdXN1dHlPT2o0MHI5
RjM3SHpTQ29GOUlxTC9GNnhickhZOWMKLS0tIFhwSjlIbWNWMy80R1BBVWc0NUtH
cU5VVGV1YjJSZXdhZ0NCbk9PV2I4WmsKcmyzdWfyD8gMzr/tmuTZZPQILB1HBMTT
/6oxp31Xar+mCMF4OoBZaDb7y3Y1Pn2Rb7L2uu5mfgPgmpN3y+re4Q==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T06:18:39Z"
mac: ENC[AES256_GCM,data:/SrVMnWWPRDMJYCWcGsmyIp3VuBBEw1pzKSHCty/ZUuqlE4IrvAaQpisAF8ByMsOBTc80JfRjaiFYr5nu1L7jlTDbivPHXAc4CgLMX3FGtvqTgrmPCwvjUV2x0kK6pSNgo/AuDmFYCh+UKqyNEToi4uDnqtiXwy91fsfvg60fLw=,iv:S3SOMKy6ZYWdYKC8DZs4mdQhPTMv/bt+d8+UO5cKOLI=,tag:YvHkNscDXMutN5BFekrfow==,type:str]
version: 3.13.3

View file

@ -2,9 +2,16 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- namespace.yaml - namespace.yaml
# Secret metabase/pg-app (kubernetes.io/basic-auth) is created out of band # Secret metabase/pg-app (kubernetes.io/basic-auth) is reconciled by Flux from
# before this Cluster applies — CNPG's initdb reads it. # secret-pg-app.sops.yaml and sorts before this Cluster applies — CNPG's
# initdb reads it. It is hand-made (not operator-generated), so it is in git.
- cluster.yaml - cluster.yaml
- deployment.yaml - deployment.yaml
- service.yaml - service.yaml
- httproute.yaml - httproute.yaml
# Secrets, SOPS/age-encrypted in git. Flux decrypts them (the `apps`
# Kustomization carries a decryption block; key = flux-system/sops-age).
# Never add a plaintext Secret next to these — see docs/secrets-sops.md.
- secret-pg-app.sops.yaml
- secret-metabase-admin.sops.yaml
- secret-metabase-data-source-creds.sops.yaml

View file

@ -3,4 +3,10 @@ kind: Namespace
metadata: metadata:
name: metabase name: metabase
labels: labels:
pod-security.kubernetes.io/enforce: baseline
pod-security.kubernetes.io/enforce-version: latest
pod-security.kubernetes.io/warn: restricted
pod-security.kubernetes.io/warn-version: latest
pod-security.kubernetes.io/audit: restricted
pod-security.kubernetes.io/audit-version: latest
app.kubernetes.io/part-of: metabase app.kubernetes.io/part-of: metabase

View file

@ -0,0 +1,24 @@
apiVersion: v1
data:
email: ENC[AES256_GCM,data:rSxf/qzkNLOYvRhqRxvuFi5SbwH5BdiAh3qUbV5ynIg=,iv:JIOnFqnGCcCgsba36zLU7lAAp43KM9PWRQvlrVmnYfE=,tag:YoKBUG4V0j8nN+/9vCXUpw==,type:str]
password: ENC[AES256_GCM,data:2rIdkTBMe4eK6I6NcGOf2orAxq4=,iv:WlKSOxWd/8I+cWCWCaOZ3WrlhswHUO9RvoTM1lhKFos=,tag:SDLueoH6MtLuxftOtfA4Yg==,type:str]
kind: Secret
metadata:
name: metabase-admin
namespace: metabase
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBlMVUzSnlrZ1FoYWxRVkdm
a3VWTVhOQmlDUmpvT0ZQSjRlaVAxNkxPMWpjCmMvNE1QNzRzdFdqa2k3RU9BNC9N
NFowc1JPVE5HOVA1cTR3TUx6Zi9CWWMKLS0tIFo3UzBJS0c5ZGFNN3pXSzJaZXdw
cThCcDBSRTg1RUpGWi8xR2tacHJySGcKrR7IwYj6xSPVRpo/Gh4QtEmzvaKpQIP3
kdMqC0JjssYyPa6Ma05WeSwPJc4XYbnJvSdZ30oKCPz/932DqezjEQ==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:44Z"
mac: ENC[AES256_GCM,data:uvinNP0pa9eCvvS369kLdO3Q+ndyjntl9nIeub9ELqcbjmc73PQ9I3ZKGHUp0l5vs3CXHdcs1cj1CPW60cg1W7IM7/vc+9X5pcV3Lm7W16HkUd5HUGeVQ4esvTuIuKbNL3q7RlRJcV8VcAuBy5e1u8RP4q2DgByYFcJHgDO+i7c=,iv:8+VDwUD7z0GN5h/myEAhMxuFQiCqQyCqd4hACzpjF/A=,tag:rUcUXMesFafj+gNfk9ptOQ==,type:str]
version: 3.13.3

View file

@ -0,0 +1,34 @@
apiVersion: v1
data:
forgejo-dbname: ENC[AES256_GCM,data:gmo/OBPxeaP9Fipp,iv:Ox4X0Rarty34CIqGCjq8BEKWtqnHl6HYhg5xCMcJWTE=,tag:/B/acow8oHArOzUCCXN83A==,type:str]
forgejo-host: ENC[AES256_GCM,data:SV7TR0efatA7tEoXWxYIvFAusxvzQ+we8AUPgaBbWOyxc3ELNSCIGOUT+f4=,iv:FxusrKEyCO9QnHhA5eTGRZ2a7dBLBJvvp28E1juRRG0=,tag:jGNv9x6IJBx+iouX4Uou5w==,type:str]
forgejo-password: ENC[AES256_GCM,data:PO6aePZCvedhgNOfuQqGevdrTh1cfTdXYf+Rdexb/uVBSnWTkL6gIg==,iv:T+l5cf/yilZG4Z0tnnHhsftOboQXCBLASKJimh2LUbc=,tag:Uw2vPOExu2D9HDWXSu3iPg==,type:str]
forgejo-port: ENC[AES256_GCM,data:F7H6ChWTeAY=,iv:YUdaHOFEiEz7ZeIyfeC1VWTFQNNoIGaZrmPwlzqMVJs=,tag:l6qT/AWoIIqTZ40Pc9lw9A==,type:str]
forgejo-sslmode: ENC[AES256_GCM,data:BU3vfFVDLkuTZV3E,iv:kDmERO+Gl6D9bX7rkJg6U9Z+g+EKKLlZ7wIBr2VYfLM=,tag:yjcqdBXhJrrU/FJ/Nf6+YA==,type:str]
forgejo-user: ENC[AES256_GCM,data:aJPzpcz5u3Sh1RhcQK3qog==,iv:aodz6CpcBSQL9fgdEJIg69iZHoYc3OCSExG5HeXILjE=,tag:CxAUC7WxS5QLEhY3lVw9qg==,type:str]
portal-dbname: ENC[AES256_GCM,data:0Ti0JmAoS6Y=,iv:qIcLJlZERTwgIOepcBlnXmOgCg65RGXfyC46I9Fovgk=,tag:8RxJYWHrV/vLWSz05Ac9vw==,type:str]
portal-host: ENC[AES256_GCM,data:h6tPmzff8EJ8Ql+WQYOVrEPwQRob1+HKCjLQMsUnLgMSY2+f60dMDz7hLnrUmHFPxxvoJgU7CoM=,iv:et5rzeL4gJHbPCGZ7kQUuM/QP7oJFe9Q+P6POvg/A8E=,tag:nRI8FfVZ390tXhHTGHROCg==,type:str]
portal-password: ENC[AES256_GCM,data:DrZWsGK/f85EHAPepblr/hBPA/dihnz1Kn3bJzYC3gVxgpAcH+dMMw==,iv:hu/d9jTn2vbY27/R47PhA+WofZlT+wyXH26XHnzNMmQ=,tag:VsaO0yzgq98XUicoHZx78A==,type:str]
portal-port: ENC[AES256_GCM,data:SVCVoBJYfS0=,iv:eX6Cs9A2rcqNNFk9K98rBUc3rmwros0TUSOJSm845HI=,tag:BbUr0/piTIEnlU4nqnpZZw==,type:str]
portal-sslmode: ENC[AES256_GCM,data:7ubXQi4spO0NfIgu,iv:2cRu2i3wkMH/iDqn7n83GFFQZWI4OiVoxX+tYDUA5b4=,tag:6gRNiqkNTCOnjjpFQp1EHw==,type:str]
portal-user: ENC[AES256_GCM,data:HUfMGD0WAvmJtJ6JuLH6pA==,iv:Mk8H1L+MJQaog2nqLjT2mMOHa1vglRBq+c/wf+lZEuA=,tag:QzMABZMDoTtI31+2qj+aBA==,type:str]
kind: Secret
metadata:
name: metabase-data-source-creds
namespace: metabase
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBkWmJjUXJRNWp3dXo4TXdG
YnlWWW9GZEo0TVdDOFdNTkhhZDM5S3dENWk0CkErU1AxbkFkNEFXUDRvY0l0RS95
RndhcXhCWmE3RmhhYXpkWUR5ci9TWlkKLS0tIDFWUFlpWEZlWnljNENwakY1cGxl
ekNHcFRiOCtLME42ZXlxbzY3cjZSZlEKLnBl2Itg/66k3jVj9qf7mw4LNa2e1nvp
ANamRxri3UhgVPH6n7E8avoxhzcPmtk313ySDM7Ooi5+wu7naAP2MA==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:44Z"
mac: ENC[AES256_GCM,data:TsWeIy/VbxnlxtWBFv4vF2lY0CPPO7eJlSRBFnEDmN3nLkj/IZ4/4BC7UeHsw+fETgU26qq/PGc547rR98qYwcDZvT0OwQRrB1Eqdx9P3673tXrxU4Wy5mvICQoSHFjKqLZ/k/fWawudlG4/fgHhHScTcNDZ+iaxtNcc43Evhmg=,iv:fOLCtNDfiUPCgZL9SYO6YxdMOSJZbtW8WdxJHGH7AEY=,tag:gcJDXghgLSqxu6YkBgpA7Q==,type:str]
version: 3.13.3

View file

@ -0,0 +1,24 @@
apiVersion: v1
data:
password: ENC[AES256_GCM,data:C/H4TxLcON+WTr8r0mkhsW0WEdNCFgwcpMUj1BxkDN1R++OYQnqlnQ==,iv:9h/QMnIaZH/gG8sWd1m8VYvwg+LG0L68aEhtMt93ww0=,tag:ReqAmk3Rpo0Fuak712PFUQ==,type:str]
username: ENC[AES256_GCM,data:5p+BVEPC2CElDfdw,iv:qSs3WIvW6agduscSpEinigwnbjLQKY1BcvEK5wTFyic=,tag:t4qnFK/+r2AcFde05XmoBg==,type:str]
kind: Secret
metadata:
name: pg-app
namespace: metabase
type: kubernetes.io/basic-auth
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBIbjlkSnBvQnZOaDFQMVJ0
RnFPVzJORmNIZVVGMk91YTFjK1g4OTgrS0MwCkNOZnpLOHpESnV0RTdEci9BV2VX
cVMwaXhyT1dkNmFoL085L0N2NFRXa28KLS0tIFQ5dXROejd2OHNMZWtXR3o1dHZu
TldYQ3BLTWMvQnJKVytFRXVtd1JYb00KmURFaB8phn+mYhsO+nsqb6jvNkPB/ooe
5kj8FJghPsuhPmx+rvm3VMdLlkKLMKFANz594y4QPgakIQh7nGBCgA==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:44Z"
mac: ENC[AES256_GCM,data:J+e0VKWtFYJnk4XtP70ILnqKKf9TgsS75bExpFWum3zO0Pc3bgx4jQxlSZ+2k7mUnh8UE8Fhttr30mkDBubl/qDETsLtlJWuhdu7uA1att78uEUYG8STZQxN3x51SIoS/Qr8n4tn+wNtVp1Blr2BMNX5f8galhGhBbBO7rc3q1A=,iv:dowiHrhfGuX4LIisa+AhM4XPYlBmUUX3dM9hewhEAC4=,tag:/UwVOIFFUExi8EKiu8kvbA==,type:str]
version: 3.13.3

View file

@ -11,8 +11,18 @@
# beacon/exfil signal). Intra-cluster trace ACK chatter is discarded. # beacon/exfil signal). Intra-cluster trace ACK chatter is discarded.
# #
# Bounds (hard, enforced here and not by a follow-up card): # Bounds (hard, enforced here and not by a follow-up card):
# <= MAX_FILES files, <= MAX_TOTAL_BYTES total, oldest deleted first. # * the file being appended right now is plain `flows-<ts>-<n>.jsonl`, so a
# MAX_FILES(6) * MAX_FILE_BYTES(150 MiB) = 900 MiB <= 1 GiB spec cap. # reader always has exactly one file to tail;
# * on rotation the just-closed file is gzip'd to `flows-<ts>-<n>.jsonl.gz`
# (temp name + atomic rename, so a reader never sees a half-written archive);
# * <= MAX_FILES *plain* flows-*.jsonl (live file + any leftover from a restart);
# * <= MAX_TOTAL_BYTES for the WHOLE directory, archives and in-flight .tmp
# included; oldest deleted first.
# Measured 2026-11-27 on siriussec: 3.1-4.3 MB/min (4.5-6.2 GB/day) of JSONL
# compression at 18.5x (level 9, whole closed files), so the 960 MiB byte bound
# holds 72-100 h of flows (72.6 h at the 6.2 GB/day CI-burst rate, 92-100 h at
# the sustained rate). The byte bound is the binding one: MAX_FILES must NOT be
# applied to the archives, or retention collapses back to a few hours.
# #
# Only /data (hostPath /var/log/netsec) is ever written. Logs go to stdout so # Only /data (hostPath /var/log/netsec) is ever written. Logs go to stdout so
# they land in the container log, never on the node's disk. # they land in the container log, never on the node's disk.
@ -22,8 +32,12 @@ DATA_DIR="${DATA_DIR:-/data}"
SOCK="${SOCK:-/var/run/cilium/hubble.sock}" SOCK="${SOCK:-/var/run/cilium/hubble.sock}"
FILTER_AWK="${FILTER_AWK:-/scripts/filter.awk}" FILTER_AWK="${FILTER_AWK:-/scripts/filter.awk}"
MAX_FILE_BYTES="${MAX_FILE_BYTES:-157286400}" # 150 MiB MAX_FILE_BYTES="${MAX_FILE_BYTES:-157286400}" # 150 MiB
MAX_FILES="${MAX_FILES:-6}" MAX_FILES="${MAX_FILES:-6}" # plain .jsonl only
MAX_TOTAL_BYTES="${MAX_TOTAL_BYTES:-1006632960}" # 960 MiB (spec cap is 1 GiB) MAX_TOTAL_BYTES="${MAX_TOTAL_BYTES:-1006632960}" # 960 MiB (spec cap is 1 GiB)
GZIP_LEVEL="${GZIP_LEVEL:-9}" # 18.5x on live data (17.9x at 6); ~1 s per 150 MiB, off the read path
# Never compress a file appended to this recently: a restart must not gzip a
# file another writer still owns.
COMPRESS_MIN_AGE="${COMPRESS_MIN_AGE:-60}"
RETRY_SECONDS="${RETRY_SECONDS:-5}" RETRY_SECONDS="${RETRY_SECONDS:-5}"
CHECK_EVERY_LINES="${CHECK_EVERY_LINES:-200}" CHECK_EVERY_LINES="${CHECK_EVERY_LINES:-200}"
@ -31,35 +45,121 @@ log() { printf '%s collector: %s\n' "$(date -u +%Y-%m-%dT%H:%M:%SZ)" "$*"; }
mkdir -p "$DATA_DIR" || { log "cannot create $DATA_DIR"; exit 1; } mkdir -p "$DATA_DIR" || { log "cannot create $DATA_DIR"; exit 1; }
# Delete oldest files until the directory is inside both bounds. fsize() { stat -c %s "$1" 2>/dev/null || echo 0; }
# Newest first, keep while count <= MAX_FILES and running total <= MAX_TOTAL_BYTES. mtime() { stat -c %Y "$1" 2>/dev/null || date -u +%s; }
prune() {
# Filenames are generated by this script and contain no spaces, so plain # Is $1 the file the writer is appending to right now? `cur` is unset outside
# word splitting is safe. (Do not `set -f` here: GNU ls does not glob the # the write loop (the startup sweep runs before it is assigned).
# pattern itself, so noglob would make this match nothing.) is_current() { [ -n "${cur:-}" ] && [ "$1" = "$cur" ]; }
files=$(ls -1t "$DATA_DIR"/flows-*.jsonl 2>/dev/null)
[ -n "$files" ] || return 0 # Is a gzip for $1 currently running? The temp file is created *before* the
n=0 # compressor forks, so a prune that runs immediately after compress() sees it
total=0 # and leaves that file alone — deleting it mid-gzip would discard the archive
over=0 # and lose the whole file's flows.
for f in $files; do in_flight() {
n=$((n + 1)) for t in "$1".gz.tmp*; do
if [ "$over" -eq 0 ]; then [ -e "$t" ] && return 0
sz=$(stat -c %s "$f" 2>/dev/null || echo 0) done
total=$((total + sz)) return 1
if [ "$n" -gt "$MAX_FILES" ] || [ "$total" -gt "$MAX_TOTAL_BYTES" ]; then }
over=1
# Compress one closed .jsonl in the BACKGROUND so the flow reader is never
# blocked (blocking it would stall `hubble observe` and make the agent drop
# events for this client). Order: gzip to a temp name, rename into place, then
# drop the plain file. A reader that globs *.jsonl therefore sees either the
# whole plain file or no plain file at all — never a partial .gz.
compress() {
f=$1
force=${2:-0} # 1 = we just closed it ourselves; skip the age guard
is_current "$f" && return 0
[ -e "$f" ] || return 0
[ -e "$f.gz" ] && return 0
in_flight "$f" && return 0
if [ "$force" -eq 0 ]; then
age=$(( $(date -u +%s) - $(mtime "$f") ))
[ "$age" -ge "$COMPRESS_MIN_AGE" ] || return 0
fi
if [ ! -s "$f" ]; then
rm -f "$f" # closed with nothing in it: nothing to keep
log "removed empty $f"
return 0
fi
tmp="$f.gz.tmp.$$"
: > "$tmp" 2>/dev/null || return 0 # marker: prune must not reap $f now
(
if gzip -"$GZIP_LEVEL" -c "$f" > "$tmp" 2>/dev/null && [ -s "$tmp" ]; then
# Preserve the source mtime so the pruner still sees true chronology.
touch -r "$f" "$tmp" 2>/dev/null
if [ -e "$f" ] && mv -f "$tmp" "$f.gz"; then
rm -f "$f"
log "compressed $(basename "$f") -> $(basename "$f.gz") $(fsize "$f.gz")B"
else
rm -f "$tmp" # pruner took the plain file meanwhile
fi fi
else
rm -f "$tmp"
log "compress failed (left plain): $f"
fi fi
if [ "$over" -eq 1 ]; then ) &
rm -f "$f" && log "pruned $f" }
# Delete oldest files until the directory is inside both bounds.
# `ls -1t` is newest-first, so walking it and deleting from the first overflow
# onward removes the oldest data first. Filenames are generated by this script
# and contain no spaces, so plain word splitting is safe. (Do not `set -f` here:
# GNU ls does not glob the pattern itself, so noglob would make this match
# nothing.)
prune() {
files=$(ls -1t "$DATA_DIR"/flows-* 2>/dev/null)
[ -n "$files" ] || return 0
total=0
under=1
for f in $files; do
case "$f" in
*.gz.tmp*)
# compression in flight: counts toward the cap, never deleted
total=$((total + $(fsize "$f")))
continue ;;
esac
sz=$(fsize "$f")
total=$((total + sz))
is_current "$f" && continue
in_flight "$f" && continue # gzip running: this file is about to shrink
case "$f" in
*.jsonl|*.jsonl.gz) ;;
*) continue ;; # unknown junk: counted, left alone
esac
if [ "$under" -eq 0 ] || [ "$total" -gt "$MAX_TOTAL_BYTES" ]; then
under=0
rm -f "$f" && total=$((total - sz)) && log "pruned $f (dir over ${MAX_TOTAL_BYTES}B)"
fi fi
done done
# Plain-file bound, independent of the byte bound (the live file counts).
n=0
for f in $(ls -1t "$DATA_DIR"/flows-*.jsonl 2>/dev/null); do
n=$((n + 1))
[ "$n" -le "$MAX_FILES" ] && continue
is_current "$f" && continue
in_flight "$f" && continue
rm -f "$f" && log "pruned plain $f (over MAX_FILES=$MAX_FILES)"
done
return 0 return 0
} }
# A compressor killed mid-flight (pod stop) leaves flows-*.gz.tmp* behind.
for t in "$DATA_DIR"/flows-*.gz.tmp*; do
[ -e "$t" ] || continue
rm -f "$t" && log "removed stale temp $t"
done
prune prune
log "starting: dir=$DATA_DIR sock=$SOCK max_file=${MAX_FILE_BYTES}B max_files=$MAX_FILES max_total=${MAX_TOTAL_BYTES}B" # Anything plain left by a previous writer is archived on startup, so a restart
# does not leave uncompressed history lying ahead of the byte bound.
for f in $(ls -1t "$DATA_DIR"/flows-*.jsonl 2>/dev/null); do
compress "$f"
done
log "starting: dir=$DATA_DIR sock=$SOCK max_file=${MAX_FILE_BYTES}B max_files=$MAX_FILES max_total=${MAX_TOTAL_BYTES}B gzip=-$GZIP_LEVEL"
attempt=0 attempt=0
while :; do while :; do
@ -95,11 +195,19 @@ while :; do
lines=$((lines + 1)) lines=$((lines + 1))
if [ "$lines" -ge "$CHECK_EVERY_LINES" ]; then if [ "$lines" -ge "$CHECK_EVERY_LINES" ]; then
lines=0 lines=0
size=$(stat -c %s "$cur" 2>/dev/null || echo 0) size=$(fsize "$cur")
if [ "$size" -ge "$MAX_FILE_BYTES" ]; then if [ "$size" -ge "$MAX_FILE_BYTES" ]; then
prev="$cur"
seq=$((seq + 1)) seq=$((seq + 1))
cur="$DATA_DIR/flows-$(date -u +%Y%m%dT%H%M%SZ)-$seq.jsonl" cur="$DATA_DIR/flows-$(date -u +%Y%m%dT%H%M%SZ)-$seq.jsonl"
log "rotated: $cur" log "rotated: $cur (closed $prev at $(fsize "$prev")B)"
# Archive what we just closed (we own it, so no age guard),
# then re-check the bounds. The sweep also archives any
# orphan a previous writer left behind.
compress "$prev" 1
for f in $(ls -1t "$DATA_DIR"/flows-*.jsonl 2>/dev/null); do
compress "$f"
done
prune prune
fi fi
fi fi

View file

@ -55,8 +55,10 @@ spec:
value: /data value: /data
- name: SOCK - name: SOCK
value: /var/run/cilium/hubble.sock value: /var/run/cilium/hubble.sock
# 6 files x 150 MiB = 900 MiB ceiling, inside the 1 GiB spec cap; # MAX_FILES bounds PLAIN .jsonl files (the live one plus leftovers
# MAX_TOTAL_BYTES is the second, independent bound. # from a restart). Rotated files are gzip'd (~17.9x measured) and
# bounded by MAX_TOTAL_BYTES, the whole-directory ceiling (archives
# included) that stays inside the 1 GiB spec cap.
- name: MAX_FILE_BYTES - name: MAX_FILE_BYTES
value: "157286400" value: "157286400"
- name: MAX_FILES - name: MAX_FILES

View file

@ -3,4 +3,8 @@ kind: Namespace
metadata: metadata:
name: netsec name: netsec
labels: labels:
pod-security.kubernetes.io/warn: restricted
pod-security.kubernetes.io/warn-version: latest
pod-security.kubernetes.io/audit: restricted
pod-security.kubernetes.io/audit-version: latest
app.kubernetes.io/part-of: netsec app.kubernetes.io/part-of: netsec

View file

@ -15,7 +15,7 @@ instead of a host Docker container on the Pi.
| `osint-camera-service` | same app image | public-camera discovery + snapshots (PVC `osint-camera-snapshots` 3 Gi, shared with the app) | | `osint-camera-service` | same app image | public-camera discovery + snapshots (PVC `osint-camera-snapshots` 3 Gi, shared with the app) |
| `osint-titiler` | `forgejo…/sirius/titiler:0.26.0` | SAR COG tile proxy, exposed same-origin at `/titiler` | | `osint-titiler` | `forgejo…/sirius/titiler:0.26.0` | SAR COG tile proxy, exposed same-origin at `/titiler` |
| `osint-news-scraper` | `forgejo…/sirius/osint-news-scraper:amd64-58f71f5b4520` | Scrapy news scraper loop | | `osint-news-scraper` | `forgejo…/sirius/osint-news-scraper:amd64-58f71f5b4520` | Scrapy news scraper loop |
| `osint-news-summarizer` | `forgejo…/sirius/osint-news-summarizer:amd64-fe2b5df369d0` | "analyst" — Nous Portal briefs every 15 min + 23:00 recap | | `osint-news-summarizer` | `forgejo…/sirius/osint-news-summarizer:amd64-fb5285df7f38` | "analyst" — Nous Portal briefs every 15 min + 23:00 recap |
Every workload is pinned to `kubernetes.io/hostname: siriussec` (Gateway/Envoy Every workload is pinned to `kubernetes.io/hostname: siriussec` (Gateway/Envoy
co-location + local-path PVs). co-location + local-path PVs).
@ -133,11 +133,29 @@ it can actually parse.
## Analyst model ## Analyst model
`SUMMARY_MODEL=meituan/longcat-2.5:free` (free tier on the Nous Portal, `SUMMARY_MODEL=deepseek/deepseek-v4.1-flash-1017` (Nous Portal, 1M context,
1M context, verified to honour `response_format: json_object`). It is set in verified to honour `response_format: json_object`; the previous free
`meituan/longcat-2.5:free` id was retired and 404'd every call). When picking a
replacement, confirm it is in `GET /v1/models` — a stale id fails silently
because `chat()` swallows non-200s and returns an empty string. It is set in
`configmap.yaml`; changing it in the UI (`PUT /api/settings`) only takes effect `configmap.yaml`; changing it in the UI (`PUT /api/settings`) only takes effect
when the env var is empty, because `resolve_model()` prefers the env. when the env var is empty, because `resolve_model()` prefers the env.
## Analyst resilience + map concurrency (PR #72)
`SUMMARY_MAP_CONCURRENCY` (16, in `configmap.yaml`) sets how many map calls are
in flight. Each call is a ~20 s wall clock, so the phase is latency-bound: the
746-batch recap measured **951 s** end-to-end at 16, where 8 is projected at
~98 min. The code default is also 16; the env var is pinned so a default change
upstream cannot silently stretch the 15-min interval past its window.
A non-retryable Nous rejection (400/404/422 — e.g. a retired model id) now
raises `NousAPIError` and aborts the run with `rc=1` instead of being swallowed
as an empty completion, so the failure shows up in the pod log on the *first*
tick rather than as nine days of "idle" ticks. The per-run summary line is
`summarize done kind=<interval|recap> summary_id=… model=… batches=… articles=…
ticker=… map=… elapsed=…s`.
## Analyst grading (PR #53 + #54) ## Analyst grading (PR #53 + #54)
The map call scores every article **0-100** against a rubric in the same request The map call scores every article **0-100** against a rubric in the same request

View file

@ -0,0 +1,332 @@
# Freshness exporter for the osint analyst (card t_22334588).
#
# The summarizer (deploy/osint-news-summarizer) wrote no article_summaries rows
# from 2026-11-25 to 2026-12-04 while the scraper kept the articles table fresh
# (61.5k rows, newest within minutes). Nothing paged: the container was Running
# with restarts 0 and only INFO batch lines in the log, so "analyst wedged" and
# "analyst idle" looked identical from every signal the cluster had.
#
# The app has no /metrics endpoint (POST /metrics -> 404 on osint-app), so this
# is a tiny read-only exporter that answers the only question that matters:
# *when* did each side last write a row? It reads two timestamps from
# osint_data and serves them on :9187/metrics:
#
# osint_analyst_last_success_timestamp_seconds max(article_summaries.batch_timestamp)
# osint_ingest_last_article_timestamp_seconds max(articles.timestamp)
# osint_analyst_exporter_up 1 when the last DB read succeeded
#
# PromQL rules live in monitoring/controllers/home/osint-analyst.yaml
# (OsintAnalystStale, OsintIngestAliveButNoBrief).
#
# Why the summarizer image: it is the only image in this namespace that already
# ships psycopg2 and a python3, and it is pinned by tag (no floating base). The
# script uses the stdlib HTTP server, so nothing is installed at runtime and no
# new image build is needed. It tracks the summarizer's own pin (currently
# amd64-fb5285df7f38) — bump BOTH together; two different tags for one image in
# one namespace reads as drift in an audit, and the exporter only needs the
# interpreter + psycopg2, which every summarizer build carries.
---
apiVersion: v1
kind: ConfigMap
metadata:
name: osint-analyst-exporter
namespace: osint
data:
exporter.py: |
#!/usr/bin/env python3
"""Read-only freshness exporter for the osint analyst.
Serves /metrics on :9187. Two timestamps, nothing else:
osint_analyst_last_success_timestamp_seconds
epoch of max(article_summaries.batch_timestamp) -- when the analyst
last wrote a brief. 0 means the table is empty (stale by definition).
osint_ingest_last_article_timestamp_seconds
epoch of max(articles.timestamp) -- when the scraper last ingested.
osint_analyst_exporter_up
1 when the last database read succeeded, 0 otherwise.
On a database error the last good values are kept and `up` drops to 0, so
the timestamps keep ageing and a broken exporter escalates through the same
OsintAnalystStale alert instead of hiding behind missing series.
"""
import logging
import os
import threading
import time
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
import psycopg2
LOG = logging.getLogger("osint-analyst-exporter")
logging.basicConfig(
level=os.getenv("LOG_LEVEL", "INFO"),
format="%(asctime)s %(levelname)s %(name)s: %(message)s",
)
PORT = int(os.getenv("EXPORTER_PORT", "9187"))
# One scrape interval (30 s) of cache: Prometheus + probes hitting the
# endpoint together must not each open a database connection.
CACHE_TTL = float(os.getenv("CACHE_TTL_SECONDS", "10"))
DB_CONFIG = {
"host": os.getenv("DB_HOST", "osint-db"),
"port": int(os.getenv("DB_PORT", "5432")),
"dbname": os.getenv("DB_NAME", "osint_data"),
"user": os.getenv("DB_USER", "osint"),
"password": os.getenv("DB_PASSWORD", ""),
"connect_timeout": 5,
}
ANALYST_SQL = (
"SELECT COALESCE(EXTRACT(EPOCH FROM max(batch_timestamp))::bigint, 0) "
"FROM article_summaries"
)
INGEST_SQL = (
"SELECT COALESCE(EXTRACT(EPOCH FROM max(timestamp))::bigint, 0) "
"FROM articles"
)
_lock = threading.Lock()
_state = {"analyst": 0, "ingest": 0, "up": 0, "last_attempt": 0.0}
def collect() -> tuple[int, int]:
conn = psycopg2.connect(**DB_CONFIG)
try:
conn.autocommit = True
with conn.cursor() as cur:
cur.execute("SET statement_timeout = 5000")
cur.execute(ANALYST_SQL)
analyst = int(cur.fetchone()[0] or 0)
cur.execute(INGEST_SQL)
ingest = int(cur.fetchone()[0] or 0)
finally:
conn.close()
return analyst, ingest
def ensure_fresh() -> None:
now = time.time()
with _lock:
if now - _state["last_attempt"] < CACHE_TTL:
return
_state["last_attempt"] = now
try:
analyst, ingest = collect()
except Exception as exc: # noqa: BLE001 - never kill the endpoint
with _lock:
_state["up"] = 0
LOG.warning("collect failed: %s", exc)
return
with _lock:
_state.update(analyst=analyst, ingest=ingest, up=1)
def render() -> str:
with _lock:
analyst = _state["analyst"]
ingest = _state["ingest"]
up = _state["up"]
return (
"# HELP osint_analyst_last_success_timestamp_seconds "
"Epoch of the newest article_summaries.batch_timestamp (last brief "
"written by the analyst); 0 = no row.\n"
"# TYPE osint_analyst_last_success_timestamp_seconds gauge\n"
f"osint_analyst_last_success_timestamp_seconds {analyst}\n"
"# HELP osint_ingest_last_article_timestamp_seconds "
"Epoch of the newest articles.timestamp (last row ingested by the "
"scraper); 0 = no row.\n"
"# TYPE osint_ingest_last_article_timestamp_seconds gauge\n"
f"osint_ingest_last_article_timestamp_seconds {ingest}\n"
"# HELP osint_analyst_exporter_up 1 when the last database read "
"succeeded.\n"
"# TYPE osint_analyst_exporter_up gauge\n"
f"osint_analyst_exporter_up {up}\n"
)
class Handler(BaseHTTPRequestHandler):
server_version = "osint-analyst-exporter/1.0"
def do_GET(self): # noqa: N802 - BaseHTTPRequestHandler API
path = self.path.split("?", 1)[0]
if path not in ("/metrics", "/healthz"):
self.send_error(404)
return
ensure_fresh()
body = render().encode()
self.send_response(200)
self.send_header("Content-Type", "text/plain; version=0.0.4; charset=utf-8")
self.send_header("Content-Length", str(len(body)))
self.end_headers()
self.wfile.write(body)
def log_message(self, fmt, *args): # noqa: A003 - stdlib hook
LOG.debug("%s - %s", self.address_string(), fmt % args)
def main() -> None:
# Prime the cache so the first scrape has data, but never refuse to
# start on a database blip.
ensure_fresh()
server = ThreadingHTTPServer(("0.0.0.0", PORT), Handler)
LOG.info("listening on 0.0.0.0:%s (db=%s/%s)", PORT, DB_CONFIG["host"], DB_CONFIG["dbname"])
server.serve_forever()
if __name__ == "__main__":
main()
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: osint-analyst-exporter
namespace: osint
labels:
app: osint-analyst-exporter
spec:
replicas: 1
selector:
matchLabels:
app: osint-analyst-exporter
template:
metadata:
labels:
app: osint-analyst-exporter
spec:
imagePullSecrets:
- name: forgejo-pull
# Same placement policy as the other stateless amd64 loops here: prefer
# linode (where osint-db runs) but do not strand if it is absent.
nodeSelector:
kubernetes.io/arch: amd64
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
preference:
matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- linode
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
seccompProfile:
type: RuntimeDefault
containers:
- name: exporter
# Pinned summarizer image: python3 + psycopg2, see header comment.
# Kept equal to the summarizer pin in news-summarizer-deployment.yaml.
image: forgejo.siriusdevops.com/sirius/osint-news-summarizer:amd64-fb5285df7f38
imagePullPolicy: IfNotPresent
command: ["python", "/opt/exporter/exporter.py"]
env:
- name: PYTHONDONTWRITEBYTECODE
value: "1"
- name: EXPORTER_PORT
value: "9187"
- name: DB_HOST
valueFrom:
configMapKeyRef:
name: osint-env
key: DB_HOST
- name: DB_PORT
valueFrom:
configMapKeyRef:
name: osint-env
key: DB_PORT
- name: DB_NAME
valueFrom:
configMapKeyRef:
name: osint-env
key: DB_NAME
- name: DB_USER
valueFrom:
configMapKeyRef:
name: osint-env
key: DB_USER
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: osint-db
key: password
ports:
- name: metrics
containerPort: 9187
protocol: TCP
readinessProbe:
httpGet:
path: /healthz
port: metrics
periodSeconds: 10
livenessProbe:
httpGet:
path: /healthz
port: metrics
initialDelaySeconds: 10
periodSeconds: 30
resources:
requests:
cpu: 10m
memory: 64Mi
limits:
cpu: 100m
memory: 128Mi
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
volumeMounts:
- name: script
mountPath: /opt/exporter
readOnly: true
volumes:
- name: script
configMap:
name: osint-analyst-exporter
---
apiVersion: v1
kind: Service
metadata:
name: osint-analyst-exporter
namespace: osint
labels:
app: osint-analyst-exporter
spec:
type: ClusterIP
selector:
app: osint-analyst-exporter
ports:
- name: metrics
port: 9187
targetPort: metrics
protocol: TCP
---
# Prometheus (monitoring ns) scrapes this; the ServiceMonitor selector is
# namespace-wide (spec.serviceMonitorNamespaceSelector = {}), so the label is
# what matters. Ingress from monitoring to :9187 is opened in networkpolicy.yaml.
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: osint-analyst-exporter
namespace: osint
labels:
release: kube-prometheus-stack
spec:
namespaceSelector:
matchNames:
- osint
selector:
matchLabels:
app: osint-analyst-exporter
endpoints:
- port: metrics
path: /metrics
interval: 30s
scrapeTimeout: 10s

View file

@ -15,6 +15,8 @@ spec:
labels: labels:
app: osint-app app: osint-app
spec: spec:
imagePullSecrets:
- name: forgejo-pull
tolerations: tolerations:
- key: dedicated - key: dedicated
operator: Exists operator: Exists
@ -24,7 +26,7 @@ spec:
initContainers: initContainers:
# Wait for Postgres before alembic runs (the entrypoint migrates). # Wait for Postgres before alembic runs (the entrypoint migrates).
- name: wait-for-db - name: wait-for-db
image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-54897b49bc57 image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-6066ac8e0d6c
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: command:
- python - python
@ -42,7 +44,7 @@ spec:
sys.exit("postgres did not become reachable in 300s") sys.exit("postgres did not become reachable in 300s")
containers: containers:
- name: app - name: app
image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-54897b49bc57 image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-6066ac8e0d6c
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 8000 - containerPort: 8000

View file

@ -15,6 +15,8 @@ spec:
labels: labels:
app: osint-camera-service app: osint-camera-service
spec: spec:
imagePullSecrets:
- name: forgejo-pull
tolerations: tolerations:
- key: dedicated - key: dedicated
operator: Exists operator: Exists

View file

@ -66,14 +66,25 @@ data:
# never see https here: this flag is what puts `Secure` on the session cookie. # never see https here: this flag is what puts `Secure` on the session cookie.
ADMIN_COOKIE_SECURE: "1" ADMIN_COOKIE_SECURE: "1"
# ── news summarizer (analyst) — Nous Portal, free tier model ──────────── # ── news summarizer (analyst) — Nous Portal ─────────────────────────────
NOUS_BASE_URL: https://inference-api.nousresearch.com/v1 NOUS_BASE_URL: https://inference-api.nousresearch.com/v1
SUMMARY_MODEL: meituan/longcat-2.5:free # Meituan LongCat was retired from the portal (every call 404'd from 11/25
# onward, silently producing no briefs). The :free ids now require a user
# tag and 503 anyway; pin the cheapest model that answers normally and
# honours response_format: json_object (~$0.03/$0.12 per Mtok).
SUMMARY_MODEL: deepseek/deepseek-v4.1-flash-1017
# 4, not the upstream default 50: the map phase runs with a hard 60 s httpx # 4, not the upstream default 50: the map phase runs with a hard 60 s httpx
# timeout (news/summerizer/nous_client.py, json_mode=False), and this free # timeout (news/summerizer/nous_client.py, json_mode=False), so bigger
# model needs ~30 s for 8 articles, so bigger batches time out and silently # batches risk timing out and silently contributing nothing to the reduce
# contribute nothing to the reduce phase. # phase.
BATCH_SIZE: "4" BATCH_SIZE: "4"
# Map-phase fan-out (PR #72). Each map call is a ~20 s wall clock, so the
# phase is latency-bound, not CPU-bound: the 746-batch recap measured 951 s
# end-to-end at 16 in flight, where 8 is projected at ~98 min. 16 is also the
# summarizer's DEFAULT_SUMMARY_MAP_CONCURRENCY; it is pinned here so a future
# code default change cannot silently stretch the 15-min interval past its
# window.
SUMMARY_MAP_CONCURRENCY: "16"
# Map-phase grading (PR #53): the map call scores every article 0-100 against # Map-phase grading (PR #53): the map call scores every article 0-100 against
# a rubric and only blocks >= SUMMARY_MIN_SCORE reach the brief. When nothing # a rubric and only blocks >= SUMMARY_MIN_SCORE reach the brief. When nothing
# clears the bar the top SUMMARY_FALLBACK_TOP are used so the HUD is not blank # clears the bar the top SUMMARY_FALLBACK_TOP are used so the HUD is not blank

View file

@ -15,6 +15,8 @@ spec:
labels: labels:
app: osint-ingester app: osint-ingester
spec: spec:
imagePullSecrets:
- name: forgejo-pull
tolerations: tolerations:
- key: dedicated - key: dedicated
operator: Exists operator: Exists

View file

@ -18,7 +18,20 @@ resources:
- titiler-service.yaml - titiler-service.yaml
- news-scraper-deployment.yaml - news-scraper-deployment.yaml
- news-summarizer-deployment.yaml - news-summarizer-deployment.yaml
# Freshness exporter for the analyst (max(article_summaries.batch_timestamp)
# and max(articles.timestamp) -> :9187/metrics) + its ServiceMonitor. The
# summarizer has no /metrics and a wedged analyst is invisible otherwise
# (card t_22334588).
- analyst-exporter.yaml
- httproute.yaml - httproute.yaml
# Default-deny ingress+egress + the namespace allow list (audit F3 / t_fed52919).
- networkpolicy.yaml
# exec-only RBAC so forgejo/cluster-backup can pg_dump this namespace's plain # exec-only RBAC so forgejo/cluster-backup can pg_dump this namespace's plain
# Postgres Deployment (osint-db) — not a CNPG cluster, so it needs its own path. # Postgres Deployment (osint-db) — not a CNPG cluster, so it needs its own path.
- backup-exec-rbac.yaml - backup-exec-rbac.yaml
# Secrets, SOPS/age-encrypted in git. Flux decrypts them (the `apps`
# Kustomization carries a decryption block; key = flux-system/sops-age).
# Never add a plaintext Secret next to these — see docs/secrets-sops.md.
- secret-forgejo-pull.sops.yaml
- secret-osint-admin.sops.yaml
- secret-osint-db.sops.yaml

View file

@ -2,3 +2,10 @@ apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
name: osint name: osint
labels:
pod-security.kubernetes.io/enforce: baseline
pod-security.kubernetes.io/enforce-version: latest
pod-security.kubernetes.io/warn: restricted
pod-security.kubernetes.io/warn-version: latest
pod-security.kubernetes.io/audit: restricted
pod-security.kubernetes.io/audit-version: latest

View file

@ -15,6 +15,8 @@ spec:
labels: labels:
app: osint-nats app: osint-nats
spec: spec:
imagePullSecrets:
- name: forgejo-pull
tolerations: tolerations:
- key: dedicated - key: dedicated
operator: Exists operator: Exists

View file

@ -0,0 +1,87 @@
# Tenant isolation for `osint` (audit finding F3 / A5-1, card t_fed52919).
#
# `default-deny` (stock NetworkPolicy, podSelector {}, both directions) makes
# every pod in this namespace reachable by nothing and able to reach nothing.
# `osint-allow` (CiliumNetworkPolicy) re-adds the traffic the workload actually
# uses, in both directions:
# ingress: the Cilium Gateway proxy (`reserved:ingress`) for
# osint.siriusdevops.com -> app:8000 / titiler:8000, plus node/health
# entities for kubelet probes.
# egress: cluster DNS, its own pods (app -> osint-db:5432, -> nats:4222,
# -> titiler:8000), and `world` — the ingester/news-scraper/
# news-summarizer fetch external news + Nominatim
# (nominatim.openstreetmap.org) + the Nous inference API, and
# camera-service reads RTSP cameras on the LAN.
#
# `world` in Cilium is everything outside the cluster (internet, LAN, VPN peers)
# but NOT other namespaces' pods and NOT the node IPs — so cross-namespace
# reachability and the internal WireGuard gateway ports stay closed.
#
# Deliberately absent:
# * kube-apiserver egress — no workload here calls the API; the audit's
# `SA token mounted` observation is a separate finding and denying the path
# does not depend on removing the token.
# * monitoring ingress — apart from the one port-scoped rule for the analyst
# freshness exporter below (Prometheus -> osint-analyst-exporter:9187),
# nothing in `monitoring` reaches this namespace.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny
namespace: osint
spec:
podSelector: {}
policyTypes:
- Ingress
- Egress
---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: osint-allow
namespace: osint
spec:
description: >-
osint: gateway + kubelet ingress; egress to own namespace, cluster DNS and
the public internet only.
endpointSelector: {}
ingress:
- fromEntities:
- ingress
- host
- remote-node
- health
# Intra-namespace pod -> pod (app -> db, sidecars, the backup CronJob).
# Cilium enforces policy at BOTH ends, so this allow must exist in ingress as
# well as egress — measured on `piedmont`: with only the egress rule a pod
# could not reach its own Service (TimeoutError).
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: osint
# Prometheus (namespace `monitoring`) scrapes the analyst freshness exporter
# on 9187 (apps/base/osint/analyst-exporter.yaml). Port-scoped: no other
# monitoring -> osint traffic is opened.
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: monitoring
toPorts:
- ports:
- port: "9187"
protocol: TCP
egress:
- toEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: kube-system
k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP
- toEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: osint
# Internet / LAN / VPN peers: news sources, Nominatim, inference API, RTSP.
- toEntities:
- world

View file

@ -15,6 +15,8 @@ spec:
labels: labels:
app: osint-news-scraper app: osint-news-scraper
spec: spec:
imagePullSecrets:
- name: forgejo-pull
tolerations: tolerations:
- key: dedicated - key: dedicated
operator: Exists operator: Exists

View file

@ -15,6 +15,8 @@ spec:
labels: labels:
app: osint-news-summarizer app: osint-news-summarizer
spec: spec:
imagePullSecrets:
- name: forgejo-pull
tolerations: tolerations:
- key: dedicated - key: dedicated
operator: Exists operator: Exists
@ -37,7 +39,12 @@ spec:
kubernetes.io/arch: amd64 kubernetes.io/arch: amd64
containers: containers:
- name: news-summarizer - name: news-summarizer
image: forgejo.siriusdevops.com/sirius/osint-news-summarizer:amd64-fe2b5df369d0 # amd64-fb5285df7f38 = sirius/osint-dashboard@fb5285d (PR #72, merged):
# the map phase runs concurrently (SUMMARY_MAP_CONCURRENCY) and a
# non-retryable Nous rejection raises NousAPIError instead of being
# swallowed, so a wedged analyst fails loudly instead of idling for
# nine days on silent empty completions (card t_22334588 / t_2ae9f0c0).
image: forgejo.siriusdevops.com/sirius/osint-news-summarizer:amd64-fb5285df7f38
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
# Loop: batch the last window, call Nous Portal, write summaries. # Loop: batch the last window, call Nous Portal, write summaries.
command: ["python", "run_news_summarizer.py"] command: ["python", "run_news_summarizer.py"]

View file

@ -23,6 +23,8 @@ spec:
labels: labels:
app: osint-db app: osint-db
spec: spec:
imagePullSecrets:
- name: forgejo-pull
tolerations: tolerations:
- key: dedicated - key: dedicated
operator: Exists operator: Exists

View file

@ -0,0 +1,23 @@
apiVersion: v1
data:
.dockerconfigjson: ENC[AES256_GCM,data:d+Qwhs0BLzcJDRecSw3Ij7lJNet7NPZOvMMDcIXHFTT6rzSn9UNVWuRXk4M7LBk/ovJputnUuV2sfUf0XOfvGKzDRBueOBmJKErnO8bcHtN3Nyw/jwziCRAbqV2lNNZ1g5WAyI/G8W386n7vBEZp5GgGdoJHSRQnIXa5TW/XLHRG2ad1fcRXpp3QppDUe1ykH0v+kcl73Xs7oCe9BtYiRI5/H9B8eQw0IIHem4zWDVELbfury86V4vyHfkCG3wveEHGxib2W0IsMmAmPRVzuL1GJCIDcMomQRHTJhK1nMQUDtmhgRXg5wIwy9w6w0FPfX7Qu31TCT22V6X+gOirALstSTrYR4Chi8QIfCypQh5f3J7TGhdWkbA7rYbJZKy1N,iv:K9BsNRmd4cmLlBg/h5Azl22SStUODiCBHA78W6gX+2M=,tag:/p1Yw6IsbQGWltDbzA3bbA==,type:str]
kind: Secret
metadata:
name: forgejo-pull
namespace: osint
type: kubernetes.io/dockerconfigjson
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBxbUlrR3ZNTTJJSTJleEdZ
RytMeS81RjhtUi9CbHk5K2EzTi96UnplaWowCkhhWng1R2w4UkdvYm5XU2VDNHJ4
eWFicUVOOFZqaEQ5RnhxMWVCdkU4aXMKLS0tIDRXRWpkT2tTZ3JiQXRXclg2eUl3
bGhjak1ueWdMOXdtc2hDL0p3aDBiaDAKEDY5tZnpYcJSjLIY5DcZ28GNdlTRt2QX
cdKQh0ddKwdWu2BuSOtMwgNjB0c1mSdZPAXtIVGeORSDLf//FVfJ/w==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:44Z"
mac: ENC[AES256_GCM,data:qVmV+yQSgcShahLRN0I4niDEtYjjGNINLeJPZoKTA8BaKYnvHok8Bj473DW88+TGujLwqhg9mZIOP6pZRBvFks0Ue+NFkE0m9/OHfglCStp/+E9N9C6w0CDITBOpD8jmgOJoK57xseMskLCJmTfIbzN0Afln+m9NZYfPW1fWehY=,iv:3Mq1uXwQZOvZ5uiCfo1lTcobvFqZH9KXShUUQ7Z0aQw=,tag:vMtBilXeLmgFppwNxx6BBA==,type:str]
version: 3.13.3

View file

@ -0,0 +1,25 @@
apiVersion: v1
data:
ADMIN_PASSWORD_HASH: ENC[AES256_GCM,data:pM52EBdmrx+ZTJKVL3hK1xcMZ8PkhEExJnMzEx2zRblTRPoTCFM/2ghu/sfz7HpaHNvZ/izx8EQwyyRAHFlUj3rPeA7Cveek3FvXR6PWyMOdJ2t8aW9QN5QF8k3eXDDA7jP0WfF3tVFLc48oRed8V1kjqL0=,iv:Vv3R/Kq2BUlUrQ8y2TEsYSK59sDEPOEVn1hfjrmmFh0=,tag:u8iiY7QcYFGyZh2J9ttrnQ==,type:str]
ADMIN_SESSION_SECRET: ENC[AES256_GCM,data:u6ef6ry1H+jeC5o2fhs6dETG+AHxOz5nMpYhTWFU4wHraJtFgoMUudXX7pfsqvpvQ4SBMhgGNotkpyxW1ubSMf/MD4QYU2SUfCZwXawJoquBgFHGttm8Yg==,iv:phTH+xno6OCHgB1vvn03DIdubjd8qDpxXx6oe4Uc9Jo=,tag:QaTEFWAnj7bRZKUlhiEnkg==,type:str]
ADMIN_USER: ENC[AES256_GCM,data:GTC0VP8jl90=,iv:awQwkQGGpClTE2b/qjHg0gOyY0id4Ns/NJaHniQ0yTw=,tag:Jh0enTrfRUXofp0xOVzhMw==,type:str]
kind: Secret
metadata:
name: osint-admin
namespace: osint
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA0TEJSWHVuR3gwVnVDbkRk
UWhsdnRvaUk5VkNKN3VicERneEpYVnNIeFVjCmg1ZkIrMjAzayt2WFdEc0ZpNzZp
czNhcUszazZ4QWpVTXVaUUk1YW9UcEUKLS0tIDI4T1plYjVEYXhGSUZRSE5JUnNJ
TmJvcmN4dmY2YUU3Zzd2aktEZHM5TFkK8NXP+DRnltYkuUIBJgG0LhxUnK2R3JBm
6+vgVHNGhtn1Dp7yYWTAbT7dAh9puJyG2E1unXi2cvnWRDyP/xlviA==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:44Z"
mac: ENC[AES256_GCM,data:tr6R/iqO9lIDrDl5NhKFUeqlAUaEJXOEvsEthaW/FpY9lMnwzzNUYVazFy5i3I34O3o71kPabrUUHfCiMnoD1+Echl/nZGpnQKQNEh2+CaG/cCavqVEYjw18sClGCUnBE8FdL9ccO2iAZAtkOlYjJimwT+9qauZIJGwTPakh22o=,iv:LuJtnsq4XSEI2NNWU3ST9eR5dwLOkeOstnlED6TJTOc=,tag:TlqvkhkP9bdd0ltAhQdghQ==,type:str]
version: 3.13.3

View file

@ -0,0 +1,23 @@
apiVersion: v1
data:
password: ENC[AES256_GCM,data:/TR9lenGU5gFhORKhBESQd8huplzERixYdRvzmWvyQkTYi+iP6ADZl34M8E=,iv:59YuJ8cmVV8A3bdQim+GH267WozFljhZ92D4GR5Jnek=,tag:8ae3Rsmzyxg0CH1wb8FjFA==,type:str]
kind: Secret
metadata:
name: osint-db
namespace: osint
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBtUXcxU2x3MU5lWHR1c2Rx
VjhhZExUV1FnZHFQbThlRE5UckVYNWVFS3pvCjRBZmtDcHpaak4vUmtKTUtyaWNM
VkIvZ3dadTNraEpKYm92ZU9rbklhbjQKLS0tIGJuZnRQRkkyUmk0TlU5OXJHWE1N
QVQzTCs4M0dld3hybUNyN0Z2c0dtZ1UK1JSSDk6NMGbzP1zDBP6L5CzUSRJU6tdF
63N2QmOzhSiXBI//H96CAmP20m1hlU9+A2c829nsHUuorievXbjbFw==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:44Z"
mac: ENC[AES256_GCM,data:vJ2ageffd9eLUeG7CK0gYO1H33/uj3vW+5oIDqqKGHvp8yxJ0F8lrcb1byoEWjWEemIQbNVSipl6fMIiGf8owUK2cm2w6TeNZ7ZCWhOuUE/LoS0ix2dgNB2KHN/HIoC71cKutLiidCulZHJkaMnFEeEyYMMd1OIBStMdyfIFMVU=,iv:Q4sK0gfzXljs02U0w5Npfb6CUU/+hH27AvEXtNwMGTE=,tag:OxbI2WBl4JNPjuxNTj8Fww==,type:str]
version: 3.13.3

View file

@ -15,6 +15,8 @@ spec:
labels: labels:
app: osint-titiler app: osint-titiler
spec: spec:
imagePullSecrets:
- name: forgejo-pull
tolerations: tolerations:
- key: dedicated - key: dedicated
operator: Exists operator: Exists

View file

@ -13,6 +13,8 @@ spec:
labels: labels:
app: piedmont-contact app: piedmont-contact
spec: spec:
imagePullSecrets:
- name: forgejo-pull
tolerations: tolerations:
- key: dedicated - key: dedicated
operator: Exists operator: Exists
@ -23,7 +25,7 @@ spec:
- name: contact-api - name: contact-api
# Built and pushed by sirius/websites/.forgejo/workflows/deploy-phs-contact.yml # Built and pushed by sirius/websites/.forgejo/workflows/deploy-phs-contact.yml
# as :$sha (see docs/site-image-pinning.md). # as :$sha (see docs/site-image-pinning.md).
image: forgejo.siriusdevops.com/sirius/phs-contact:5035443abb62913362e416ab7030a64726886886 image: forgejo.siriusdevops.com/sirius/phs-contact:0446be8fbc443f59b72eabc54652972d9edd51cd
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8090"] command: ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8090"]
ports: ports:

View file

@ -13,6 +13,8 @@ spec:
labels: labels:
app: piedmont-site app: piedmont-site
spec: spec:
imagePullSecrets:
- name: forgejo-pull
tolerations: tolerations:
- key: dedicated - key: dedicated
operator: Exists operator: Exists

View file

@ -7,3 +7,10 @@ resources:
- service.yaml - service.yaml
- service-api.yaml - service-api.yaml
- httproute.yaml - httproute.yaml
# Default-deny ingress+egress + the namespace allow list (audit F3 / t_fed52919).
- networkpolicy.yaml
# Secrets, SOPS/age-encrypted in git. Flux decrypts them (the `apps`
# Kustomization carries a decryption block; key = flux-system/sops-age).
# Never add a plaintext Secret next to these — see docs/secrets-sops.md.
- secret-forgejo-pull.sops.yaml
- secret-piedmont-contact.sops.yaml

View file

@ -3,4 +3,10 @@ kind: Namespace
metadata: metadata:
name: piedmont name: piedmont
labels: labels:
pod-security.kubernetes.io/enforce: baseline
pod-security.kubernetes.io/enforce-version: latest
pod-security.kubernetes.io/warn: restricted
pod-security.kubernetes.io/warn-version: latest
pod-security.kubernetes.io/audit: restricted
pod-security.kubernetes.io/audit-version: latest
app.kubernetes.io/part-of: piedmont app.kubernetes.io/part-of: piedmont

View file

@ -0,0 +1,63 @@
# Tenant isolation for `piedmont` (audit finding F3 / A5-1, card t_fed52919).
#
# `default-deny` (stock NetworkPolicy, podSelector {}, both directions) is the
# deny. `piedmont-allow` (CiliumNetworkPolicy) re-adds:
# ingress: the Cilium Gateway proxy (`reserved:ingress`) for
# piedmonthomesvc.com -> site:80 / contact:8090, plus node/health
# entities for kubelet probes.
# egress: cluster DNS; its own pods (nginx may proxy /api/contact in-namespace);
# and `world` for the Telegram Bot API used by piedmont-contact.
#
# `world` is everything outside the cluster (internet, LAN, VPN peers) but not
# other namespaces' pods and not node IPs, so the tenant boundary holds.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny
namespace: piedmont
spec:
podSelector: {}
policyTypes:
- Ingress
- Egress
---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: piedmont-allow
namespace: piedmont
spec:
description: >-
piedmont: gateway + kubelet ingress; egress to own namespace, cluster DNS
and the public internet only.
endpointSelector: {}
ingress:
- fromEntities:
- ingress
- host
- remote-node
- health
# Intra-namespace: nginx -> contact (and any future pod -> pod call). Cilium
# enforces policy at BOTH ends, so the same-namespace allow must exist in
# ingress as well as egress — measured: with only the egress rule, a pod in
# this namespace could not reach its own Service (TimeoutError).
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: piedmont
egress:
- toEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: kube-system
k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP
- toEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: piedmont
# Telegram Bot API (contact form delivery).
- toEntities:
- world

View file

@ -0,0 +1,23 @@
apiVersion: v1
data:
.dockerconfigjson: ENC[AES256_GCM,data:cn2e8WXbtnYELrwUJr6rhgMiOHsQnbL34fJHV+yr3B1Z5WEkPeq/kduh9wcjV0dlPg4cYEczqAH7GQm4f+jIx3FlMvtaftZz195HB38srxzcUzUhc6ZF8Iz7h0cZoOB7Vi0nre+FZCZTXQhuSEYuC97H+6pvDluUqAHBvdrHogWmcAb3PEw9i/sfn1bUC7TZoGXy3MBIuTYlDFid/gkX3dIzPQkKRcZsgrNgztwCIHFADWxfzQwTmWOztYrip1y1UgUhkqfTv38qIa+VI7SpM1gztbxX9lsMv3rO/uTlRqGaogPSC4vYpwWcB3uAL0zpTf79QKlhGKAHiA5dXhVkp3ijVBrkf8F1biaivCGeAGLqEK+yeM1UVNZb2IhFErf/,iv:wWaqHXaQyrNYHCiYNvHp7REYTSmYqu/Vl9SP4ptZtPo=,tag:rzU+lCaLyRvCHutae+S4ww==,type:str]
kind: Secret
metadata:
name: forgejo-pull
namespace: piedmont
type: kubernetes.io/dockerconfigjson
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBLTmVRS0RaNW0rQzhUODRI
RGFBdDdwdFRsUGt4MVZRdEwzS2Y5d3kxbXlRCjdyRmlUcG90eGU0STVrcVZDVm9R
Nk04UUt1RmUrQnp2QU4vUlY5TmZCQVUKLS0tIGZqSWp4ejBWMzhvWDEzc2lmbWx4
b21IdElIRWJUOXZZcm1KLzh0ZHQyRWsKWmi0BF33Y5u++jtjO2ypEenYWybtrU9d
HC8TWALXS4OBRWG4T8AHD1YS+lG+ZhdBYiudyIPniYTMaAblVl8RAg==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:43Z"
mac: ENC[AES256_GCM,data:9zgfinHIb+SOmOIat00bm/oxste1sLA2kOfNtuqAD5mUQ3Ud+zB2YZjOMm5LTN1QU7tc9JAsJ78fgt9P3Dzq5WR+nGIHpE5BqrjmCzV1PPEDvAG8UaKG8B5Ri4NKY2jrJfalai+bwF7fsf+ekS4w/f2av1nVKwAcV/JCxgNg44I=,iv:XfS6wEza4zAcP9a7Mu69X1ye8pgLFW9OZSmszbqRMKM=,tag:mrXNxFCbAOvOYL11fGazcA==,type:str]
version: 3.13.3

View file

@ -0,0 +1,24 @@
apiVersion: v1
data:
TG_CHAT: ENC[AES256_GCM,data:5yKsAprsD3TKPB1Z14TeEw==,iv:7fbiXNIl3rs8KJe3kJ7ojhIyN0E56IFvmsbTTj7xBw4=,tag:Bdh1ykvi2QgwFYCRZInr9w==,type:str]
TG_TOKEN: ENC[AES256_GCM,data:aVtjdBFosAW+Y3gW5n+4JThfy+KZT/BawTPPrmLD5wzXlBQS0LqHsWHbSAJ8POqvlcKBq5FhvNe2EgpoXtk/xw==,iv:0P9wQSoiK1bMPlu6brEwahJUcootcfq2e33zE8cDRBo=,tag:BHEmtpPIsLRWzTiSrkljAg==,type:str]
kind: Secret
metadata:
name: piedmont-contact
namespace: piedmont
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBENGhuR3JOMnJsQjRGS05Q
aWgzUDh2aFNsSHJ2MVVMdUZCM1ZwTWpEalg0CmlrZUFtdWtHYWZUNTdLQkdUVHJx
WjExS003a2R1TFdsRXNXZDBrZzN4bmcKLS0tIDVxcnhiMXhWVnpFNEw1L3FoNk1P
MkxwUi9KK0t1MWxYRFJLdHpxQzlqb2sKBr3OtODWT8zrZVal8kO0tS4XvNgcaxJS
r6uKRGwr4g0P6uAxqaAp3iIQPTLhVUA2omU0KOEroEDJTbrGmo0V2w==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:43Z"
mac: ENC[AES256_GCM,data:5vUnGhYKucbQVIIcTI98pI6Ip8DnI7bo+4wMUebtk2ELxMq6+8zdI9bn0pmm1kdJy+dB9weRUJ+iGi7VnO9uk/1256cMZrjIvpBDcCaBoevuLkdXSNbV7tMAhcTemr8yHVGWeJ6OPFEsqK5GDA9CSx6sDGXjEOnb/Qh1OlWNUTU=,iv:/diwyI8LSSGk45tTjmyvdMvHJ9iWFZtF0SK240Aw2/w=,tag:lsmPS7X+bws2zlOG0qpK9g==,type:str]
version: 3.13.3

View file

@ -3,4 +3,10 @@ kind: Namespace
metadata: metadata:
name: secops name: secops
labels: labels:
pod-security.kubernetes.io/enforce: baseline
pod-security.kubernetes.io/enforce-version: latest
pod-security.kubernetes.io/warn: restricted
pod-security.kubernetes.io/warn-version: latest
pod-security.kubernetes.io/audit: restricted
pod-security.kubernetes.io/audit-version: latest
app.kubernetes.io/part-of: secops app.kubernetes.io/part-of: secops

View file

@ -23,6 +23,8 @@ spec:
labels: labels:
app: sgs-leadgen-ncda app: sgs-leadgen-ncda
spec: spec:
imagePullSecrets:
- name: forgejo-pull
restartPolicy: Never restartPolicy: Never
nodeSelector: nodeSelector:
kubernetes.io/hostname: siriussec kubernetes.io/hostname: siriussec

View file

@ -21,6 +21,8 @@ spec:
labels: labels:
app: sgs-leadgen app: sgs-leadgen
spec: spec:
imagePullSecrets:
- name: forgejo-pull
restartPolicy: Never restartPolicy: Never
# local-path is a node-local volume: the pod must run where the PV is. # local-path is a node-local volume: the pod must run where the PV is.
nodeSelector: nodeSelector:

View file

@ -13,6 +13,8 @@ spec:
labels: labels:
app: sirius-growth-contact app: sirius-growth-contact
spec: spec:
imagePullSecrets:
- name: forgejo-pull
tolerations: tolerations:
- key: dedicated - key: dedicated
operator: Exists operator: Exists
@ -23,7 +25,7 @@ spec:
- name: contact-api - name: contact-api
# Built and pushed by sirius-growth/.forgejo/workflows/deploy-contact.yml # Built and pushed by sirius-growth/.forgejo/workflows/deploy-contact.yml
# as :$sha (see docs/site-image-pinning.md). # as :$sha (see docs/site-image-pinning.md).
image: forgejo.siriusdevops.com/sirius/sirius-growth-contact:c9c9379ebceca6879d3bbeff1c2601b6484e87b0 image: forgejo.siriusdevops.com/sirius/sirius-growth-contact:97cfa4fc1345bbc04c56bbc529416f50ce51a965
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8090"] command: ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8090"]
ports: ports:

View file

@ -13,6 +13,8 @@ spec:
labels: labels:
app: sirius-growth-blog app: sirius-growth-blog
spec: spec:
imagePullSecrets:
- name: forgejo-pull
tolerations: tolerations:
- key: dedicated - key: dedicated
operator: Exists operator: Exists

View file

@ -13,6 +13,8 @@ spec:
labels: labels:
app: sirius-growth-portal app: sirius-growth-portal
spec: spec:
imagePullSecrets:
- name: forgejo-pull
tolerations: tolerations:
- key: dedicated - key: dedicated
operator: Exists operator: Exists

View file

@ -13,6 +13,8 @@ spec:
labels: labels:
app: sirius-growth-site app: sirius-growth-site
spec: spec:
imagePullSecrets:
- name: forgejo-pull
tolerations: tolerations:
- key: dedicated - key: dedicated
operator: Exists operator: Exists

View file

@ -14,6 +14,12 @@ resources:
- service-blog.yaml - service-blog.yaml
- service-portal-gate.yaml - service-portal-gate.yaml
- httproute.yaml - httproute.yaml
# Default-deny ingress+egress + the namespace allow list (audit F3 / t_fed52919).
- networkpolicy.yaml
# Egress lockdown for the leadgen-backup pod: DNS + 10.10.0.5:22 only. The
# allow list above cannot be narrowed per pod, so the deny for `world` in
# this policy is what applies to the job (card t_9d0428d8).
- networkpolicy-backup.yaml
# The WAL archive store must exist before the Cluster references it. # The WAL archive store must exist before the Cluster references it.
- objectstore-portal-wal.yaml - objectstore-portal-wal.yaml
- cluster.yaml - cluster.yaml
@ -27,3 +33,15 @@ resources:
- backup-exec-rbac.yaml - backup-exec-rbac.yaml
# Snapshot mirror of the lead-gen capture PVC to the Linode. # Snapshot mirror of the lead-gen capture PVC to the Linode.
- leadgen-backup.yaml - leadgen-backup.yaml
# Secrets, SOPS/age-encrypted in git. Flux decrypts them (the `apps`
# Kustomization carries a decryption block; key = flux-system/sops-age).
# Never add a plaintext Secret next to these — see docs/secrets-sops.md.
- secret-forgejo-pull.sops.yaml
- secret-portal-wal-s3.sops.yaml
- secret-sirius-growth-blog-app.sops.yaml
- secret-sirius-growth-blog-s3.sops.yaml
- secret-sirius-growth-contact.sops.yaml
- secret-sirius-growth-portal-app.sops.yaml
- secret-sirius-growth-portal-db.sops.yaml
- secret-sirius-growth-portal-s3.sops.yaml
- secret-cluster-backup-ssh.sops.yaml

View file

@ -20,10 +20,10 @@ data:
# Snapshot mirror of /src -> $BACKUP_DIR/leadgen-data/<stamp>/ + `latest`. # Snapshot mirror of /src -> $BACKUP_DIR/leadgen-data/<stamp>/ + `latest`.
set -euo pipefail set -euo pipefail
if ! command -v rsync >/dev/null || ! command -v ssh >/dev/null; then # No package install here on purpose: rsync/openssh-client/bash are baked
echo "== installing rsync + openssh-client" # into the pinned image (images/backup/Dockerfile) and this pod's egress
apk add --no-cache rsync openssh-client >/dev/null # policy admits DNS + 10.10.0.5:22 only, so a runtime fetch would fail
fi # rather than silently dial the Alpine CDN (card t_9d0428d8).
BACKUP_HOST=${BACKUP_HOST:[email protected]} BACKUP_HOST=${BACKUP_HOST:[email protected]}
BACKUP_DIR=${BACKUP_DIR:-/root/cluster-backup} BACKUP_DIR=${BACKUP_DIR:-/root/cluster-backup}
@ -102,12 +102,18 @@ spec:
app: leadgen-backup app: leadgen-backup
spec: spec:
restartPolicy: Never restartPolicy: Never
# Pulled from the in-cluster Forgejo registry (which requires auth).
imagePullSecrets:
- name: forgejo-pull
# The PVC is local-path on siriussec. # The PVC is local-path on siriussec.
nodeSelector: nodeSelector:
kubernetes.io/hostname: siriussec kubernetes.io/hostname: siriussec
containers: containers:
- name: backup - name: backup
image: alpine/k8s:1.36.4 # rsync + openssh-client + bash baked at build time, pinned by
# digest (images/backup/Dockerfile). Nothing is installed at run
# time.
image: forgejo.siriusdevops.com/sirius/backup-tools@sha256:cc8dc1645111b3a80b7c4d5168f6bce3002cae7417b3725683c057976f6e379a
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: ["/bin/bash", "/scripts/backup.sh"] command: ["/bin/bash", "/scripts/backup.sh"]
env: env:

View file

@ -3,4 +3,10 @@ kind: Namespace
metadata: metadata:
name: sirius-growth name: sirius-growth
labels: labels:
pod-security.kubernetes.io/enforce: baseline
pod-security.kubernetes.io/enforce-version: latest
pod-security.kubernetes.io/warn: restricted
pod-security.kubernetes.io/warn-version: latest
pod-security.kubernetes.io/audit: restricted
pod-security.kubernetes.io/audit-version: latest
app.kubernetes.io/part-of: sirius-growth app.kubernetes.io/part-of: sirius-growth

View file

@ -0,0 +1,49 @@
# Egress lockdown for the nightly leadgen-backup CronJob (card t_9d0428d8).
#
# Why: the job used to `apk add --no-cache rsync openssh-client` at container
# start, so each run depended on the Alpine CDN (Fastly 151.101.x.132:443).
# rsync/ssh/bash (+kubectl, unused here) are baked into
# images/backup/Dockerfile now.
#
# `sirius-growth-allow` (networkpolicy.yaml) selects every pod in this
# namespace and allows `world` (Telegram Bot API, the leadgen crawlers), so a
# pod-scoped allow list alone would NOT restrict this job — Cilium unions
# policies. The `egressDeny` for `world` closes it for this pod only; the app
# pods keep their internet access.
#
# Allow list, and nothing else: cluster DNS, and [email protected]:22 (the Linode
# node's InternalIP — `remote-node`, not `world`) for the rsync mirror.
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: leadgen-backup-egress
namespace: sirius-growth
labels:
app: leadgen-backup
spec:
description: >-
leadgen-backup pod: cluster DNS + SSH to the backup host (10.10.0.5:22)
only; no internet egress at run time.
endpointSelector:
matchLabels:
app: leadgen-backup
egress:
- toEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: kube-system
k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP
- toEntities:
- remote-node
toPorts:
- ports:
- port: "22"
protocol: TCP
egressDeny:
- toEntities:
- world

View file

@ -0,0 +1,121 @@
# Tenant isolation for `sirius-growth` (audit finding F3 / A5-1, card t_fed52919).
#
# `default-deny` (stock NetworkPolicy, podSelector {}, both directions) is the
# deny. `sirius-growth-allow` (CiliumNetworkPolicy) re-adds what the namespace
# actually uses:
# ingress: Cilium Gateway proxy (`reserved:ingress`) for
# siriusgrowthsolutions.com -> site:80 / contact:8090 /
# portal-gate:8080 / portal:8091 / blog:8092, node entities for
# kubelet probes, Prometheus in `monitoring` on 9187 only (the
# `cnpg-portal` PodMonitor scrapes the CNPG instance manager), and
# the CNPG operator in `cnpg-system` on 8000 only — the instance
# manager's HTTPS status endpoint the operator reads to derive the
# system ID and drive failover (card t_4210edec).
# egress: cluster DNS; its own pods (blog/portal -> portal-1:5432,
# portal-gate -> portal:8091); `world` for the Telegram Bot API
# (contact + portal) and the leadgen crawlers; the node IPs on 3900
# (Garage S3: 10.10.0.1 for blog/portal media, 10.10.0.5 for the
# portal WAL ObjectStore) and on 22 (leadgen-backup rsyncs to
# [email protected]); and `kube-apiserver` for the CNPG instance
# manager, which needs the API for leader/status updates.
#
# Garage lives on node IPs, which Cilium maps to `reserved:remote-node`, not
# `world` — see apps/base/siriusdevops/networkpolicy.yaml for the original
# measurement (an `ipBlock`/toCIDR rule for 10.10.0.1 is silently inert here).
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny
namespace: sirius-growth
spec:
podSelector: {}
policyTypes:
- Ingress
- Egress
---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: sirius-growth-allow
namespace: sirius-growth
spec:
description: >-
sirius-growth: gateway + kubelet + Prometheus ingress; egress to own
namespace, cluster DNS, the internet, Garage/SSH on node IPs and the API.
endpointSelector: {}
ingress:
- fromEntities:
- ingress
- host
- remote-node
- health
# Intra-namespace pod -> pod (app -> db, sidecars, the backup CronJob).
# Cilium enforces policy at BOTH ends, so this allow must exist in ingress as
# well as egress — measured on `piedmont`: with only the egress rule a pod
# could not reach its own Service (TimeoutError).
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: sirius-growth
# The CNPG operator (`cnpg-system`) reads the instance manager's HTTPS
# status endpoint to derive the system ID and drive switchover/promotion.
# Without it the Cluster reports `Instance Status Extraction Error` and
# Ready=False while the pods serve traffic, and automated failover is dead
# (card t_4210edec). Scoped to 8000: not 5432, not the whole namespace.
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: cnpg-system
app.kubernetes.io/name: cloudnative-pg
toPorts:
- ports:
- port: "8000"
protocol: TCP
# Prometheus scrapes the CNPG `portal` instance manager on 9187.
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: monitoring
toPorts:
- ports:
- port: "9187"
protocol: TCP
egress:
- toEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: kube-system
k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP
- toEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: sirius-growth
# Telegram Bot API + leadgen crawl targets.
- toEntities:
- world
# Garage S3 on the Pi (10.10.0.1) and the Linode (10.10.0.5); leadgen-backup
# SSH/rsync to [email protected]. Node IPs are `remote-node`, not `world`.
- toEntities:
- remote-node
toPorts:
- ports:
- port: "3900"
protocol: TCP
- port: "22"
protocol: TCP
# CNPG instance manager <-> kube-apiserver. Port-scoped on purpose: the
# apiserver is host-networked on 10.10.0.2, and Cilium attaches the
# `kube-apiserver` identity to that whole node IP — an unscoped entity rule
# also opens 8081/8084/8085/8086/8087 (the internal Gateway listeners) and
# :10250/:9100 on the same address. Measured: 10.10.0.2:8085 was OPEN from
# this namespace until the ports were named. 443 is the service port the
# CNPG instance manager dials (kubernetes.default:443 -> backend 6443).
- toEntities:
- kube-apiserver
toPorts:
- ports:
- port: "6443"
protocol: TCP
- port: "443"
protocol: TCP

View file

@ -0,0 +1,24 @@
apiVersion: v1
data:
id_ed25519: ENC[AES256_GCM,data:WZ7KnBoV/semXMuMjKQ5AnuzKbJpbSHLjfsayHBvV9Q2IqL9N2/SmlaoZ3vdf/By2Yy2ayOFI/8/MkebY2vSuhGMtJaN3T4A3LEOCMSLfH0VcAQyfzInqLgF7rNPm+7C+FYSGAA5o2fqXwHzz5AlhNme7xYf4NK1hrnXen1T56uBm/dfXfvs2sJUaEuVq8XKQdnfkkWgXxDbk5SZlGJm/Aa0PpCDxHfoL1lAD6MOpgqKPWi6GDLTl1esiq/EqxUhpjoZo5NTnmaYX6IdaoPscrpvC5E4aGiYkihUsgyjkszLg1LjrsMZBLi0pwd1OWC7isRS2B+LOqetkXvCGtxg+0aaWmIBpZS4Y+G/lHK/WSY/QQsfynPwll5L9RtZtp022eeuLa/lnXyIrQQQLZNmzk7RVW+66twAXcymmV8HQRIdAGku4ZtJL3zEpH2yelN/TWi1bo7/+dtnElaa5bb29BrvP03Rb2GA5mNPtIhItgNOYCknkoXIWCVZ85x+60Ah+xa6R/HXRXRR5/D4+so5nDq2ISmZiq0FD7DEumU+WgvL0GyLsNkqRMl7BCGLeOzIuAO9lNuI/TZDcyOyS3eB0LIQNwdNU0FInJwJ4jp0yR3Cxd14hVATcjCU62zNQTmBHfXgAHLe1XUiUbs/ZxFcx5c36snRNot/jugwjMt0UDqgbwn2xqOvJxJT0hPYhf4u9SPH4VTLAbEE7DrwzNoPyb1I39wPeSLsPxBf4Or0cVw=,iv:oRzm1lCz7DDwF5616Hf+rRblPWJEc4ErHmoXLNvxoXQ=,tag:85h7JyO5wNUA89xIs5Pf1g==,type:str]
known_hosts: ENC[AES256_GCM,data:WAC8hq7IuinfG17Rhmr/F/bYZvviOkQwYpaAMdWnwNG7DrhehlN6x0HDCyVbuBWVMqTW4zva2K3tzWsZ8Ivv/xln8AsjSX3P31SWz6b38pyMPiYZ8lVtz449f84rftnb1KgIeYiTjv/5L5z4+Q/J2TR8UYLSwsi/K0G1Fw==,iv:MT20OcwHEA9zXPoloGaW8tGdbS7Kr+HrHMyk2UWByAY=,tag:s69nJ538DSqs/fTR5hgLtQ==,type:str]
kind: Secret
metadata:
name: cluster-backup-ssh
namespace: sirius-growth
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB5ZC9CdER5b1ZXUDNISTF1
VGllTmhDeHk5RUFkREd1UGM1bi9LRGxCNEFZCllSaS9ZOUtsU2N6TWlhemM1aXpS
elErcTE3K0ExYlVIYTBPczdnM2xuOG8KLS0tIDVDVm44UXhEYU84dktNK2I4L04x
VG1sdTVZVHZuWiswb3ljSWtoWWRDWjgKbUhCAclaS7Im9aqeX79VY/ZcJk/7oR6+
z1TgPZbgJNjAeiKJIztQJrZLHwpqIB6kEYddof/tjlKk6i/epZ2ZGw==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:29:49Z"
mac: ENC[AES256_GCM,data:1tTFNdkgjFiROm0XRqhmedhBqTolSc8oOCTW/QTmv20THC8XrRAt4gYbR3B6fFfzAcyp5I15/OtpPhopfma4VOGrXbShbHxbgKvaAcDWQWh/npwN2pbJJlIldyk0rWYEbRoAlzbDoq2TRfnqL5ejd67XkFQPsOhiWMhWlqfMzv4=,iv:T2rpa4hweAhPnBiUgw+xg2CGXkl2HoGCLGZ5pPSYJGk=,tag:FDat9gyykBOXJ2x2So1dyw==,type:str]
version: 3.13.3

View file

@ -0,0 +1,23 @@
apiVersion: v1
data:
.dockerconfigjson: ENC[AES256_GCM,data:0DHKiX4UaYk314D7LEtFEL2XHHYSxjy8Ezde2ZEWjbHzNxVTbV3lLvCEVGcfh5OpWvWjJ0nu3qf7zHZtYpurXpHQW//BsYXcMGsfTcNO2DeTAd2YZ71FRp71h3hruOR97rldz1Fias8ko2e6QtZMo3ZnuWXnmOEt/y03YHJcOZl2FrM3ZZvdvpRV/wOidpj1DxYQkJqYzhthg3BWd69n45fpNbqIz5RAr+prtEHhxW3CU5/qH+kYVagEdVx+pP6x1L5+7vtGU9vLspk1T6ffoRZ1i2tWwbNCUHRnxzuXVY46Ar+Xz0wPwfpRXwv9PN85Bc1gS8JPy1Tk/ecBp//KfYK1xYF0SRX5axb5BtdlYYNJxPAkqKVx444Rs/FPLpcl,iv:fXN6LROLY1vbOQMmrGiiOztYgulXDV2uZXQhaPnK0Q4=,tag:LPu1DaQSkddNbWbYP5dwcA==,type:str]
kind: Secret
metadata:
name: forgejo-pull
namespace: sirius-growth
type: kubernetes.io/dockerconfigjson
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBiLzBrd29tNkZpWVh4K1BJ
UWtMMGhsa1RqWG04dkRHaEVUUm5MZkZyRVhjCjdCb2hEYlVCY2hBcEo2Mnk2L1NC
TTd1NnNYU1c5SFNpY3hYY0t1Z2RHbnMKLS0tIFFQVGhodllFUExIV0ZCZm0vTnlZ
ZFE1cURYMU41dmw1T0F2dC9BOFRxMm8KrBF8/v5iSPWYgS6Nb31xJfhJWZHDUk7p
LMZHsoddSToOr4CqL8y91ka7MCtUyoJg1NiMnEng+KpI+EpaGjkQlw==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:43Z"
mac: ENC[AES256_GCM,data:RfT47fcDHgOxbjX0HBwtFo6ddD5ijW0QahnTJor1qanCH6pFwqmlJM0BuUTcXfCQmyijJ1SKbaOPQEnkQ0O4zLh2mdUEoSCH7Ig4a6tTVaIVm2kwWfi5Un/uQ/Ok0f+Mc9Bjk7PslSO4szsu6/Q0EeSgVaryTZpslkg0q5NEi80=,iv:L0s0e3RRKKeXcu9tS4stXi/0CSxE9e5NS810jTIrHmI=,tag:fKt1vciLFy9U7JFu31p/fQ==,type:str]
version: 3.13.3

View file

@ -0,0 +1,25 @@
apiVersion: v1
data:
ACCESS_KEY_ID: ENC[AES256_GCM,data:Lv5TNsSVLCh03dNOmamaf0N5bb0Os7KSoAKr5fuY+DLv/mtK,iv:0aAyylLmxqr9vaqTjYu81KmwbQdtR5+b9Yp4dyLuUb8=,tag:IqPPBBmAJ6cqAFiX+5+9RQ==,type:str]
ACCESS_SECRET_KEY: ENC[AES256_GCM,data:mpRJy20dQIHjqAV1iWH03P/QwX0R21aF1Y6v5ieKvYIEf+y1P8S9+HJOsHCc3LImRaUterbTWNFNXivdkBpWUCoAIQgHuYwFXhDBfxuK35kfTvcWtfrOqg==,iv:RCxJy+2pOib0dhLQFzz4uEjdRCvvqJNS9FcCIIClPwM=,tag:0+lhnpO5+lHsKCnOvaA5EA==,type:str]
REGION: ENC[AES256_GCM,data:jhWHctCFNl8=,iv:QoO2S/SpsAI4su0Bc2WX8qvEVu1IVt4NqBZdu9jmNG8=,tag:oAACcO+Oi6DlwMMoRR3STQ==,type:str]
kind: Secret
metadata:
name: portal-wal-s3
namespace: sirius-growth
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBjd28zeWk1ekp2NlB6S21N
UVVleGM0NjEvWGNuVU5GbmFYWE1ad0hBb2o4Ck5kbC9FNGo5WndpQ05IY1Z0S0cx
aTZlb2g4WlpJTi9ibU16dloxUUtIZEkKLS0tIDBldFhyT3U3ckNiV0hpS1o2Tjdn
enV0L0hPakdva3k2K3pEWFZTMUtSSHcKhO+8DmGwgiRYOBkRtyHroHs2uU8/96fi
VfceBBfXNB/h4Hmt99xuVoEiPSnOAVS5/itBArTMoT1iZdD3gadQqw==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:43Z"
mac: ENC[AES256_GCM,data:5RK21+O7LMmj7P6bZW5uITv4v60fq7PUJfsIBgNrLuKzplOcSHTrg+8HVN7X2mMxzkjeNshh4FC3Kkc62mIoWk9ECpboZFAAuFIY0T+m/AVsZXBY9QswtwYH1zpN5xmWvAsA5kbx8WkwsFMOTUeF8/nPrGi/oTW15PxmfmT8xNY=,iv:TPiYECXPnz+vvMqQv0JpyTdZ6dzVQpALyvDXXws170I=,tag:MpneZrMZO7JI9J7bmhv3JA==,type:str]
version: 3.13.3

View file

@ -0,0 +1,24 @@
apiVersion: v1
data:
database-url: ENC[AES256_GCM,data:2WCA8rHmHIPinTxigCO8tn+dljO1slCXyIRtkQ84v3ekUTRFMuSWL9t6FcnT+MEmogx/MsV3ACxmOfLGZH4FGYsRc9i2SmjqZ4YGlw43HUU58+IlKN8lMRQdFj6ejevBqpwkvMySLkrm2WWaUsYhL+YnwW8svtF1,iv:qYAQONgV0fTYZxtmsSMpXnJPc3OWO2doGdIBJS4Vipc=,tag:xpn8aTWuqaXVPPEs/DnOZw==,type:str]
session-secret: ENC[AES256_GCM,data:39e5B6+dkhr/aa2t/zELR4EJbqbzs1u27UW4AqE1IjtYIAU2EuGGx/Lje7+zrG4s2SKq3EtNwYbINXn/zeL5n/KxboIqSWOPVvmQtU/29qShPVonNkdugw==,iv:+TyDMebxlcRyZDysmeB1WU+oFb9sFMmQDdVzgWt9jD0=,tag:y1tL1gB8Ri/byd3B9htfjg==,type:str]
kind: Secret
metadata:
name: sirius-growth-blog-app
namespace: sirius-growth
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBBVzMxcXlSMkYyOFRkV3Zx
eGw5Z3RyOSt5Rm95KzIyZTdPclNlSi9IcVJzCmZ3bXZQUHNoRlZhT0JDdmhnZWtO
VVRyUGhKR3V2eHAyb1VzK3IrQXdnZmcKLS0tIGtVaE5NSloyNzJRUkNpQTE5YnZw
T3JsdWtQOW5UNnFKVnJUZ2lOMUdZVjAKEN0eeLT3uMUmRq0RK9WG9I2lpaUMe3EY
+U0nqJnW5ZRO3b32Y7akBu1Tz28Cz/IQo0G+bvXPeBY7tKk8mpP+qA==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:43Z"
mac: ENC[AES256_GCM,data:hZ92xr8GDGxfeU/sTiD5ouRAZQBHg73B2Rick7OIKWPqFro4tlT7v7qjh32QiysQ8GkJmFN0O3XPuUHF7pKC4UsBrhJi4Co4LUwDib2SrW1OcKEompEdbxO/etg62X3e5LrpaT+ZM4XhYnfUB4lePBX0/dR6T93LtLy0vj/3ktI=,iv:H0Xbgp12vFE9iIAk1emRHOBpPQ4/JSLXMEHrdN1S+VI=,tag:suPN5kd3i6gfw5mhPVpPqQ==,type:str]
version: 3.13.3

View file

@ -0,0 +1,27 @@
apiVersion: v1
data:
access-key: ENC[AES256_GCM,data:BtN7ZYQGm7A6tsBOAMtjtnnJ2ZyCEZiq/6uEWeX4DHy5odX9,iv:0zqKRhHNfw2bv4lMPaHFork9gF+cCTIHCyrM0HtBu0k=,tag:cqvknMjaZzjnyAX6zJ0eYg==,type:str]
bucket: ENC[AES256_GCM,data:tMWUruYwF2hm3rLjl3o1E2BKvpBovVd4znml06lhTpk=,iv:RbHt9Ixr/HEv+ltz57/SCIBEUjjCkNe+wZYKrqieTCU=,tag:epB2Hze7XTAY6Y4AosXQRQ==,type:str]
endpoint: ENC[AES256_GCM,data:3SenxTQo0dclXi8CuV9m0MTJjEFAQwgM4F40QA==,iv:IaJ+sXMaT4IY1DvzjdWV0zAZP8AT18ET1Xm/FD9j8ls=,tag:SRkXngDoQJ/z09AAc3wKZQ==,type:str]
region: ENC[AES256_GCM,data:QBD5OjJUjmE=,iv:tKkFWn/qHhytbAN8gJc5qHC8NR7RmSwaAC3wZv6zklU=,tag:zuhx6B4zn1wSZ7spR3UDRw==,type:str]
secret-key: ENC[AES256_GCM,data:DwyLvmvYpHtflz6em+vIYFM1fAfrHYunRRnl7vpjG+LyE2m/sJQRP5OFGmIggWoiDiz53xCoMTyXXlwheXvLqUe6qy6uicJ2mftjsbjx2OFy0Z/alJzNHw==,iv:gl3bUTMqhQ4bSefvq/r0uQwZ81+m3JZNIxUAruq7XtM=,tag:F3BKwFB1Pjnft/trtk8/6g==,type:str]
kind: Secret
metadata:
name: sirius-growth-blog-s3
namespace: sirius-growth
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA3dE1HQ3RWTFJubW5SeU9S
R2ZNYXhNbDVWSDhQWlM0bVNCaWQ1aHV6TEN3Cnp6elpDUkJnV243YjhWQnZXOFBW
bnFYcGY0VTN2aWUzNVl1V3Q1RDI4VmcKLS0tIDAzbnhabVVmOWlSTmNXZ1MrTXUv
c0N0a1hXNTNTdkVjekFid1BXNTU1alEKH7dMTV3thHyo4b/Qnr7F4PmK5XEn4fFA
NJTaVnfqrmDfHjtOBl+D7xR0TnsJGhm0QN8n85mZOs/Ye5Ad1z1zeQ==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:43Z"
mac: ENC[AES256_GCM,data:o9fPTAsNSJ3zZ73Js5oxLCA94n5EHl2wuNfpDX6ADPPM1sRKes1IXCUV803ntWuyKYSa4SOeqSRxmyQobAjLwAfY6SCQA3ICrsZ1Y28Q+1XnpXapQQj/eCOKkg3yvGV/6k8SHxn9xPPatYSYlPSfShpl4NS/ir5NkLnTIW6f4OM=,iv:lLmi9HRrb3Tfw/R7mxGJAGSd7fOETy5orLIk4zP4d38=,tag:xsYWzmDfJezbqZZ2fuZU9A==,type:str]
version: 3.13.3

View file

@ -0,0 +1,24 @@
apiVersion: v1
data:
TG_CHAT: ENC[AES256_GCM,data:e+QEGcrfPpYCFu76XkhY2w==,iv:fSJndVBB/owy6AoDkfzmUXZSQ4BqvsDoZRbtgvGhaBw=,tag:2JuXWABvTrzcRWZ8J5PCiA==,type:str]
TG_TOKEN: ENC[AES256_GCM,data:tTSb2RRLwSqO+ajl5yHf1BG/AQeanjkBgCqHfNdcwPDESWAlkQTsQJI2m9qqjGmv7qJuLURegRkbRsB3JPM19A==,iv:lSs4+c6k6nSKjpQ8AbXss4ezHOp20G7+DC/7F3Y+AhA=,tag:rFUxlfv0PnRBXYZ1qvXO5Q==,type:str]
kind: Secret
metadata:
name: sirius-growth-contact
namespace: sirius-growth
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAwUWpYZ2tFMnFTQkNTWE1V
ZmxDL2JCdnVsakt2QVRiTEk5amdEa2UzcUQ4ClBUQU0wOXVPRUMzcTM0UnpYeVNM
UHc0WUZDeE0xM21udCt4ZGRjbUNWRzQKLS0tIGE5Vk1jbjNYZmQ4UVN6YkhRa3JU
bU9VVkYrMTdGSjdySFBxcHJXYTdFOGcKZloleo/maxhWJtUrtW+VZSUxeGNfQkUE
FtAMWO8zZMDpGCPknqrhI/yFs8qn29MtZMQ/5NCxWpNhRxg2/nr9rw==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:43Z"
mac: ENC[AES256_GCM,data:qdq1M5K8WOJ2mb1S6sjIq9zibau7EeFqKDbpaQoyfypa+NxtBUk6XvDqtb4Wg4503D/AeAvJEbfe1a5rWCBuyD90g0vkj+4S+QpsEh2mN3hHAk96iG+FhNeJtVLDWVOAlgW07BIXx9mcvhFd2eDBSYSZJfS7wWdi52cS3AMZ3C8=,iv:vJ5uJuDkipDrmKiphNPqFMLTN3ChF81lgg5CuoZt88w=,tag:ThS0o18fBByDUu9t1N8a4w==,type:str]
version: 3.13.3

View file

@ -0,0 +1,31 @@
apiVersion: v1
data:
admin-password: ENC[AES256_GCM,data:c2nD05J0TxN0nfXtULxT8j/StqlYnfU1vnVkSECdKFtWrE5TkDU86g==,iv:22eU1MDXc+p7R+67qcxADWgyuQkFv9H+XUXo1N4wlm0=,tag:uiAgvJrG0gKMvzS/QEp6Kw==,type:str]
admin-username: ENC[AES256_GCM,data:hGuuNqBS46k=,iv:epr8YnClNEKaHoHF1AW6fY8qMJJRAVTAHfBGV7hBxaU=,tag:QbMOgrY+l1ZnJcil523Zkw==,type:str]
database-url: ENC[AES256_GCM,data:r/2PM6hoMQVFovTf8DKoa/xk9BPV2t3iz2FC8UauvgFSUpMn+EnH8WVCmhJT4amdJ4vhGYX9d4Va54fN8mqw2c8+vERzOkML9XRIVx+tcnln+PKb6BFZGYsrZg1QUmHsyN16NET/NgR2PDIVO7EuqvoS58ngI3fOFZQMrw==,iv:HeRpZylpUTKw3ZdOCeBtGE0d+87rnfYD4LmBPZT1dG0=,tag:y+zfJaLY0loBvuG+fAcwEw==,type:str]
s3-access-key: ENC[AES256_GCM,data:PP5id3M3UCw/M172eVgVcwdkdZRFZUGqh6jnO2dTBjEfL6FJ,iv:e+tUjdmIREAmI1YUxmn4q0NHoP6JEQT7L4d6hBF1tJk=,tag:ssCw3sdIY8QVaT/F4Zu88g==,type:str]
s3-bucket: ENC[AES256_GCM,data:ia/9b7m2juowxhyvGgARpZqN59iiBq2vfPCdXKqmxmGO/dtU,iv:uRy1PAJPX8/X/buDsDmTbb2oKF5jj9PSf3SivdE7lF0=,tag:vmtpngDN3xsFl94Ipq4Mag==,type:str]
s3-endpoint: ENC[AES256_GCM,data:m9P2j9rlA59nkU0mGGELr80VzDGq6J3LG6/x3Q==,iv:WOsbR1zzhFBF3tb9fTsEG/PA1xv/HtWguuj1eew2l/U=,tag:5EMVNv5UTsM0w5XvyCaOtA==,type:str]
s3-region: ENC[AES256_GCM,data:r1GPY6okYy8=,iv:INWRwicCmKKJQ6k5qfeS1AlvbfKZUAJ9qKXycMtajZ8=,tag:2c10isLJoAV8VuJkp0rPJw==,type:str]
s3-secret-key: ENC[AES256_GCM,data:xd+salTGR8+3cYWx1MS6lRgNt3+uxlQRWRmGjQ2kp2WntxgSw2bO6TJbIRuYZ/ofJhiIhdzZwtz0/kHObzQGp0lJBD0peUi0Md7fyMZIDSIyox/DMWFVjw==,iv:cPKLOrANOhnmdx46O17s4zT28pZBoFY3QZMhfWbI7ec=,tag:o9XtqCQxwg9SlsWM+s47pQ==,type:str]
session-secret: ENC[AES256_GCM,data:r+e+fcOx/n5B+HFOVSqUi9J3ZFs3bV3n20rHJ1YbJypMsYvF6/ciKByQccrk4XJj/mh5Vv0EpoAZZ3H/CBbmD+KXhD1fI1urCLuQWQU2keoNTYvtjpJ3YQ==,iv:HPtEQoDYMRzh7EHsI4Bq/R6FP3fGKfXlHWWWToWl2kM=,tag:9TUSmWKmSoAv1niDiRrbRg==,type:str]
kind: Secret
metadata:
name: sirius-growth-portal-app
namespace: sirius-growth
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA4SVRoZVdYRDhzSnNnTWtB
RUp1Y1ZkaWVIVDJySkhNUFNMLzFKb0I4OW5rCnNJZDRVaWt0c0hCcmNnMFQ1YnFn
UTA3Y2YwMFVVREMrNlFGY0x3ZDdRUzQKLS0tIEVuRXliaFVqUExHV0hLenpkZGI4
STNPZGp2OEl1ditNdEVzbTZGOTRTN0UKb5K3XFqg4dssLmJ7bIydniEYdgIX+U/J
18wlw+xjEkYt8hbomMuGMzmb34xB8aqBFuGIqIgAE7X1TmdJjdLSBA==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:43Z"
mac: ENC[AES256_GCM,data:S5NpEd6GQ2CCIA5IubpL4ZujlolgxXSOj+xFN1+OdSO4IzVmHu9N9pOjvTOp5yoO0uVRUtcvb26ZdGGRhFShH2oSOgowyHYPZoP/+ISkEcnq8I+T+eP7vMRjJhTxPY99U8itBQEcVk86ZxwUvB0opDEfKcs6sWtSdBAYF0km96U=,iv:pgF2hY5UMXsEo6BK7Lvc8N0qgsaRujm1J+Qn2N/9zrk=,tag:M6PsAj1O6ZIczmo58uY/Ow==,type:str]
version: 3.13.3

View file

@ -0,0 +1,24 @@
apiVersion: v1
data:
password: ENC[AES256_GCM,data:nyMG2GOfeqrLf/Wrc8gpJvWvhmt+mOl4cufF/jEjN3RFTuOxlA2Dpv7Tkcc=,iv:FcVjGBS3VTd0uiIwtCR9bKTC40bBd06NgEiejg++qBM=,tag:qPbU3aXoQUY//ZtsvhZVXw==,type:str]
username: ENC[AES256_GCM,data:MGxy7B3XPoY=,iv:Yl9kg/miYjB5ztWgkNaHotAL9gAJOr0sIIzSnsfJb40=,tag:F6C/xFr7siImFTwejk4qVw==,type:str]
kind: Secret
metadata:
name: sirius-growth-portal-db
namespace: sirius-growth
type: kubernetes.io/basic-auth
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA2cWg3dXdEalVsTjdrcDdq
dVZuM3pIUk9QS1VMLzYxdy94NkFFZzdyZDM4CnRsemVGZUFSMyszK2dTcWtDRzlw
UVFKNVlLWUdZK1g1T1ArdGVpVW9LSmMKLS0tIHI0UG5TOFp0V2RvTVdyeThjL1RM
ekVXekpNdDRTMlppLzdtMWhBcXpuR0EKD4Up4T0fZBvTo4CaT1++eEABGq3QqFWf
jKVP8HH7rrfL3vFiURBq+5hnveGOdG660tOhUwObfqQ+/By/Hd848Q==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:43Z"
mac: ENC[AES256_GCM,data:R5ujg3tKTtRJ5xP0n0B4QxLAY17BsMT4PUQS/I4FsGdF3WbWe9a8NDCuauLSW5iWiLwrmnrV+BfTwSFLwawFfFCu06z4+XuqrdRP7MQ29jfnqvMO1rHhO41egJK7D8qZhOlSJSgIjqjP8NmsbAmLDKacUUkK4Iac3xUChJIGUlg=,iv:ntiQQVeTAoz+zlFUsZjqEcrKajv3I9jIHV3HxKZUWMA=,tag:KtcVneaGvgNIYbUVyy69tw==,type:str]
version: 3.13.3

View file

@ -0,0 +1,27 @@
apiVersion: v1
data:
access-key: ENC[AES256_GCM,data:nQYK9vgxtGAnxzKatbwBIEdCSKy6PhE3ulzPvVBTxiY7GqCL,iv:PW6Q7Kdq8leuc8wc9JxqX2Sapi1B7JgY5HjNJG3/Jng=,tag:giD4hBn8MWPDD2tUkEGMRA==,type:str]
bucket: ENC[AES256_GCM,data:uNHEPKxdXj0tO3ZLbscAXkNCaU5r5iycob8PZSr2136PxwMH,iv:HWjxUhKQvlU9+jstZDQDFAFk8Zl85sR/V/s0z7VsGcE=,tag:K6xU2KeysNCsqJmgCnITCw==,type:str]
endpoint: ENC[AES256_GCM,data:YiGTsqLihDGvgd9fOheQP+qpi3oGa01yuqSZAA==,iv:OXvr8v1r8OhIjfle2FZSHy5C9gLEn1VPjhz2tntapRE=,tag:fAuc5hodGd1G6E44pYCmAQ==,type:str]
region: ENC[AES256_GCM,data:jCReGhHjKME=,iv:GEFo1jMowRopFJXqg0MhlB7BoeKy9QUAgF8oFEBJoEY=,tag:pbgVYEG9eJLxQc3e9qBMjA==,type:str]
secret-key: ENC[AES256_GCM,data:+cVJh8vODYlikPd1wZUybU9CKavcQNkGUiN3/rIgUKYX6VJr2Vdkhog0lGtWtbEl6ztHtOZYtJKvVGtQsVNaodTiySuhzURdKGECeeBDPYAXuyWoqPCNqw==,iv:KJ2eychXLLI0Nm4CkWCUG8n/sOGcUYOeEjKsz9Spwio=,tag:Q2z3WkLKAanqdN6LDDnBeA==,type:str]
kind: Secret
metadata:
name: sirius-growth-portal-s3
namespace: sirius-growth
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAyNG9UQU02SmVocUFSQzdF
VER3cktyekQzRHRXa1lrVkkyYTNKQk1EQVdNCnpvVzUvdVNlN0JOUVhkRmxEY21E
YWJlYWVjYS9Xd1VKcU1tM3lsZ29XUHcKLS0tIGlWc21ITnVEZjVPR3JVcEdLQUNN
MEZoUHF6U0xuSFdoMlpvMm1tRGtmc1kKaTnCrsZh2R42IibOojqWWiwpxGS67o9b
vFqpBh25ouxekmJJTdKUApj/GcfqTIiF2PN+05uciWH9SnZl0Ms0wg==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:44Z"
mac: ENC[AES256_GCM,data:ibtGyLLBwMgOZuVMRi8uP/vJXYAFv0Y3sy4TROdMnx+Nx9e6uAvCM7nQAWLxKWRN95YGTyAOET/q1Pz1Gm3ipgMa22iIEhH8QqoRl1ruIrUoNAvR/snpt9SxVS1TiCZBszKxpg2+fUXffnSqB5F6N0K3kppVaI7vYBuqYMcMi8Y=,iv:zHefLJ1EhblzQzb3N1IPctOLP1BLSYKGSRkLagP03/o=,tag:musgvP5M2M5ZnHD7LEnEHQ==,type:str]
version: 3.13.3

View file

@ -13,6 +13,8 @@ spec:
labels: labels:
app: siriusdevops-contact app: siriusdevops-contact
spec: spec:
imagePullSecrets:
- name: forgejo-pull
tolerations: tolerations:
- key: dedicated - key: dedicated
operator: Exists operator: Exists
@ -21,7 +23,7 @@ spec:
kubernetes.io/hostname: siriussec kubernetes.io/hostname: siriussec
containers: containers:
- name: contact-api - name: contact-api
image: forgejo.siriusdevops.com/sirius/siriusdevops-contact:8642f1a14b1dd9f217e32856b7a9ea0a0c37e3aa image: forgejo.siriusdevops.com/sirius/siriusdevops-contact:467b0875c24af2c69962fc246fd31044d3f666be
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8090"] command: ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8090"]
ports: ports:

View file

@ -13,6 +13,8 @@ spec:
labels: labels:
app: siriusdevops-site app: siriusdevops-site
spec: spec:
imagePullSecrets:
- name: forgejo-pull
tolerations: tolerations:
- key: dedicated - key: dedicated
operator: Exists operator: Exists
@ -75,7 +77,7 @@ spec:
memory: 128Mi memory: 128Mi
containers: containers:
- name: nginx - name: nginx
image: forgejo.siriusdevops.com/sirius/siriusdevops-site:399c421f51a2fd74a87e810641226d58e4e22690 image: forgejo.siriusdevops.com/sirius/siriusdevops-site:3ac9870aa7637cffb789edcc16b9512d7567886d
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 80 - containerPort: 80

View file

@ -7,4 +7,12 @@ resources:
- service-site.yaml - service-site.yaml
- service-api.yaml - service-api.yaml
- httproute.yaml - httproute.yaml
- networkpolicy-site-egress.yaml # Replaces the egress-only `siriusdevops-site-egress` CNP: same Garage +
# DNS allow, plus a namespace-wide default-deny and ingress rules (F3).
- networkpolicy.yaml
# Secrets, SOPS/age-encrypted in git. Flux decrypts them (the `apps`
# Kustomization carries a decryption block; key = flux-system/sops-age).
# Never add a plaintext Secret next to these — see docs/secrets-sops.md.
- secret-forgejo-pull.sops.yaml
- secret-garage-media-s3.sops.yaml
- secret-siriusdevops-contact.sops.yaml

View file

@ -2,3 +2,10 @@ apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
name: siriusdevops name: siriusdevops
labels:
pod-security.kubernetes.io/enforce: baseline
pod-security.kubernetes.io/enforce-version: latest
pod-security.kubernetes.io/warn: restricted
pod-security.kubernetes.io/warn-version: latest
pod-security.kubernetes.io/audit: restricted
pod-security.kubernetes.io/audit-version: latest

View file

@ -1,70 +0,0 @@
# Egress policy for the public site pod — the first policy in this namespace
# (there were zero before 2026-11-19, so every pod could reach every WireGuard
# address).
#
# What it is for: `siriusdevops-site` runs an initContainer that pulls owner
# media out of the private Garage bucket over the mesh
# (http://10.10.0.1:3900). Nothing else about that pod needs to talk to the
# WireGuard network, and the pod is internet-facing, so it is the right first
# pod to fence off.
#
# WHY A CiliumNetworkPolicy AND NOT A networking.k8s.io NetworkPolicy:
# 10.10.0.1 is a CLUSTER NODE (rpi, the WireGuard hub), not a bare address.
# Cilium resolves it to `reserved:remote-node` (identity 6) in its ipcache
# (`cilium-dbg bpf ipcache list | grep 10.10.0.1` -> identity=6), and `ipBlock`
# / toCIDR rules are only evaluated for `reserved:world`. A standard
# NetworkPolicy with `ipBlock: 10.10.0.1/32` is silently inert here — measured:
# the pod's request to 10.10.0.1:3900 timed out exactly like the denied ports,
# while Prometheus (unrestricted namespace) scraped the same host fine.
#
# The narrower `toNodes: [{matchLabels: {kubernetes.io/hostname: rpi}}]` form
# would name the node exactly, but the agent rejects it unless Cilium runs with
# `enable-node-selector-labels: true` — status: "FromNodes/ToNodes rules can
# only be applied when the \"enable-node-selector-labels\" flag is set". Rather
# than change a cluster-wide Cilium flag for one policy, this uses the
# `remote-node` entity: any cluster node, TCP 3900 only. Every cluster node is
# on the WireGuard overlay, so this still cannot reach the LAN or the public
# internet, and the port scope is what makes the denial test meaningful.
#
# Scope: Egress only, one pod selector. Other pods in siriusdevops (and every
# other namespace) remain unrestricted — this proves the pattern, it is not
# namespace segregation. Ingress is untouched: the Cilium Gateway must still be
# able to reach nginx on :80.
#
# The policy is a whitelist: once it selects a pod, ALL egress from that pod is
# denied except what is listed. Two allowances:
# 1. TCP 3900 to a cluster node — Garage's S3 API on 10.10.0.1. Deliberately
# port-scoped: 10.10.0.1 also serves the container registry on 5000, and
# that stays unreachable from this pod.
# 2. Cluster DNS. Nothing in this pod resolves names today (the S3 endpoint
# is a literal IP); the rule costs one line and removes the trap of
# breaking name resolution in a pod that later grows a container.
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: siriusdevops-site-egress
namespace: siriusdevops
spec:
endpointSelector:
matchLabels:
app: siriusdevops-site
egress:
# Garage S3 API, on a WireGuard-overlay node, port 3900 only.
- toEntities:
- remote-node
toPorts:
- ports:
- port: "3900"
protocol: TCP
# Cluster DNS (CoreDNS) only.
- toEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: kube-system
k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP

View file

@ -0,0 +1,88 @@
# Tenant isolation for `siriusdevops` (audit finding F3 / A5-1, card t_fed52919).
#
# Replaces the egress-only `siriusdevops-site-egress` CiliumNetworkPolicy. That
# policy proved the mechanism but restricted one pod in one direction; this file
# adds the namespace-wide deny and keeps the two allow rules that measurement
# established:
#
# WHY THE GARAGE RULE IS `remote-node` AND NOT `ipBlock`:
# 10.10.0.1 is a CLUSTER NODE (rpi, the WireGuard hub), not a bare address.
# Cilium resolves it to `reserved:remote-node` (identity 6) in its ipcache
# (`cilium-dbg bpf ipcache list | grep 10.10.0.1` -> identity=6), and
# `ipBlock`/toCIDR rules are only evaluated for `reserved:world`. A standard
# NetworkPolicy with `ipBlock: 10.10.0.1/32` is silently inert here — measured:
# the pod's request to 10.10.0.1:3900 timed out exactly like the denied ports,
# while Prometheus (unrestricted namespace) scraped the same host fine.
# `toNodes` would name the node exactly but needs Cilium's
# `enable-node-selector-labels` flag; the port-scoped `remote-node` entity gives
# the same reach (any cluster node is on the WireGuard overlay, TCP 3900 only)
# without a cluster-wide flag change.
#
# `default-deny` (stock NetworkPolicy, podSelector {}, both directions) is the
# deny. `siriusdevops-allow` (CiliumNetworkPolicy) re-adds:
# ingress: Cilium Gateway proxy (`reserved:ingress`) for siriusdevops.com ->
# site:80 / contact:8090, plus node/health entities for kubelet probes.
# egress: cluster DNS; its own pods; `world` for the Telegram Bot API used by
# siriusdevops-contact; node IPs on 3900 for the media pull the site
# runs in its initContainer (Garage S3, http://10.10.0.1:3900).
#
# Port 5000 (the container registry on the same node) stays unreachable from
# these pods, exactly as before.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny
namespace: siriusdevops
spec:
podSelector: {}
policyTypes:
- Ingress
- Egress
---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: siriusdevops-allow
namespace: siriusdevops
spec:
description: >-
siriusdevops: gateway + kubelet ingress; egress to own namespace, cluster
DNS, the internet and Garage on node IPs (TCP 3900) only.
endpointSelector: {}
ingress:
- fromEntities:
- ingress
- host
- remote-node
- health
# Intra-namespace pod -> pod (app -> db, sidecars, the backup CronJob).
# Cilium enforces policy at BOTH ends, so this allow must exist in ingress as
# well as egress — measured on `piedmont`: with only the egress rule a pod
# could not reach its own Service (TimeoutError).
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: siriusdevops
egress:
- toEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: kube-system
k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP
- toEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: siriusdevops
# Telegram Bot API (contact form delivery).
- toEntities:
- world
# Garage S3 API, on a WireGuard-overlay node, port 3900 only.
- toEntities:
- remote-node
toPorts:
- ports:
- port: "3900"
protocol: TCP

View file

@ -0,0 +1,23 @@
apiVersion: v1
data:
.dockerconfigjson: ENC[AES256_GCM,data:FGTPqAwCijts4PwpAdGaasBaOAEreJh1JU/fRvn6SqQCPxb0rJlzl8eOVP6dqfGQkR+gct/5xTI6PfUXzD6ElgjPba9K+D/TTz2y5F2h0N9eKVewnMWywR6XaW1tGEjXazapFUDxLzGbCTG9jyEmjDbgIBHqYzCAro1OrsuMZzzFzeQjLFbxWE5HDPPXcHua/j/3LWS77gl7g4PIeWoKfvmsNwwewakRRiLyk5fJ1+4CRQMEoVcCejxiYrMcGqrONhLwIPpuvq04jRT4eo+SowTWWc9vVLf9YSTEy2MAO61yBoPGquScAN8LwQGWIH5oSOr6nWmHh7LLqXRbC+S2DH5SdessYpKv4OrBdSqXMOmLhqAOkqdcNYI1rXlA/40r,iv:a5Nv5UnfBGNlPKqiLcXGITcfU/W2yuqOv8DzG28l6M8=,tag:04HkP6cRcdkbdlPEuKcWwg==,type:str]
kind: Secret
metadata:
name: forgejo-pull
namespace: siriusdevops
type: kubernetes.io/dockerconfigjson
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBuTlUwOXBacU5GbkkvUXhk
WFZ4RWtDRjJCbzhkUEwyekZ4OXBZckFETmlvCnJaTjlMVDZDWnVSNXNiM09KRE1Z
MDVsMlZROVZVKzY5enRrVHkzc2VuQVkKLS0tIEF0Z2RqaHdsdFVmcjlCWGJGdnpj
Q2JCNVNPbG9pVGpVTXBoa3o1ZjVQa0UK7ADGX0391HfrzCMRhGciJgpajKUyzJ4I
gCvkdu8SeNFyoktlaQDIqjjWjY4LVG4koUTQF9kb6aZqyJrwDB5XQw==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:42Z"
mac: ENC[AES256_GCM,data:5DZxAeqDmCtX2F1SJiXVwVP4mOyWh8XfUQRwNbyYF9pguAgq8NSTC+ZwF2HpUUZa+tzSU6M/wr4hJKtEbkxAOVMN3AhKcR7xfzXsrnOYGU1nW4eNc8J4e3+m51d6gZrN27HWGCWQakM+E/tj2h0F6h7U+07sVlOfEzLnLYRn88Q=,iv:Po+2Y2CQdPkWnCcuxfsdmrUpNe1eHHkbdIqujTDjbss=,tag:vdNJzH7rPlgXe6LKMKLbVQ==,type:str]
version: 3.13.3

View file

@ -0,0 +1,24 @@
apiVersion: v1
data:
AWS_ACCESS_KEY_ID: ENC[AES256_GCM,data:ZFFYbez5y5eM5zYyTpWsPWz6AOuSTSRfg2cnqxiyPFxF2MNy,iv:Ii4KlCf1qmYdM/1BK5Y06MCyIS5xjBnBV+uB/pPNDc0=,tag:aS9VAusLyv+GXaoZx8fnhQ==,type:str]
AWS_SECRET_ACCESS_KEY: ENC[AES256_GCM,data:6UCRnrORf/EVtEl4ZBPpLBLzLlZ6C+sxPx9Q4WzEdW42UX9AhosImDs5YoDGiskzHksO4I55JUZeTf1xhuWbkYB/0BheWlr4pHz5b4IjMfdCYJStccXspQ==,iv:ftRq37JciHfGll1LkgpIWftFkXshv2t1HAcCegV+//0=,tag:w8vOXTFW/n19PxikdcUMeg==,type:str]
kind: Secret
metadata:
name: garage-media-s3
namespace: siriusdevops
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBJcllHcHErb3FvaTRpTDZ6
WHBwT2doVXJnTm1lSmtZbSs4bkIzc3JmdUdjCnFhbUNwd2R4dk1uc0Z2ZlkyME5a
RWUySFdjTHVtQVFVblc0MkZETzBuUWMKLS0tIEp0WlYrcXYzU0pqM0xHOUF4VFc2
T210dEtmYmU0d3Q2Z3J0ZS9ia2hQV0EKXxXxfQV9XuOCewI9DDJ7WQ7F+q3jJMOl
BITWgXv2XkFBr2UeCKoYo5AayA5XXRVS16qzySL0Bihcf5do8Y4AQQ==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:42Z"
mac: ENC[AES256_GCM,data:hKCawRhmKuvLNdF2sLKeE4vF7ZP5UU/w99cfmbkmUqzHea1ioRvTmqUBA5e9/CiYOHDWyTvZDLj/O1jVZBzR3EU3SxU6GK2tuqg/F0vzAzPuwJo32MhuJM+RGu6xbGq5MNjsp7yKyPr00u6krQxpkWSD1RVR7UXLX2T6wvP9HMI=,iv:GY70FcdOaOtkLRLorHqx0lZfiV4/1jpwUYhJHQgqkVk=,tag:LOj61JlJzek2XpxOrKUpEg==,type:str]
version: 3.13.3

View file

@ -0,0 +1,24 @@
apiVersion: v1
data:
TG_CHAT: ENC[AES256_GCM,data:E5cxci96oZ0NoM2iq8FrAQ==,iv:7nox/CI/oFbOQkvagBtdBDA+3WJbxDlpUlTKtjAJva0=,tag:+kOWy2KGvulk5tySAF5/cw==,type:str]
TG_TOKEN: ENC[AES256_GCM,data:AXPJu/cwUVqNerbhcQxxQ8OUSwukqeE28t+1n5hcFOJ76xlx/U6mcZ3rZDn/Pr3UgUDiiNUC5ja63Z/XRCHwLw==,iv:2MRHNh7waV5hwzsDR7Wn4RR99NiAI6CyAqiwznkAH8o=,tag:sR0OXmISsBgzMTkw3SW78g==,type:str]
kind: Secret
metadata:
name: siriusdevops-contact
namespace: siriusdevops
type: Opaque
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnOEJtK3FYUFlyM0lwU3hG
c2F3TUNyS3B3UjdMMUdzQjU3UjFicUM0TGxJCmZRYjVPVEhmWFhIazNNcFBzMHVS
VWFKaXU4OEZiLzQrdlNWcWJRbld2b0kKLS0tIEVOSG9YelF6aUx1dXFXS3FXbEhU
eXNKdER5ZlVsbHJETkxEZ1JaT05PcEEKR7qlnvNhIrgF6UuQXaRhvG2+z16WRkZI
F8Pw7QXDIr1m961OTupvAvswuDB0GR146y18iZefD+v/udIam9EVeQ==
-----END AGE ENCRYPTED FILE-----
recipient: age12zdn7x72zrgu9cdv8wdj7xfx42nz09nrwpc2g09cwx5fwdm0ry6qp5h4jp
encrypted_regex: ^(data|stringData)$
lastmodified: "2026-11-27T05:16:43Z"
mac: ENC[AES256_GCM,data:nSJoyIps1Xd3aNj0DPceEWypdU+y8zh2NFOsQ5A2LAkeDFblwwG93ECvThw0JeWSHL6B3X9xIi3ZqLFy72owtcKI3idOLQ/WG3OycCJ4YZ4WnfobPDIsR2nd+x54rLL7TXOw1+lE8WCh2SEv1Ytg0lFZ/jrFUzy5e7CLHe0PZyU=,iv:CGLhOySEWCnnhoPd+oURkSBYKUF/gDcL4w5A/pw0Y4k=,tag:dCHJnIZ0PJK9OiK95kMt5A==,type:str]
version: 3.13.3

View file

@ -13,6 +13,13 @@ spec:
name: flux-system name: flux-system
path: ./apps/home path: ./apps/home
prune: true prune: true
# Secrets in apps/base/*/secret-*.sops.yaml are age-encrypted with SOPS.
# The private key is the `flux-system/sops-age` Secret (key `age.agekey`);
# it is never in git — see docs/secrets-sops.md for the escrow locations.
decryption:
provider: sops
secretRef:
name: sops-age
dependsOn: dependsOn:
- name: infrastructure - name: infrastructure
# `sirius-growth` now carries an `ObjectStore` (barmancloud.cnpg.io) whose # `sirius-growth` now carries an `ObjectStore` (barmancloud.cnpg.io) whose

View file

@ -15,4 +15,11 @@ spec:
# release object, and the chart's CRDs carry `helm.sh/resource-policy: keep` # release object, and the chart's CRDs carry `helm.sh/resource-policy: keep`
# so they survive. Nothing here is a bare CRD in git, hence prune: true. # so they survive. Nothing here is a bare CRD in git, hence prune: true.
prune: true prune: true
# Uniform SOPS policy for every Flux Kustomization: a tree with no encrypted
# files today is exactly where a stray secret-*.sops.yaml would otherwise be
# applied as literal ENC[...] ciphertext — silently. See docs/secrets-sops.md.
decryption:
provider: sops
secretRef:
name: sops-age
wait: true wait: true

Some files were not shown because too many files have changed in this diff Show more