From the history. Commands and status describe their original context; follow the linked current guide before making changes.
IronBridge rollout and migration history
Historical notes, preserved from the original guide. Commands and verification statements describe that work at the time; this is not a procedure to rerun. Use the current operating guide first.
IronBridge has one replica and a Recreate update strategy. Its Slack and
Discord gateway connections have no distributed owner election, so overlapping
pods must never forward at the same time. State is in the ironbridge database
on the existing northops-postgres cluster; this
Deployment has no database PVC.
The readiness probe runs ironbridge ready inside the image. Version 0.2.5
opens the PostgreSQL connection and, when the dashboard is enabled, requires
an actual HTTP 204 from the local dashboard health endpoint. A database outage
or stopped dashboard listener makes the pod unready. This does not prove that
Slack or Discord gateway sessions are healthy; verify those separately during
the controlled live test. Enable Message Content access on the Discord
application before activating reverse forwarding.
Version 0.2.5 Slack commands #
The proposed deployment pins the published ARM64 image
sha256:d527439f6233f38202f8b90d247b3610606d411d1c626d5ea3388acad6f13137.
The source tests, container build and registry publication passed. The Slack
app has been reinstalled in North Ops with commands permission and the
/poll and /gif definitions. The rollout and live command checks remain
pending.
/poll opens a native Slack editor with 2–10 options and add/remove controls.
Published polls have a fixed option list; members can change their own vote.
Polls and votes persist in PostgreSQL. After rollout, verify that the
bot_polls and bot_votes tables exist, readiness succeeds, both platform
gateways connect, and the poll editor opens and preserves entries when options
are added or removed. Publishing and voting in a controlled channel remain
unverified until that live check is performed.
/gif opens a search picker, but searches require GIPHY_API_KEY. No key is
currently enrolled or mapped into the deployment, so GIF search is not active.
Before activating search, store a dedicated key in the IronBridge 1Password
item, map it through an ExternalSecret, and verify a search after the secret
synchronises. Keep the existing operational secret healthy while credentials
are absent. Slack’s built-in GIF picker is available independently of this
custom command and does not need an IronBridge API key.
These bot interactions apply to eligible public Slack channels. Polls are not mirrored to Discord, and bridge readiness does not establish command delivery.
The active manifest uses BRIDGE_ENABLED=true,
BRIDGE_DIRECTION=both, BRIDGE_SCOPE=all, and an empty
SLACK_CHANNEL_IDS list. It creates missing public channels on either platform.
Private Discord channels and private threads are excluded from public Slack
forwarding; an explicitly configured private administrator pair is handled
separately. Existing same-name channel collisions remain paused until an
administrator approves each pairing.
Verify fresh human messages in both directions, then replies, edits, files,
reactions and deletions in a controlled channel. Slack messages retain the
author avatar and Name · via Slack webhook identity without a source-link
footer. Discord messages use the fixed Slack bridge identity, display the Discord
author avatar, and name the author in the body without a source-link footer.
Slack customization requires chat:write.customize and informed member consent;
the installed IronBridge app has been updated with this scope. Source references
remain in hidden Slack message metadata for retry recovery.
Version 0.1.7 recovers missed Slack replies even after the channel cursor has passed their parent, mirrors a missed Discord thread starter before attaching replies, and names new Discord threads from the original message. Check mention suppression and loop prevention, then restart the pod and verify queued work resumes without duplicate delivery. Check delivery failures and unresolved removal tasks after activation.
Version 0.1.8 also mirrors Slack “also send to channel” replies into their original Discord thread and recovers broadcasts silently skipped by older versions. It does not create a second top-level copy of the reply.
The ironbridge 1Password item must contain dedicated Slack and Discord app
credentials: SLACK_BOT_TOKEN, SLACK_APP_TOKEN, SLACK_TEAM_ID,
SLACK_ADMIN_CHANNEL_ID, DISCORD_BOT_TOKEN, DISCORD_GUILD_ID, and
DISCORD_ADMIN_USER_ID. The latter identifies the verified Discord
administrator for private notification destination access checks. The
ironbridge-db item contains a separate random password. Neither item may
reuse NorthBot’s credentials. The database URL uses the internal
northops-postgres-rw Service with verified TLS and the CNPG CA Secret.
The shared cluster keeps NorthBot’s database, role, backup ObjectStore and
ScheduledBackup. IronBridge has its own managed role and database. The cluster’s
IronBridge-specific pg_hba rules admit that role only to ironbridge over TLS;
other database connections are rejected before the default authentication rule.
Before activation, verify this with the IronBridge credential against
ironbridge, northbot, postgres and template1. As the ironbridge owner,
run REVOKE CONNECT, TEMPORARY ON DATABASE ironbridge FROM PUBLIC;, then
verify that NorthBot’s existing owner and runtime connections still work.
The existing cluster’s 30-day RustFS Barman backup policy covers both databases;
check a fresh backup, WAL archive and restore containing ironbridge before
enabling the bridge.
Version 0.3.0 Loco migration #
Version 0.3.0 rebuilds the application on the Loco framework. Bridge,
moderation, authentication and CSRF behaviour are unchanged; the deployment
surface changes in three ways. The readiness probe must invoke the task
subcommand: ironbridge task ready — the previous bare ironbridge ready
exits non-zero on this image and the pod would never become ready. Both
durable queues move onto pg_loco_queue; the start-up migration carries live
jobs and moderation_jobs rows across, seeds the deduplication tables, and
drops the old tables. database.auto_migrate applies this on boot, so verify
the migration in logs before traffic resumes. TZ=Europe/London renders
dashboard timestamps in local time; unset falls back to UTC.
The container starts with start, which serves HTTP and runs the bridge
poller that consumes the queue. No extra worker flag is required. Verify the
Creating Postgres queue provider log line at boot, then confirm queued
deliveries drain after the pod is ready. The cutover migration is not
reversible: once it runs, the old image has no jobs or moderation_jobs
tables to consume. If rollback is required after migration, restore the
database from the pre-rollout backup rather than redeploying the old digest
alone.
Version 0.2.2 channel approvals #
Channel approvals open a dialogue on the channel page and keep the entered reason when a request fails. Same-origin submissions preserve their origin; administrator identity and CSRF checks still apply. Competing approvals cannot replace a selected pair. This deployment keeps both bridge directions enabled and retains shadow moderation with external notifications disabled.
Version 0.2.1 dashboard activation #
Version 0.2.0 includes conversation moderation, the administrator dashboard, channel selection for notification destinations, and durable channel-approval notifications. Moderation remains in shadow mode and external alerts remain off. The dashboard credentials must be enrolled before its listener is enabled.
The original dashboard activation pinned the verified v0.2.1 ARM64 image and used
DASHBOARD_ENABLED=true, and requires ironbridge-dashboard at startup.
The internal TLS HTTPRoute references the existing traefik-internal
websecure listener and wildcard certificate.
The ClusterIP Service has no external address. The ingress NetworkPolicy allows
only Traefik pods in network on TCP 8080; database, Slack, Discord and Jev
outbound traffic remain available. Check policy enforcement and Gateway TLS
live during the authorised rollout; rendering alone does not prove either.
Read-only inspection on 2026-09-30 found both running Traefik pods in network
carry app.kubernetes.io/name=traefik, matching the policy selector. No policy
was applied and ingress denial has not yet been demonstrated live.
ironbridge-forward-auth in dev uses the existing OAuth2 Proxy and forwards
its ID token in Authorization. The application independently validates the
signature, issuer and audience. The exact verified administrator subject
receives administrator access; other users need the dedicated ironbridge
member claim for public status access. It must ignore proxy identity
headers as an authorisation source. OAuth2 Proxy already uses
--set-authorization-header=true. No native callback or application OAuth
client secret is required. All POSTs require exact Origin, signed subject-bound
CSRF token and a __Host- Secure/HttpOnly/SameSite=Strict cookie. Test these with
the final application build before enabling the listener.
Identity and secret enrolment gate #
Review this table with Dan before adding credentials or membership. Do not infer identity from names or email addresses.
| Setting | Reviewed source |
|---|---|
DASHBOARD_OIDC_ISSUER |
https://zitadel.damacus.io |
DASHBOARD_PUBLIC_ORIGIN |
https://ironbridge.ironstone.casa |
DASHBOARD_MEMBER_GROUP |
Dedicated ironbridge claim/group |
DASHBOARD_OIDC_AUDIENCE |
Client ID used by the existing OAuth2 Proxy |
DASHBOARD_JWKS_URL |
Verified issuer discovery JWKS HTTPS URI on the issuer host |
DASHBOARD_ADMIN_SUBJECT |
Dan’s verified immutable Zitadel sub |
DASHBOARD_CSRF_SECRET |
Separately generated random secret of at least 32 bytes |
Use only op CLI for credential operations; never print values in logs or task
reports. No values are needed to review these manifests. The app Kustomization
manages ironbridge-dashboard and ironbridge-moderation ExternalSecrets.
The dashboard secret reads JWKS/admin-subject/CSRF fields from the dedicated
ironbridge-dashboard item. Audience is read directly from the same
zitadel-oauth2-proxy-oidc item, property client_id, used by OAuth2 Proxy.
The moderation secret reuses item JEV_API_KEY, property credential.
The dashboard reference is required; moderation remains optional. Flux health
checks require the Deployment, operational ExternalSecret and dashboard
ExternalSecret. Monitor the optional moderation ExternalSecret status separately;
a missing Jev key must not block bridge readiness. Incomplete
dashboard configuration must fail startup. Missing Jev key must leave durable
pending work without calling Jev. Do not add a fictitious MODERATION_ENABLED
setting.
Dan’s exact administrator subject and Discord administrator ID have been
verified and enrolled using op. Verify ExternalSecret synchronisation without
printing their values. Enrol reviewed members in ironbridge separately and
confirm the signed token has the expected group claim. A member may view
public status only. Cases, preview and actions are admin only. Validate
non-member denial and member denial of every admin endpoint with the released
application.
Before each rollout, verify the release and ARM64 image, confirm required credentials are synchronised, and review the rendered diff. Verify database and dashboard readiness after deployment, then both platform gateways. Flux reconciliation and activation need separate approval. Preserve one replica, Recreate, CNPG TLS, read-only filesystem and scratch storage.
Slack permission and shadow acceptance gate #
Review the Slack app manifest and add emoji:read to bot scopes if absent.
Reinstall the app into the same workspace after reviewing the scope diff.
If reinstall rotates credentials, use op to update the existing token item
without exposing the value. Confirm workspace identity, emoji lookup and the
existing channel scopes still work. This is an authorised later operation.
The version 0.2.0 release includes the approval notification fix and its
PostgreSQL-backed tests. Verify private administrator feedback after rollout;
source tests do not establish live delivery.
Begin with MODERATION_SHADOW=true and
MODERATION_NOTIFICATIONS_ENABLED=false. No history import, automatic
sanctions or private administrator-pair scanning is allowed. Verify public
bridged-channel coverage, seven-day cross-channel context, thirty-day routine
context and ninety-day selected evidence after case closure against source
and database behaviour. Verify stable platform-scoped pseudonyms preserve
speaker/target relationships without matching accounts by name.
Record the observation window, public channel coverage, pending/failed queue counts and oldest age, successful Jev assessments, error/rate-limit counts, latency and usage/cost. Set an explicit budget with Dan and compare recorded usage with the Jev account before alert activation. Validate pending backlog survives restart and key absence, then drains within an agreed bound when credentials return. Compare decisions with human review and NorthBot output; review false positives, omissions and duplicate incidents. Treat readiness as database and dashboard listener evidence; separately verify both platform gateways. No new metrics endpoint or alert names are claimed by these manifests. Initially use the actual application dashboard, structured logs and database inspection; add monitoring rules only against verified emitted metrics.
Review /admin/notifications first. The administrator web inbox defaults on and
works while shadow is true and external notifications are false. It shows new and
urgent findings with case links, read acknowledgement and verified-actor audit.
Case review remains available when inbox presentation is off. Members cannot see
findings, evidence or destination settings.
After Dan accepts shadow evidence, explicitly enable the chosen private
administrator destination in the dashboard. Slack and Discord have independent
switches, both off by default. Select eligible private Slack and Discord channels
independently from the dashboard dropdowns. Prepare choices while switches are
off; saved choices survive restarts. Moving a destination does not change bridge
pairs, channel names or positions. Saving and each dispatch verify current
private channel/guild/administrator/bot access against the exact selected route.
Unavailable discovery retains saved choices; invalid privacy holds delivery.
The UI cannot edit secrets and cannot
bypass MODERATION_SHADOW or MODERATION_NOTIFICATIONS_ENABLED. Opening the web
inbox or switching a destination alone does not authorise a live rollout.
A separately approved server activation must set shadow false and notifications true. Test one controlled new urgent finding for each enabled destination. Verify correct case link, truthful bot identity, no pings, no public content leakage, audit trail and independent delivery/recovery after restart. Record rollback results before broadening delivery. A newly enabled route covers new urgent findings only; historical shadow findings remain in web review and are not flooded into private channels. Disabling a destination holds previously queued work for that route. Re-enabling the same route resumes pending work; changing the target holds the old route and creates a new route for future findings, even when returning to an earlier channel. Old queued work stays held and message IDs are never reused across routes.
Original pre-routing moderation_alerts records did not store a destination.
Their timestamps, notice keys and retry metadata are retained for audit. The
inbox reports these held records for manual review in the original private
channel; it never guesses a target or replays them. Current cases remain visible.
Rollback server notifications to false first, then disable chosen external UI switches. Inbox presentation can be disabled separately. Retain evidence and queued work. These runbook changes preserve shadow mode and disabled external notifications, one replica/Recreate, authentication membership and NorthBot.
Reviewed NorthBot transition (not applied) #
NorthBot remains PROACTIVE_ENABLED=true. After the accepted shadow window,
review whether all NorthBot proactive scanning is covered by IronBridge.
If any unbridged channel still needs NorthBot, do not use the global switch;
prepare a separately reviewed source/configuration exclusion for only covered
channels. If every proactive channel is covered and Dan approves the switch,
the following patch is the complete proposed deployment change:
apiVersion: apps/v1
kind: Deployment
metadata:
name: northbot
namespace: dev
spec:
template:
spec:
containers:
- name: northbot
env:
- name: PROACTIVE_ENABLED
value: "false"
Apply it through a separate reviewed GitOps change only after shadow acceptance
and approved IronBridge alert delivery. Confirm NorthBot commands and reactive
behaviour still work, only one owner scans each intended channel, and there are
no coverage gaps. If alerts fail or coverage differs, restore the previous
true setting through the reviewed rollback and disable IronBridge
notifications until corrected. Do not change either setting during preparation.