ci: bump gateway digests in Helm values as well as Kustomize manifests - #60
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 28 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository: getoptimum/coderabbit/.coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
Comment |
Gateways exist in one of two forms and migrate from the first to the second: Kustomize -> clusters/.../optimum/gateway-<flavour>/deployment.yaml Helm -> charts/optimum-gateway/values/internal-<flavour>.yaml The bump step now writes whichever form exists for each flavour, so a gateway moving to Helm needs no change here — its deployment.yaml disappears, its values file appears, and the bump follows it. The canary keeps receiving new images instead of silently falling behind. Every path is guarded with -f. `run:` executes under bash -e, so sed on a missing file aborted the whole step: one migrated gateway would have stopped lighthouse, nimbus and prysm from being bumped too, not just itself. The Helm sed is anchored to the `digest:` line so image.repository is never rewritten. Verified against real files: the Kustomize image and the Helm digest are both replaced and `repository: getoptimum/gateway` is untouched. Also: - Fails the step if nothing matched. A rename or restructure that silently matched no files previously looked identical to a successful run. - Warns per flavour that has neither form present. - Stages by directory rather than naming files, since a `git add` of a path that no longer exists fails the step. - Uses a literal loop list rather than word-splitting a variable. teku remains deliberately excluded: parked at replicas 0 on an older digest. Requires getoptimum/gitops#536 (chart in gitops) for the Helm path to exist; until then the -f guard simply skips it, so this is safe to merge first. Replaces #59, which dropped the canary from bumping altogether.
4065f5a to
f1bf9a5
Compare
Keeps every gateway auto-updating as it migrates from Kustomize to Helm. Replaces #59, which dropped the canary from bumping altogether — that was the wrong fix, since a canary that stops receiving new images is not a canary.
The problem
Gateways exist in one of two forms, and migrate from the first to the second:
The bump step only knew about the first. When the canary moves to Helm, its
deployment.yamldisappears — and becauserun:executes underbash -e,sedon the missing path aborted the entire step. One migrated gateway would have stopped lighthouse, nimbus and prysm from being bumped as well.The fix
Write whichever form exists, per flavour:
A gateway migrating needs no change here — its deployment.yaml goes, its values file arrives, and the bump follows it. Present and future.
Verified against real files
The Helm sed is anchored to
^(\s*)digest:\s*sha256:[0-9a-f]+, soimage.repositorycan never be rewritten by it.Also hardened
git addof a path that no longer exists fails the step.tekuremains deliberately excluded: parked atreplicas: 0on an older digest and must not be dragged forward.Ordering
Safe to merge first. The Helm path does not exist until getoptimum/gitops#536 lands; until then the
-fguard simply skips it.helm upgrade --installfor the canary