-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support changing pod collector annotations #451
Conversation
@@ -46,7 +46,7 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem | |||
Template: corev1.PodTemplateSpec{ | |||
ObjectMeta: metav1.ObjectMeta{ | |||
Labels: labels, | |||
Annotations: otelcol.Annotations, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add an entry to the changelog (perhaps after this is merged?) about this? This can be considered a breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean like a separate PR after this? I can do that. I could also add it to changelog right now under (unreleased)
version if that's ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be fine as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
8697a3f
to
efad706
Compare
Looks good to me. It would be even better if you could add a new e2e test, which serves as an example as well. Like this: https://github.com/open-telemetry/opentelemetry-operator/tree/main/tests/e2e/smoke-statefulset |
efad706
to
7306fde
Compare
This allows setting podAnnotations, e.g: ``` --- apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector metadata: name: opentelemetry annotations: foo: "this won't be applied to pods" spec: mode: deployment podAnnotations: ad.datadoghq.com/otc-container.check_names: '["openmetrics"]' ad.datadoghq.com/otc-container.init_configs: '[{}]' ad.datadoghq.com/otc-container.instances: |- [ { "prometheus_url": "http://%%host%%:8888/metrics", "namespace": "opentelemetry.collector", "metrics": [ {"otelcol_exporter_queue_size": "exporter.queue_size"}, {"otelcol_exporter_send_failed_spans": "exporter.send_failed_spans"}, {"otelcol_exporter_sent_spans": "exporter.sent_spans"}, ] } ] # ... ``` Fixes open-telemetry#426
7306fde
to
5148b55
Compare
@jpkrohling Added e2e test as well. |
Looks great, thanks! |
This allows setting podAnnotations, e.g: ``` --- apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector metadata: name: opentelemetry annotations: foo: "this won't be applied to pods" spec: mode: deployment podAnnotations: ad.datadoghq.com/otc-container.check_names: '["openmetrics"]' ad.datadoghq.com/otc-container.init_configs: '[{}]' ad.datadoghq.com/otc-container.instances: |- [ { "prometheus_url": "http://%%host%%:8888/metrics", "namespace": "opentelemetry.collector", "metrics": [ {"otelcol_exporter_queue_size": "exporter.queue_size"}, {"otelcol_exporter_send_failed_spans": "exporter.send_failed_spans"}, {"otelcol_exporter_sent_spans": "exporter.sent_spans"}, ] } ] # ... ``` Fixes open-telemetry#426
This allows setting podAnnotations, e.g: ``` --- apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector metadata: name: opentelemetry annotations: foo: "this won't be applied to pods" spec: mode: deployment podAnnotations: ad.datadoghq.com/otc-container.check_names: '["openmetrics"]' ad.datadoghq.com/otc-container.init_configs: '[{}]' ad.datadoghq.com/otc-container.instances: |- [ { "prometheus_url": "http://%%host%%:8888/metrics", "namespace": "opentelemetry.collector", "metrics": [ {"otelcol_exporter_queue_size": "exporter.queue_size"}, {"otelcol_exporter_send_failed_spans": "exporter.send_failed_spans"}, {"otelcol_exporter_sent_spans": "exporter.sent_spans"}, ] } ] # ... ``` Fixes open-telemetry#426
This allows setting podAnnotations, e.g:
Fixes #426