Skip to content

Prod changeset sync — Stage 1: infra prep (bucket + dedicated IRSA role) - #1061

Merged
arielr-lt merged 1 commit into
masterfrom
feat/prod-changeset-infra-prep
Aug 11, 2026
Merged

Prod changeset sync — Stage 1: infra prep (bucket + dedicated IRSA role)#1061
arielr-lt merged 1 commit into
masterfrom
feat/prod-changeset-infra-prep

Conversation

@arielr-lt

@arielr-lt arielr-lt commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Stage 1 (infrastructure prep) for enabling registry changeset sync in production. Additive only; does not touch the running prod app.

Status: APPLIED (2026-08-11)

Applied to prod via a targeted apply of only these resources — verified 8 added, 0 changed, 0 destroyed. Live-verified: bucket is private (public-access-block) + versioned + AES256; role trusts only credreg-prod:main-app-service-account. The pre-existing Phase-2 drift below was deliberately left untouched. This PR merges to bring master in sync with what's applied.

What this adds

  • S3 bucket cer-registry-changesets-prod (versioning + AES256 + public-access-block).
  • Dedicated prod IRSA role ce-registry-eks-prod-application-irsa-role, trusting only credreg-prod:main-app-service-account — isolates prod from the shared staging/prod role.
  • Scoped policy = the buckets prod actually uses (verified against S3 code paths + DB config):
    cer-envelope-downloads, cer-envelope-graphs-prod-us-east-1, ocn-exports (prod ce_registry OCN export is enabled), cer-registry-changesets-prod.

Deferred to Stage 2 (app cutover) — intentionally not here

  • Repoint prod SA → new role (needs a pod roll; done in lockstep with the new image).
  • Configmap REGISTRY_CHANGESET_SYNC_* vars (endpoint initially unset), image bump to 2026.07.30.0154, DB migration, and sync-marker reset to avoid the historical backlog.

Note on the CI plan

A full plan here also shows the pre-existing Phase-2 drift (db-dumps policy, ng_sandbox_large min_size, rds-sandbox SG) — those are not from this PR and were not applied. They will be reconciled separately.

Stage 1 (infrastructure prep) for enabling registry changeset sync in
production. Additive only — does not touch the running prod app.

- Provision the cer-registry-changesets-prod S3 bucket (reuses the generic
  bucket module: versioning, AES256, public-access-block).
- Add a dedicated least-privilege prod IRSA role
  (ce-registry-eks-prod-application-irsa-role) so prod is isolated from the
  shared staging/prod role. Scoped to the buckets the prod app actually uses,
  verified against its S3 code paths and DB config:
  cer-envelope-downloads, cer-envelope-graphs-prod-us-east-1, ocn-exports
  (ce_registry OCN export is enabled in prod), and cer-registry-changesets-prod.

Deferred to the app cutover (Stage 2): repoint the prod service account to the
new role + remove credreg-prod from the shared role trust, configmap env vars,
image bump, migration, and backlog handling.
@arielr-lt
arielr-lt merged commit 96c6807 into master Aug 11, 2026
12 checks passed
@arielr-lt
arielr-lt deleted the feat/prod-changeset-infra-prep branch August 11, 2026 16:29
arielr-lt added a commit that referenced this pull request Aug 11, 2026
… runbook) (#1062)

**Stage 2 (app cutover) for registry changeset sync in production.**
Depends on Stage 1 (#1061, infra — already applied). **Draft — do not
merge/apply until the deploy window.**

## Changes (`k8s-manifests-prod/`)
- **app-configmap**: add `REGISTRY_CHANGESET_SYNC_*` + `AWS_REGION`.
**`REGISTRY_CHANGESET_SYNC_ENDPOINT` intentionally omitted** —
changesets generate + store in S3 but aren't delivered, so the Publisher
blob can be backfilled first; endpoint is set afterward.
- **app-service-account**: repoint to the dedicated least-privilege
`ce-registry-eks-prod-application-irsa-role` (verified: db-dump jobs use
a separate SA, so nothing loses bucket access).
- **app/worker/db-migrate**: pin immutable image `2026.07.30.0154` (was
floating `:master`/`:production`). Tag verified in ECR.
- **RUNBOOK**: full ordered cutover (marker reset → apply SA+configmap →
Deploy workflow + migration → verify → set endpoint after backfill) +
rollback notes.

## Key deploy facts
- Marker reset needed for **`ce_registry` only** (stale row ~89K
versions behind); other communities self-initialize on first publish.
Reset runs first (image-independent) to pre-empt the ~180 MB backlog ZIP
under the publish-lock.
- The **Deploy image** workflow runs the migration **after** the
rollout, so new pods (which don't use the Argo columns) are up before
`RemoveArgoFields` drops them.
- Configmap + SA are **not** applied by the Deploy workflow — applied
separately per the runbook.

## Not in this PR
- Setting `REGISTRY_CHANGESET_SYNC_ENDPOINT` (post-backfill, via
configmap workflow).
- Publisher-side blob backfill (Cary) + accumulated-changeset apply.

---------

Co-authored-by: Ariel Rolfo <arielr-lt+username@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants