thv upgrade apply
Apply an available upgrade to a workload
Synopsis
Apply the upgrade the registry reports for a registry-sourced workload.
The candidate image is resolved, verified, and pulled BEFORE the existing workload is touched. The existing workload is then stopped and replaced with one running the candidate image; the rest of the workload's configuration (env vars, secrets, posture, middleware) is preserved. There is no automatic rollback: if recreation fails the previous workload is not restored, so recovery is a forward operation.
New environment variables the candidate declares can be supplied with --env and --secret. When run interactively, missing required values are prompted for; with --yes (or in a non-interactive shell) the command runs non-interactively and fails if a required value is missing.
Examples:
Apply the available upgrade, prompting for confirmation
thv upgrade apply my-server
Apply non-interactively, supplying a new env var
thv upgrade apply my-server --yes --env NEW_FLAG=true
Preview what an upgrade would change without applying it
thv upgrade apply my-server --dry-run
thv upgrade apply <workload-name> [flags]
Options
--ca-cert string Path to a custom CA certificate file to use when resolving the candidate image
--dry-run Print what the upgrade would change without applying it
-e, --env stringArray Environment variables to set on the upgraded workload (format: KEY=VALUE, repeatable)
-h, --help help for apply
--image-verification string Set image verification mode (warn, enabled, disabled) (default "warn")
--secret stringArray Secrets to set on the upgraded workload (format: NAME,target=TARGET, repeatable)
-y, --yes Skip the confirmation prompt and run non-interactively (fail if required values are missing)
Options inherited from parent commands
--debug Enable debug mode
SEE ALSO
- thv upgrade - Manage upgrades for MCP server workloads