Argo CD not detecting or applying changes in structured spec.config.processors field for OpenTelemetry Collector CR #26891
Replies: 4 comments 3 replies
-
|
Great question — this is a known pain point with CRDs that have loosely-typed or deeply nested fields like Root CauseThe most likely cause is that the OpenTelemetry Operator’s admission webhook is normalizing The clue is your observation:
This means Argo CD’s diff engine is comparing the rendered manifest against a normalized/mutated live state and finding them equal, even though the actual cluster object is stale. How to ConfirmRun: argocd app diff <app-name> --local <path-to-manifests>Also check if the OTel Operator has a mutating webhook: kubectl get mutatingwebhookconfigurations | grep opentelemetryRecommended FixUse # argocd-cm ConfigMap
resource.customizations: |
opentelemetry.io/OpenTelemetryCollector:
ignoreDifferences: |
jsonPointers:
- /spec/config/processorsOr, if you want Argo CD to correctly detect real changes, configure resource.compareoptions: |
ignoreManagedFieldsManagers:
- opentelemetry-operatorThis tells Argo CD to ignore fields last-written by the operator’s webhook, so only your Git-sourced changes are considered. Answers to Your Questions
Hope this helps unblock you! |
Beta Was this translation helpful? Give feedback.
-
|
Check It is important to see which fields are owned by Operator and which one by argocd, in case where server-side apply is enabled. check that by below commands or |
Beta Was this translation helpful? Give feedback.
-
|
Thank you @cp319391 for the responding to the discussion, I have verified if managedFields is owned by operator but we got |
Beta Was this translation helpful? Give feedback.
-
|
Hi, I took a quick look at the CRD in the chart, and I believe you're running into this issue. CRDs sometimes come in two flavors: a lightweight version that accepts anything but doesn't play well with Argo CD's server-side diff feature, and a full version where all fields are properly defined. In the OpenTelemetry case, it looks like they're using a mix of both. As you can see, the Unless you can get hold of a full CRD definition, I'm afraid the only workaround is to disable the server-side diff feature. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m observing that Argo CD is not detecting or applying changes made to nested fields inside the spec.config section of an OpenTelemetry Collector custom resource, even though the configuration is defined as structured YAML (not a multiline string).
kubectl get opentelemetrycollector servicemonitor -o yamlWhat I expected
Argo CD should detect a difference in the nested field (spec.config.processors.memory_limiter.limit_percentage) and mark the application as OutOfSync, triggering a sync to apply the updated configuration.What actually happens
Argo CD does not detect any difference and does not attempt to apply the updated configuration, even though the rendered manifests clearly contain the new value.Additional details
No ignoreDifferences or resource.customizations are configured.Workarounds observed
Beta Was this translation helpful? Give feedback.
All reactions