ARO-0000: Replace MDSD with OTEL for cluster logging#4881
Conversation
|
Skipping CI for Draft Pull Request. |
c3ff353 to
b1b7e1c
Compare
There was a problem hiding this comment.
Pull request overview
This PR replaces the cluster-side Geneva logging implementation (Fluent Bit + MDSD) with an OpenTelemetry Collector-based approach, removing MDSD-specific configuration/certificate handling and wiring the operator to deploy OTel collector daemonsets that export logs to the gateway.
Changes:
- Add new operator flags for selecting OTel logging profiles (global + master/worker overrides) and default to a “minimal-logs” profile.
- Replace the genevalogging controller’s Fluent Bit + MDSD daemonset with OTel collector daemonsets and an embedded OTel config template.
- Remove MDSD certificate renewal/monitoring and add monitoring for OTel daemonset “cannot start” scenarios; add
GatewayTelemetryDomainto the cluster CR spec.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/operator/flags.go | Adds new Geneva logging OTel profile flags and defaults. |
| pkg/operator/deploy/deploy.go | Stops populating legacy Geneva logging spec fields; sets GatewayTelemetryDomain when gateway is enabled. |
| pkg/operator/deploy/deploy_test.go | Adds unit tests for gatewayTelemetryDomain. |
| pkg/operator/controllers/genevalogging/staticfiles/parsers.conf | Removes legacy Fluent Bit parser config. |
| pkg/operator/controllers/genevalogging/staticfiles/otel-config.yaml.tmpl | Introduces OTel Collector config template for journald/container/audit log ingestion and OTLP export. |
| pkg/operator/controllers/genevalogging/staticfiles/fluent.conf | Removes legacy Fluent Bit config. |
| pkg/operator/controllers/genevalogging/otel_config_template.go | Adds Go templating/rendering for the embedded OTel config. |
| pkg/operator/controllers/genevalogging/mode.go | Adds OTel profile parsing and master/worker profile selection logic. |
| pkg/operator/controllers/genevalogging/genevalogging.go | Reworks resources to create OTel configmaps + OTel daemonsets; adds gateway telemetry targeting logic. |
| pkg/operator/controllers/genevalogging/genevalogging_test.go | Replaces MDSD/Fluent Bit tests with OTel-focused tests and stale resource cleanup coverage. |
| pkg/operator/controllers/genevalogging/genevalogging_controller.go | Updates controller to remove secret dependency, clean up stale resources, and ensure daemonset node selectors aren’t used to “scale down”. |
| pkg/operator/controllers/genevalogging/const.go | Replaces Fluent Bit/MDSD constants + embedded files with OTel equivalents. |
| pkg/operator/apis/aro.openshift.io/v1alpha1/cluster_types.go | Adds GatewayTelemetryDomain; empties GenevaLoggingSpec now that MDSD fields are removed. |
| pkg/monitor/cluster/daemonsetstatuses.go | Emits a new gauge when OTel logging daemonsets have desired > 0 but available == 0. |
| pkg/monitor/cluster/daemonsetstatuses_test.go | Adds test for the new OTel “cannot start” metric emission. |
| pkg/monitor/cluster/cluster.go | Removes MDSD certificate expiry emission from monitor run list. |
| pkg/monitor/cluster/certificateexpirationstatuses.go | Removes MDSD cert expiry logic. |
| pkg/monitor/cluster/certificateexpirationstatuses_test.go | Removes MDSD cert expiry tests. |
| pkg/cluster/install.go | Removes MDSD certificate renewal from install/update step lists. |
| pkg/cluster/arooperator.go | Removes manager wrapper method for MDSD certificate renewal. |
| pkg/cluster/adminupdate_test.go | Updates expected admin update steps to exclude MDSD renewal. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
| func telemetryGatewayTarget(cluster *arov1alpha1.Cluster) (telemetryGatewayTargetSpec, bool, error) { | ||
| if cluster.Spec.GatewayPrivateEndpointIP == "" { | ||
| return telemetryGatewayTargetSpec{}, false, nil | ||
| } | ||
| gatewayPrivateEndpointIP := net.ParseIP(cluster.Spec.GatewayPrivateEndpointIP) | ||
| if gatewayPrivateEndpointIP == nil { | ||
| return telemetryGatewayTargetSpec{}, false, fmt.Errorf("invalid cluster spec field %q: %q is not a valid IP address", "gatewayPrivateEndpointIP", cluster.Spec.GatewayPrivateEndpointIP) | ||
| } | ||
|
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| gatewayTelemetryDomain: | ||
| type: string | ||
| genevaLogging: | ||
| properties: | ||
| configVersion: | ||
| pattern: '[0-9]+.[0-9]+' | ||
| type: string | ||
| monitoringGCSAccount: | ||
| enum: | ||
| - AROClusterLogsINT | ||
| - AROClusterLogsPROD | ||
| - AROClusterLogs | ||
| type: string | ||
| monitoringGCSEnvironment: | ||
| enum: | ||
| - DiagnosticsProd | ||
| - Test | ||
| - CaFairfax | ||
| type: string | ||
| monitoringGCSNamespace: | ||
| enum: | ||
| - AROClusterLogsINT | ||
| - AROClusterLogsPROD | ||
| - AROClusterLogs | ||
| type: string | ||
| type: object | ||
| infraId: |
There was a problem hiding this comment.
@hlipsig, what's the point of keeping around the object without the attributes?
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| .PHONY: publish-image-telemetrycollector-and-print-digest | ||
| publish-image-telemetrycollector-and-print-digest: publish-image-telemetrycollector print-image-digest-telemetrycollector | ||
|
|
kimorris27
left a comment
There was a problem hiding this comment.
Approved with the understanding that some naming, little follow-up nits, etc. will be addressed when we're under less of a time crunch.
Removes the MDSD controller and replaces it with OTEL. Also removes MDSD related tests, and install work on the ARO cluster side. Gateway side unchanged.
What this PR does / why we need it:
OTEL modernizes our observability stack. For this first implementation we are using it for log collection.
Test plan for issue:
Unit Tests, e2e tests follow in a different PR, staging testing and testing against a dev cluster.
Is there any documentation that needs to be updated for this PR?
Yes. A dedicated PR is being created for it.
How do you know this will function as expected in production?
E2E is green plus manual testing mentioned above.