feat: Introduce Command Arg to Collector Operator#4973
Conversation
|
Why are you making this a struct instead of just keeping CC @open-telemetry/operator-approvers I vaguely recall there was a reason we didn't allow this to be changed, am I misremembering? |
|
thanks for taking a look @swiatekm - I used a struct here because I was emulating the structure that exists in the helm chart so thought it made sense for it to look similar on the operator level - do you think it makes more sense to have it be a slice instead? i'm also curious if there were reasons this wasn't implemented before, since the related issue has been open for a while and has some upvotes |
|
ah, though I modeled this after the upstream helm chart with the struct - it probably doesn't make sense here as the operators already defines args (which the helm chart doesn't) so there's overlap with |
98a2cda to
dda9391
Compare
E2E Test Results 38 files 261 suites 2h 16m 9s ⏱️ Results for commit c27d8ca. ♻️ This comment has been updated with latest results. |
|
hm, the e2e tests that failed here seem unrelated to this PR and pass locally 🤔 could be flaky? |
Description:
Addresses this feature request - and implements the ability to configure the collector entry point from the operator. Previously, it was only possible to set the
argsthat were passed through and the command would fall back to the default (ie whatever is defined as the entry point in the docker image). This PR allows a user to set arguments like:Which would set the entry point/command as
/path/to/agent otel- currently the helm chart offers the same capabilityTesting:
internal/webhook/collector_webhook_test.go=> tests the validating webhook’s create pathapis/v1alpha1/convert_test.go=> tests that converting fromv1beta1tov1alpha1and vice versa works as expectedinternal/manifests/collector/container_test.go=> tests manifest generationDocumentation:
New spec.command / CollectorCommand fields in the Go types (v1beta1 and v1alpha1, including kubebuilder markers for CRD validation) - opentelemetrycollectors.md includes generated docs from that (if there's somewhere else to include docs please let me know!)