kargo: cool down upstream releases with a holding stage
β’ 225 words β’ 2 min
Problem statement: wait before opening an upstream Helm chart upgrade PR, without putting a timer in the PR workflow.
In other words: implement dependency cooldowns1 in Kargo.
A Kargo Warehouse makes newly discovered Freight
immediately available to a Stage that accepts it directly:
Warehouse ββimmediateββ> open-upgrade-pr ββ> PRKargo already has
requiredSoakTime,
but only between Stages. It cannot delay a direct Warehouse-to-Stage promotion.
So add a Stage whose promotion deliberately does nothing:
apiVersion: kargo.akuity.io/v1alpha1
kind: Stage
metadata:
name: hold-upstream-release
spec:
requestedFreight:
- origin:
kind: Warehouse
name: external-secrets-upstream
sources:
direct: true
promotionTemplate:
spec:
steps:
- uses: compose-output
config:
state: holdingThe PR Stage accepts Freight from that holding Stage and starts only after the cool-off period:
spec:
requestedFreight:
- origin:
kind: Warehouse
name: external-secrets-upstream
sources:
stages:
- hold-upstream-release
requiredSoakTime: 72h0m0s
promotionTemplate:
# clone, update chart dependency, push, and open PRWarehouse ββ> hold-upstream-release ββ72hββ> open-upgrade-pr ββ> PRThe holding Stage must auto-promote, as must the PR Stage after its soak. A new release replaces the current Freight in the holding Stage. If the old release did not complete 72 hours, it does not advance. This makes the hold a stability window: only a release that remains current for three days opens a PR.
Explicit Freight approval remains the escape hatch because it bypasses the soak.
π€ Drafted with /bloggify.
-
cooldown or cool-off? ↩︎