Upgrading Alauda Build of OpenTelemetry v2
Upgrading from v2.0 (Operator 0.147.0, Collector 0.147.0) to v2.1 (Operator 0.157.0, Collector 0.158.0) involves the following steps:
- Upgrading the Alauda Build of OpenTelemetry v2 Operator
- Updating the OpenTelemetry Collector configuration
Upstream renamed most component types in this release, but the previous names remain available as deprecated aliases. An existing configuration therefore keeps running after the Operator is upgraded, and the Collector only logs a deprecation warning for each affected component. Updating the configuration is the second step, not a prerequisite for the first.
Prerequisites
- An Alauda Build of OpenTelemetry v2.0 deployment installed as described in Installing Alauda Build of OpenTelemetry v2.
- The Alauda Build of OpenTelemetry v2 Operator 0.157.0 is published to the platform.
- An active ACP CLI (
kubectl) session by a cluster administrator with thecluster-adminrole. - Review the Upgrade Notes for the behavior changes introduced by this release.
Setting environment variables
TOC
Upgrading the OperatorUpgrading via the web consoleUpgrading via the CLIUpdating the OpenTelemetry Collector ConfigurationChanges that are not covered by an aliasNext StepsUpgrading the Operator
The Operator is subscribed with the Manual approval strategy, so the upgrade must be approved explicitly. For general background on Operator upgrades, see Operator.
Upgrading via the web console
Choose one of the following methods:
- Batch upgrade: navigate to Platform Management > Cluster Management > Clusters > cluster > Functional Components, and upgrade Alauda Build of OpenTelemetry v2.
- Individual upgrade: navigate to Administrator > Marketplace > OperatorHub, open Alauda Build of OpenTelemetry v2, and approve the pending upgrade request.
Upgrading via the CLI
-
Confirm that the target version is available in the subscribed channel:
-
Approve the pending
InstallPlan: -
Wait until the new
ClusterServiceVersionreaches theSucceededphase:Example output
Verification
The Operator upgrade restarts every managed Collector. A Collector that does not pin spec.image picks up Collector 0.158.0 as soon as the Operator is upgraded:
Example output
VERSION reports the Operator version that manages the instance, and IMAGE reports the Collector image it now runs.
Updating the OpenTelemetry Collector Configuration
A Collector that only uses components whose type names are unchanged — such as the configuration created by the installation procedure — needs no configuration change.
The Operator reissues its admission webhook certificate during the upgrade. A patch applied in that window is rejected with failed calling webhook "mopentelemetrycollectorbeta.kb.io": ... x509: certificate signed by unknown authority. Wait a few seconds and apply it again.
Procedure
The commands and the patch below are an example, built from one specific Collector configuration. Read every entry against your own OpenTelemetryCollector resource and adjust it before applying: a patch copied verbatim can delete components that your pipelines still use, or recreate a component without the settings it had.
-
List the deprecation warnings to find out which components in your configuration are affected:
Example output
The full log line also names the affected component instance, for example
"otelcol.component.id": "otlp/traces". -
Create a file named
otel-upgrade-patch.yaml. The following example migrates a Collector that uses aresourcedetectionprocessor, aspanmetricsconnector, anotlpexporter namedotlp/traces, and aprometheusexporter. Keep only the entries that match your own configuration:- A renamed component is migrated by setting the old key to
nulland recreating it under the new name. Copy the existing settings across unchanged: a merge patch does not carry them over, does not remove the old key implicitly, and leaving both keys in place starts two instances of the same component. For the full list of renamed components, see Component type names now use snake_case. add_metric_suffixesis deprecated. Theprometheusexporter ignores it altogether, sotranslation_strategy: UnderscoreEscapingWithoutSuffixesis what now keeps the exported metric names free of Prometheus-style suffixes such as_total. Theprometheus_remote_writeexporter still honorsadd_metric_suffixes, but logs a deprecation warning.- Every pipeline that references a renamed component must be updated as well, otherwise the Collector fails to start with
references exporter "otlp/traces" which is not configured. Because pipeline members are lists, each list is replaced as a whole.
- A renamed component is migrated by setting the old key to
-
Render the patch with
envsubstand apply it:
Verification
Wait for the Collector to restart, and confirm that it starts without deprecation warnings:
Example output
Changes that are not covered by an alias
The following changes are not reported as deprecation warnings, because the affected configurations either keep starting with different behavior or fail to start outright. Review them against your own configuration:
For the complete list, see the Upgrade Notes.
Next Steps
The Operator does not upgrade the auto-instrumentation agents injected into application pods. To upgrade them, follow Upgrading the Auto-instrumentation Agents.