Repository navigation
feat(deploy): hive-mx mail receiver on hive-oke (namespace mail) - #25
Conversation
hive-mx (hivecommons/hive#18395) accepts mail only for hive@<hive host> and posts calendar invites, mail-in files and proof codes to the hub. It runs as 2 replicas in a new namespace mail (Pod Security restricted, non-root 65532, read-only root, no capabilities), behind an OCI Network Load Balancer on port 25 with externalTrafficPolicy Local so SPF sees the sender's IP. NetworkPolicy: SMTP in from anywhere, egress only to CoreDNS and the hub Service. install.sh generates the hub bearer token once, never prints it, and with --hub-secret copies it into hive-hub/hive-hub-secrets (mail-token); the README lists the hub env change and the DNS records the operator adds. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Failing checks:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. Review findings from Routing to a human: deploy/infra manifests that expose port 25 publicly and write a credential into another namespace's Secret. I read all six files at head c8eecd7. Verified
Open question (not verified, could not read the hub manifests)
Trust surfaces for a human: public SMTP ingress via OCI NLB with Review findings from Routing to a human: this adds deploy/infra manifests that expose TCP 25 to the internet and credential plumbing, so I am not judging it on my own. Verified from the diff:
One low finding: the The README discloses that STARTTLS is off for now (plain SMTP). I have not approved or changed anything. |
c8eecd7
ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @clubanderson, head
Hive did not add the |
Review follow-ups (below
|
There was a problem hiding this comment.
Correctness review at c8eecd7 (manifests only; no tests apply). Advisory, not blocking:
- Hub egress rule matches the Service port, not the pod port (
deploy/hive-oke/mail/policy.yaml:42-46). NetworkPolicy is evaluated after Service DNAT, soport: 80only works if the hub pod listens on 80.HIVE_MX_HUB_URL(hive-mx.yaml:61) targets the Service on 80, but I could not read the hub Service'stargetPortfrom this repo or hivecommons/hive. If it is e.g. 8080, every hub call from hive-mx is dropped. The pods would stay unready and the PR body does not claim an end-to-end check, only SMTP via port-forward. Please confirmkubectl -n hive-hub get svc hive-hub -o jsonpath='{.spec.ports}'and the pod labelapp: hive-hub. If the pod port differs, add it:
ports:
- port: 80
protocol: TCP
- port: 8080 # replace with the hub container's actual port
protocol: TCP
- Comment says health (8080) is open from inside the cluster, but the ingress rule only allows 2525 (
policy.yaml:3-5vs:28-31). Kubelet probes are exempt, so probes work. Any other in-cluster caller is blocked. Fix the comment or add a rule. install.sh:36patch secret hive-hub-secretsfails underset -eif that Secret is missing. This runs after the token Secret is created, so a rerun recovers.
— hive: agent=adjudicator backend=claude model=claude-sonnet-5-5 claude=2.1.325
|
scanner: CI triage — PR-local (main lint is green). 🐝 Hive Agent: — hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325 |
|
hive/scanner: 🐝 Hive Agent: — hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325 |
|
scanner: 🐝 Hive Agent: — hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325 |
|
hive/scanner triage: the baseline check says this is PR-local ( 🐝 Hive Agent: — hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325 |
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Deploys hive-mx, hive's receive-only mail receiver (hivecommons/hive#18395), on hive-oke in a new namespace
mail. Nothing outsidemailis changed by these manifests;install.sh --hub-secretadditionally writes one key (mail-token) intohive-hub/hive-hub-secrets.deploy/hive-oke/mail/namespace.yaml: namespacemail, Pod Security restricted (enforced).deploy/hive-oke/mail/hive-mx.yaml: Deployment (2 replicas, spread by node, PDB minAvailable 1), imageghcr.io/hivecommons/hive-mx:aa286e8@sha256:bbed51d5f92fe208f566ca19b2dab54e14a5985481dcb6ae0c1893ef9d6c764f(amd64+arm64, distroless static), uid/gid 65532 with fsGroup for the token Secret, read-only root, no capabilities, RuntimeDefault seccomp, probes on/healthzand/readyz. Service type LoadBalancer port 25 (to 2525) as an OCI Network Load Balancer withexternalTrafficPolicy: Local, so SPF and the per-IP limit see the sender's address.deploy/hive-oke/mail/policy.yaml: SMTP in from anywhere; egress only to CoreDNS and the hub Service.deploy/hive-oke/mail/install.sh: idempotent; generates the hub bearer token once and never prints it.deploy/hive-oke/mail/README.md: what hive-mx does, the hub env change (operator, rolls the hub), the DNS records, STARTTLS notes.Applied to hive-oke already: namespace, Secret, NetworkPolicy, Deployment, Service (external IP 129.80.182.206). Pods answer SMTP (checked through a port-forward) and report not ready until the hub serves
/api/mail/hosts, which needsHIVE_HUB_MAIL_TOKENon the hub and a hub build that includes hivecommons/hive#18429.