Managing the Operator
Upgrading and configuring the Operator
Abstract
Chapter 1. Manage the Operator
The Red Hat build of OpenTelemetry Operator uses the Operator Lifecycle Manager (OLM), which controls installation, upgrade, and role-based access control (RBAC) of Operators in a cluster.
1.1. Version upgrades
For version upgrades, Operator Lifecycle Manager (OLM) queries for upgrades for installed Operators. When OLM upgrades the Red Hat build of OpenTelemetry Operator, the Operator scans for running Collector instances and upgrades those instances to match the Operator’s updated version.
The Red Hat build of OpenTelemetry Operator automatically upgrades all OpenTelemetryCollector custom resources during its startup. The Operator reconciles all managed instances during its startup. If an error occurs, the Operator retries the upgrade at an exponential back-off rate. If an upgrade fails, the Operator retries the upgrade when it restarts.
OLM runs in the OpenShift Container Platform by default.
1.2. Cluster TLS profile
The Red Hat build of OpenTelemetry Operator inherits the TLS configuration defined in the OpenShift Container Platform APIServer custom resource (CR). The Operator and its operands inherit TLS settings like minimum TLS version and TLS cipher suites from the APIServer CR for all TLS communications.
You can configure the TLS cluster profile by using the following environment variables:
TLS_CLUSTER_PROFILE-
Enables inheriting the TLS configuration from the
APIServerCR. Enabled by default. TLS_CONFIGURE_OPERANDS- Enables the TLS configuration in the operands, such as receivers. Enabled by default.
If the TLS_CLUSTER_PROFILE environment variable is disabled, you can manually configure the minimum TLS protocol version and ciphers:
TLS_MIN_VERSION-
Minimum TLS protocol version. Defaults to the
VersionTLS12value. TLS_CIPHER_SUITES- TLS cipher suites. Defaults to the default Go cipher suites for the given TLS protocol version.
1.3. Configuring the Operator
You can make several configuration choices for the Red Hat build of OpenTelemetry Operator by editing the Subscription object.
Prerequisites
- You are using OpenShift Container Platform 4.18 or later.
-
You have an active OpenShift CLI (
oc) session as a cluster administrator with thecluster-adminrole.
As an alternative to the web console, you can edit the Subscription object directly by using the following command:
$ oc edit subscription opentelemetry-operator -n openshift-opentelemetry-operator
Procedure
- In the web console, navigate to Operators → Installed Operators.
- Select Red Hat build of OpenTelemetry and then select the Subscription tab.
- From the Actions menu, select Edit Subscription.
Edit the
Subscriptionobject as needed.apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: opentelemetry-operator spec: channel: stable name: opentelemetry-operator source: operatorhubio-catalog sourceNamespace: olm config: env: - name: OPENSHIFT_CREATE_DASHBOARD value: "true" - name: ENABLE_CR_METRICS value: "true" - name: CREATE_SM_OPERATOR_METRICS value: "true" - name: FEATURE_GATES value: operator.networkpolicy,operand.networkpolicywhere:
OPENSHIFT_CREATE_DASHBOARD-
Creates OpenShift monitoring dashboards for visualizing the metrics and health of the Collector instance. The default value is
"true". ENABLE_CR_METRICS-
Exposes custom resource metrics for the Collector, instrumentation, and other custom resource definitions that the Operator manages. The default value is
"true". CREATE_SM_OPERATOR_METRICS-
Creates a
ServiceMonitorresource to scrape the Operator’s internal metrics by using the Prometheus Operator. The default value is"true". FEATURE_GATES-
Enables experimental features such as allowing the Operator to create
NetworkPolicyobjects for itself and managed Collector instances. The default value is"operator.networkpolicy,operand.networkpolicy".