Component ยท Shared or other
Per-org AMP gateway upgrade call (manual)
What it is
Where Agent Manager's provisioner sets up an org-environment, it installs that environment's AI gateway. A gateway keeps running the image and chart definition frozen into its release. When a new provisioner image changes the amp-gateway ResourceType or its GATEWAY_IMAGE_TAG, existing gateways only change when someone calls the provisioner's upgrade endpoint, one org at a time.
Like replacing the engine in one aircraft at a time, with a test flight before touching the next.
Why it exists
A gateway carries live traffic for an org. Upgrading org by org, and checking pods between them, limits how much can break at once.
How it works
- Roll out the new provisioner image first.
- From the control plane cluster, reach the internal gateway that fronts the provisioner (the README uses a port-forward).
- Call POST /api/v1/cp/agent-manager/upgrade for one org. Send a system-client token and the header X-Impersonate-Org with the org id. The body may name one environment or leave it out for all.
- The call answers only when every gateway is done, which can take up to the 20-minute run timeout. Each gateway is reported as upgraded, current, skipped or failed. The call is safe to repeat.
- Before the next org, check that the gateway-controller and gateway-runtime pods run the target image, are Ready and are not restarting, that the binding amp-gateway-default-<env> is Synced, and that an agent call through the gateway works with a ThunderID token.
Identity and access
The call needs a token from the system client the internal gateway admits for the provisioner. The org comes from the gateway's assertion built from X-Impersonate-Org.
Key facts
- Endpoint
- POST /api/v1/cp/agent-manager/upgrade
- Scope
- One org per call, optionally one environment
- Required header
- X-Impersonate-Org
- Answers
- 200 when none failed, 502 when any failed, 404 for an environment with no gateway
- Trigger
- A provisioner image that changes the ResourceType or GATEWAY_IMAGE_TAG
- Run timeout
- 20 minutes
- Namespace
- cloud-cp to cloud-dp-oc-dp
Talks to (1)
- calls agent-manager-provisioner moves one org's gateways onto the new ResourceType and imageHTTP POST via internal gateway