Repository navigation
feat(app): publish the image and a Helm chart; install on Kubernetes with helm - #624
Merged
Merged
Conversation
…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>
Member
Author
|
/kind feature |
Signed-off-by: Jeffrey Sica <me@jeefy.dev>
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PRs B+C of the Kubernetes install plan (after #623). Makes the App
helm install-able fromghcr.io/cncf.release.yml/pre-release.yml— two new jobsimage(needsverify)ghcr.io/cncf/prow-github-actions:{X.Y.Z, X.Y, X, latest}(pre-release: own version only)attest-build-provenanceon the index digestchart(needsimage)helm package --version X.Y.Z --app-version X.Y.Z→oci://ghcr.io/cncf/prow-github-actions/charts/prow-github-appgithub-releasenow 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-appDeployment (probes
/healthz+/readyz,Recreatewhen 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 whenreplicaCount > 1,NOTES.txt. Credentials via inline Secret orgithub.existingSecret;prow.*= the action's inputs;redis.url/redis.existingSecretfor shared state.values.schema.jsonrefusesreplicaCount > 1without 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 buildhas been broken since #615:npm run buildgrewtsc -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 newchartCI job builds the image on every run so it can't regress.Tests / verification
chartjob intest.yml:ct lint,helm unittest(15 specs), then kind: build image from the commit → load → install single (/readyz200) → install HA with a plainredis: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 getslatest/vN).docsYamlExamples.test.ts: newhelmkind — the values examples indocs/github-app.mdare validated againstvalues.schema.jsonwith ajv (negative-tested: a badredis.urlin docs fails the suite).npm run all225 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.GITHUB_TOKENmust be allowed, or the firstimagejob 403s.prow-github-actionsandprow-github-actions/charts/prow-github-app) —GITHUB_TOKENcannot change visibility. Documented indocs/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.