[clusterobservability] fix config for bundled collectors#5080
Conversation
E2E Test Results 40 files 273 suites 2h 24m 20s ⏱️ Results for commit 92fc794. ♻️ This comment has been updated with latest results. |
ad20221 to
6be7270
Compare
d5ccd0e to
92fc794
Compare
| return "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest" | ||
| } | ||
| return configuredImage | ||
| return strings.Replace(configuredImage, "/opentelemetry-collector:", "/opentelemetry-collector-contrib:", 1) |
There was a problem hiding this comment.
I wonder if we could use the k8s distribution instead?
There was a problem hiding this comment.
Currently the default images are provided by setting via ldflags and reading the version from the version.txt file.
Right now the default is the core collector in version 0.152.1. During one of the SIG calls we discussed to maybe use the k8s distro as default. In that case, I think we dont need to change anything.
If we continue to use core, we may want to add a separate version entry for CollectorCRs generated by the ClusterObservability reconciler.
There was a problem hiding this comment.
Thanks! Switched to the k8s distribution. Instead of string-rewriting the image, the reconciler now reads a dedicated Config.ClusterObservabilityCollectorImage, which defaults to opentelemetry-collector-k8s:<version> using the existing opentelemetry-collector entry in versions.txt, with --clusterobservability-collector-image as an override.
I derived the version rather than adding a separate versions.txt entry for now, given the experimental maturity here. That said, I can see the case for an explicit opentelemetry-collector-k8s entry - it'd be self-documenting and let maintainers pin/patch the k8s distro independently if the release process ever diverges. Do you have a preference?
frzifus
left a comment
There was a problem hiding this comment.
Awesome, I will test it on talos and openshift during the week!
| return "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest" | ||
| } | ||
| return configuredImage | ||
| return strings.Replace(configuredImage, "/opentelemetry-collector:", "/opentelemetry-collector-contrib:", 1) |
There was a problem hiding this comment.
Currently the default images are provided by setting via ldflags and reading the version from the version.txt file.
Right now the default is the core collector in version 0.152.1. During one of the SIG calls we discussed to maybe use the k8s distro as default. In that case, I think we dont need to change anything.
If we continue to use core, we may want to add a separate version entry for CollectorCRs generated by the ClusterObservability reconciler.
2ef0d75 to
731bb4f
Compare
|
|
731bb4f to
58415c9
Compare
…servability Follow-ups to the initial ClusterObservability framework so the generated agent and cluster collectors come up cleanly on stock distributions, plus a smoke e2e that exercises the pipelines end-to-end.
58415c9 to
dfc7dd5
Compare
Description: Follow-ups to the initial ClusterObservability framework so the bundled agent and cluster collectors generated from a
ClusterObservabilityCR come up cleanly on stock Kubernetes and OpenShift.Collector image
opentelemetry-collector-k8s) at the same version as the operator's default collector, exposed as a newConfig.ClusterObservabilityCollectorImageand overridable via the--clusterobservability-collector-imageflag. This keeps the version tied to the existingopentelemetry-collectorentry inversions.txt.Agent collector (DaemonSet)
K8S_NODE_NAMEvia the downward API so the bundled kubeletstats receiver'shttps://${env:K8S_NODE_NAME}:10250endpoint resolves./hostfs(read-only,HostToContainer) instead of granular per-directory hostPath mounts, and set the hostmetric receiver'sroot_pathto/hostfs, so the receiver can resolve symlinks and stat every host mount point.hostmetricsfilesystemscraper (exclude_mount_points+exclude_fs_types) to avoid/sysrootand/bootscrape errors on RHCOS.runAsUser: 0, with thespc_tSELinux type supplied by the generated SCC) so the filelog receiver can read the root-owned container logs under/var/log/pods. Capabilities stay dropped and privilege escalation disabled.Cluster collector
checkClusterCollectorStatusnow reads the StatefulSet workload, so the CR no longer stays inPendingwhen the cluster collector is fully healthy (the cluster collector was moved to a StatefulSet in feat(clusterobservability): enable TargetAllocator support for cluster collectors #5139).Auto-instrumentation
Instrumentationat the agent's OTLP HTTP port (:4318); most auto-instrumentations default tohttp/protobuf.Refactor
config.DistroProvider, and extract agent security contexts / volumes / mounts into distro-gated helper functions.Link to tracking Issue(s)
Testing
make e2e-clusterobservabilitychainsaw target.make prepare-e2e-clusterobservabilityrunsadd-rbac-permissions-to-operator(opt-in kustomize patches) and bakes in--feature-gates=+operator.clusterobservabilityfor the e2e job.otelcol_receiver_accepted_spans).experimental: truewith matchingcontinue-on-error, so failures don't block other operator e2e jobs.serverTLSBootstrap;start-kindapproves the kubelet-serving CSRs so thekubeletstatsreceiver can verify the kubelet against the cluster CA.loader_test.goguarding the filesystem-exclude and filelog config.filelog/hostmetrics/kubeletstatsreporting, auto-instrumented app traces flowing, andClusterObservabilitystatusAvailable.