Upgrade CetiRun
make deploy upgrades an installation in place. It upgrades the three Helm
releases to the version in the environment file. It keeps the Agents, their
HOME volumes, the AI Gateway database, and the OAuth cookie and database keys.
Existing Agents keep the version of their agent chart until you upgrade each
Agent. Each running Agent still restarts one time, because its Pod gets the
Memory Context image of the new version. The GitHub Copilot proxy of an Agent,
if it has one, also restarts with the new AI Gateway image.
Warning: A return to an earlier version does not undo every change of an upgrade. Before you upgrade, read Return to an earlier version.
Before you upgrade
Read the changes between the installed version and the new version.
Examine the API compatibility of the CRDs.
Make a backup of the data and the Secrets that Make and restore backups lists.
Make sure that no release has an unfinished operation:
helm list --all-namespaces --pendingThe list must be empty. Refer to An unfinished release operation.
If the installation uses raw
imagePullSecretsoverrides for Agents, remove them first. Refer to Upgrading runtime registry configuration.Run the upgrade as an admission administrator: a user in
platform.values.cetirun-operator.sandboxAdmission.adminUsers, or a member of a group inadminGroups. To see your user name and groups, runkubectl auth whoami. An upgrade changes the CetiAdmin configuration. While the installation has CetiAdmin, only admission administrators can change this configuration. Another identity, for example the service principal of a pipeline, cannot completemake deploy. Its run upgrades the Istio release and the Agent Identity Broker, then fails at the platform release.Plan a maintenance window. An upgrade replaces the Pods of the platform, and it restarts each running Agent.
Use the same release version for all components: the Operator, the Sandbox
admission server, the Portal, the AI Gateway, the Broker, and Connections MCP.
make deploy installs all of them from one version.
Upgrade the platform
Choose a published release, as Use official MCR artifacts shows. For a custom build, follow the optional publication procedure.
Clone its tag, as Choose a release shows, or use the source commit of your custom build.
make deployinstalls the charts of the clone.In the environment file, set
release.versionandrelease.gitSHAto the new version and commit. A move from another registry to MCR also needs an Agent registry migration.Read the digests of the new Custom images, and add them to
platform.values.cetirun-operator.customRuntime.approvedImages. Keep the digests that existing Custom Agents use until each of these Agents moves to a new digest. The Operator approves only an exact digest of the list, and it stops updating a Custom Agent whose digest is not in the list.make deployaccepts an old digest that is still in the registry.Remove the fields that the new version does not support, and add the inputs that it requires. For some fields, the plan stops and names the field. Examples are the removed
customRuntimefields and theobservabilityblock of the ADX-Mon collection, whichmake deployrequires.Run the plan, then the deployment:
make deploy-plan DEPLOY_CONFIG=/absolute/path/environment.yaml make deploy DEPLOY_CONFIG=/absolute/path/environment.yamlVerify the installation, as Verify the deployment shows.
The CRDs are ordinary templates of the Operator chart, so Helm upgrades them
with the platform release. The default compatible admission mode accepts the
newer fields of a CRD. A strict admission mode needs an ordered upgrade.
Refer to the
schema and binary upgrade contract.
make deploy does not change the query functions and views in Azure Data
Explorer. When a new version changes the scripts in
infra/cluster/modules/adx/, run them in their databases, as
Prerequisites shows. A new deployment of the
cluster template also runs them.
Upgrade the Agents
An Operator upgrade does not change the agent chart version of an existing Agent. A new Agent gets the agent chart of the installed release. To upgrade an existing Agent, use the Upgrade to Latest action of the Portal, as Pin and update a chart shows. Upgrade each Agent after the platform upgrade.
For a Sandbox Agent, the Operator checks the chart and Agent inputs together. If those inputs change during bootstrap, it prepares them again in a new reconciliation pass. A concurrent upgrade does not make the new image invalid because an earlier pass loaded the old chart.
Native admission permits the trusted Operator to update only the default image of a pending built-in upgrade. This does not give it administrator authority or permission to change the Agent’s Team or policy binding.
Settings that make deploy keeps
Each run of make deploy replaces the stored Helm values of each release with
the values of the environment file. A value that you set with another Helm
command is lost at the next run. Two cases are different. With
istio.tlsMode: retain, the Istio release keeps its earlier values. With
istio.mode: external, make deploy does not install or upgrade the Istio
release.
make deploy also protects some settings of an installation. If the
environment file changes one of these settings, the run stops before it writes.
For most of them, the message starts with Preserve existing:
- The admission administrators:
adminUsers,adminGroups, andcontrollerUsername - The Team assignments of the admission configuration
- Pod admission and a
strictadmission validation mode - The coordination, placement, and platform source settings of Sandbox execution, and native execution
- The Broker namespace and service account that the Operator uses
- The native Connections MCP settings and its peer identity
- The configuration coordination settings of the Portal
- The bundled PostgreSQL and Valkey of the AI Gateway
publicTLSafter it was on. Refer to Public DNS and TLS
A change of these settings needs a separate approved procedure. make deploy
does not migrate stored Helm values.
A change of the StorageClass or the size of the AI Gateway database also fails. Kubernetes does not let a StatefulSet change its claim template. The preflight does not find this change. The run stops at the upgrade of the platform release, after it upgraded the Istio release and the Broker.
Upgrade order of some changes
Some changes need a specific order:
Portal ownership mTLS of a standalone installation: first enable the strict internal policy of the Portal. Then deploy the Istio TLS cluster, and then update the Portal. Refer to Authentication and ownership.
CetiAdmin in the old
scopeformat: upgrade in two steps. Refer to Upgrade an existing scope-format installation.Peer registrations of policy-bound Teams: a new release version also replaces the Pods of the AI Gateway. With the rollout-stable DNS and AI Gateway selectors in Peer labels, the replacement Pods keep their network authorization without manual labels. Registrations by IP address or peer UID still need the current backend addresses and labels until you migrate them. Upgrade all readers and follow the coordinated configuration change before you use the new registration.
A selector-bound AI Gateway entry must also select the protected label
sandbox.cetirun.microsoft.com/peer: ai-gateway. Add the label to the entry after the upgrade, when the AI Gateway Pods have it. Until then, the Agents that use the entry stay held.AI Gateway PodMonitor of managed Prometheus: a platform that an earlier version installed can still hold this PodMonitor. Then
make deploystops before it changes the cluster. Create a stand-in definition of its API, runmake deploy, and then delete the definition, as Identity, images, and collection shows.OAuth2 Proxy PodDisruptionBudget with an external Istio release: upgrade the external release first, or set
istio.values.oauth2Proxy.podDisruptionBudget.enabled: falsein the environment file. Otherwise the missing budget stops preflight before any write. Refer to Authentication availability during node maintenance.ADX-Mon alert rules with a short interval: the alerter of ADX-Mon v0.4.1 skips an
AlertRulewhose interval is shorter than 30 seconds. It logsSkipping invalid AlertRuleonce a minute and leaves the status of the rule as it was. Before you upgrade, give each such rule anintervalof at least30s. After the upgrade, the API server refuses a shorter interval. Refer to Alerts.
If an upgrade fails
make deploy has no automatic rollback. When a step fails, the run stops and
names the step. The releases that it upgraded before the failure keep the new
version. Find the cause, as
When make deploy fails shows.
Then correct the cause and run make deploy again with the new version.
Return to an earlier version
CetiRun has no rollback command. A rollback to an older version needs a reviewed plan. Before you make the plan, review these limits:
- CRDs: Helm does not protect the CRDs against an incompatible schema change or a downgrade. A Helm rollback cannot safely restore an older schema and binary.
- AI Gateway database: the AI Gateway runs its database migrations before it starts. A rollback does not undo them. The older version starts with the newer schema, and it logs SQL commands that drop the new columns. Do not run these commands. Refer to the rollback section of the AI Gateway chart README.
- Application data: a rollback does not reverse the data that the components wrote, for example Agent HOME files, connection records, and spend records.
- Protected settings:
make deploywith an older version still refuses the changes in Settings that make deploy keeps. - Certificates: a Helm rollback does not restore certificate contents or external callbacks.
If you must return to an older version, restore the backup that you made before the upgrade. Refer to Make and restore backups.