deploy/kcl/ declares something nobody has deployed yet. Forge answers each with one read-only command, and a third for workloads that something other than forge deploys.
Forge can answer these without logging in to a cluster because every release records the digests it pins and every deploy records the shape it applied (What gets deployed).
Before you begin
- A deployed environment. Deploy a Go API with managed Postgres creates one on Reliant hosting.
- Forge v1.6.1 or later (
reliant forge --versioninside the project).
1
Check the environment runs its release
env status compares the images the platform serves with the digests of the release the environment is promoted to:terminal
DRIFTED means a different image is running than the release pins, and MISSING means a pinned image isn’t running at all. UNREACHABLE with UserSuspended is an environment someone stopped.2
Find what your checkout declares but nobody deployed
env diff renders this checkout and compares it, object by object, with the bundle the last deploy recorded. Here someone added a worker workload to deploy/kcl/prod/main.k and never deployed it:terminal
prod: ok is the render’s status; error, impure or stale means the comparison didn’t happen, and is never reported as “no changes”. Use --all to diff every environment.A deploy records each workload’s release version in its telemetry attributes, and a render of your checkout doesn’t carry one. So right after a release deploy, every workload reads
config changed. Read the added, removed and image lines, and confirm what runs with env status.3
Fail a CI job on undeployed changes
env diff exits 0 whatever it finds, so read its JSON:terminal
jq -e over the same document, failing when status isn’t ok or diff.added or diff.removed is non-empty.4
Verify workloads forge doesn't run
For a workload on your own cluster or under your own deploy tool, It exits
env verify checks the running image and config per workload:terminal
0 when every workload matches, 1 on drift, and 2 when something couldn’t be checked. Hosted workloads are read by env status, so on a hosted environment env verify reports them UNVERIFIED and names env status:What this does not do
- It doesn’t fix drift. All three commands only read. To converge, deploy:
reliant forge env deploy prodships the checkout, and naming the version the environment already runs redeploys it. See Releases and promotion. - It doesn’t watch. Nothing runs these checks on a schedule or alerts on drift. Run them by hand or from CI.
- Helm charts aren’t compared by default. Templating them needs
helmand the network; pass--chartsto include them.
Next steps
Keep Helm, Fly.io or Cloud Run
Verify workloads your own tooling deploys.
Recover from a bad deploy
Put an environment back on an earlier release.
Environments
How each environment binds its workloads.
env diff reference
Every flag of
env diff, env verify and env status.