Skip to content

feat(app): publish the image and a Helm chart; install on Kubernetes with helm - #624

Merged
jeefy merged 2 commits into
cncf:mainfrom
jeefy:feat/publish-image-chart
Oct 29, 2026
Merged

jeefy merged 2 commits into
cncf:mainfrom
jeefy:feat/publish-image-chart

Conversation

@jeefy

@jeefy jeefy commented Oct 29, 2026

Copy link
Copy Markdown
Member

What

PRs B+C of the Kubernetes install plan (after #623). Makes the App helm install-able from ghcr.io/cncf.

release.yml / pre-release.yml — two new jobs

job does signs/attests
image (needs verify) buildx linux/amd64 + arm64 → ghcr.io/cncf/prow-github-actions:{X.Y.Z, X.Y, X, latest} (pre-release: own version only) cosign keyless + attest-build-provenance on the index digest
chart (needs image) helm package --version X.Y.Z --app-version X.Y.Z → oci://ghcr.io/cncf/prow-github-actions/charts/prow-github-app same, on the chart's OCI digest

github-release now needs all three; its notes gain an Install block (docker pull …@digest, helm install …, cosign verify, gh attestation verify). All actions SHA-pinned (setup-qemu v4.4.0, setup-buildx v4.4.1, login v4.7.0, metadata v6.2.0, build-push v7.4.0, setup-helm v5.0.1).

charts/prow-github-app

Deployment (probes /healthz + /readyz, Recreate when 1 replica, non-root / read-only FS / drop ALL / seccomp), Service, optional Ingress, ServiceAccount (no token automount), CronJob (Forbid, hourly, args: [dist-server/index.js, cron]), PDB when replicaCount > 1, NOTES.txt. Credentials via inline Secret or github.existingSecret; prow.* = the action's inputs; redis.url / redis.existingSecret for shared state. values.schema.json refuses replicaCount > 1 without a Redis source and non-redis(s):// URLs. No bundled Redis — BYO (Bitnami's free tier is commercially controlled); docs give a one-liner dev instance.

Bug found on the way

docker build has been broken since #615: npm run build grew tsc -p tsconfig.worker.json, which the image doesn't copy. Nothing built the image in CI. Fixed (Dockerfile type-checks + bundles only the server) and the new chart CI job builds the image on every run so it can't regress.

Tests / verification

  • chart job in test.yml: ct lint, helm unittest (15 specs), then kind: build image from the commit → load → install single (/readyz 200) → install HA with a plain redis:7 (2 ready replicas, PDB present, "redis: connected" logged, signed ping → 200 through the Service). All of this reproduced locally on kind v0.31 before pushing.
  • releaseWorkflows.test.ts +13: job graph, permissions, platforms, same digest signed and attested, SHA pins, tag rules (pre-release never gets latest/vN).
  • docsYamlExamples.test.ts: new helm kind — the values examples in docs/github-app.md are validated against values.schema.json with ajv (negative-tested: a bad redis.url in docs fails the suite).
  • npm run all 225 files / 2689 tests; unit coverage 100 / 99.78 / 100 / 100 (per-path 100 % gates held); e2e 99.69 / 99.29 / 99.27 / 99.79; typecheck, dist/ stable.

⚠️ One-time, maintainer only (before/after the first release that runs this)

  • Org Settings → Packages: package creation by GITHUB_TOKEN must be allowed, or the first image job 403s.
  • After the first push, set both packages public (prow-github-actions and prow-github-actions/charts/prow-github-app) — GITHUB_TOKEN cannot change visibility. Documented in docs/releasing.md.

Suggested release after merge: v3.4.0 (the chart's first version; docs already reference it).

Dev deps: ajv@^8. Lockfile resolves to registry.npmjs.org.

…ll on Kubernetes with helm

release.yml and pre-release.yml gain two jobs after verify: `image` builds
the Dockerfile for linux/amd64 and linux/arm64 and pushes it to
ghcr.io/cncf/prow-github-actions (X.Y.Z, plus X.Y, X and latest for a stable
release), signs the index digest with cosign and attests it; `chart`
packages charts/prow-github-app at the release version, pushes it to
oci://ghcr.io/cncf/prow-github-actions/charts and signs and attests that
digest too. The release notes gain an Install block with the pull, helm
install and verify commands. The Dockerfile only type-checks and bundles the
server now: `npm run build` had grown the Worker's tsconfig, which the image
does not copy, so `docker build` had been broken since cncf#615 and nothing ran
it.

The chart renders a Deployment (liveness /healthz, readiness /readyz,
Recreate for one replica, non-root, read-only root fs, drop ALL), a Service,
an optional Ingress, a ServiceAccount, a CronJob running the scheduled jobs
(Forbid, hourly) and, for several replicas, a PodDisruptionBudget. Credentials
are an inline Secret or github.existingSecret; the prow.* values are the
action's inputs; redis.url or redis.existingSecret is the shared store, and
values.schema.json refuses replicaCount > 1 without one. The chart ships no
Redis (the Bitnami free tier is commercially controlled); docs show a
one-line development instance.

CI: a `chart` job in test.yml runs ct lint, helm unittest (15 specs: both
topologies, existingSecret, pdb, cronjob, the schema's refusals), then builds
the image from the commit, loads it into kind and installs both topologies
— one replica answering /readyz, two replicas against a plain redis:7 with
the pdb present, "redis: connected" logged and a signed ping answered 200
through the Service. releaseWorkflows.test.ts pins the new jobs (needs,
permissions, platforms, same digest signed and attested, sha-pinned actions,
tag rules); docsYamlExamples.test.ts validates the Helm values examples in
docs/github-app.md against values.schema.json with ajv.

docs/github-app.md: a Kubernetes section (install, topologies, verify) and
the container section rewritten around the published image; releasing.md
lists the two artifacts and the one-time package-visibility step.

Signed-off-by: Jeffrey Sica <me@jeefy.dev>
@jeefy
jeefy requested a review from jpmcb as a code owner October 29, 2026 22:44
@jeefy

jeefy commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

/kind feature

@github-actions github-actions Bot added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 29, 2026
Signed-off-by: Jeffrey Sica <me@jeefy.dev>
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@jeefy is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this hive's repositories have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Categorizes issue or PR as related to a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant