Skip to content
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

observability.metrics.DisablePrometheusAnnotations does not work #2608

Open
verejoel opened this issue Feb 8, 2024 · 5 comments · May be fixed by #2664
Open

observability.metrics.DisablePrometheusAnnotations does not work #2608

verejoel opened this issue Feb 8, 2024 · 5 comments · May be fixed by #2664
Labels
area:collector Issues for deploying collector bug Something isn't working

Comments

@verejoel
Copy link

verejoel commented Feb 8, 2024

Component(s)

No response

What happened?

Description

Setting the new DisablePrometheusAnnotations config option to true in the latest version of the operator does not work.

Steps to Reproduce

Operator version: 0.93.0
CRDs have been updated on K8s for this version.

Add the following stanza to an existing OpenTelemetryCollector and observe that the deployment is not rolled out, nor are annotations removed.

spec:
  observability:
    metrics:
      DisablePrometheusAnnotations: true

I also tried redeploying the operator, to no avail.

Expected Result

The prometheus scrape annotations should not be present on the deployment if this option is enabled.

Actual Result

Prometheus scrape annotations are present, operator does not perform reconciliation

Supplemental

Can we also fix the naming of this resource in the OpenAPI spec to not start with a capital letter?

Kubernetes Version

1.28.3

Operator version

1.93.0

Collector version

Custom build

Environment information

No response

Log output

No response

Additional context

No response

@verejoel verejoel added bug Something isn't working needs triage labels Feb 8, 2024
@verejoel
Copy link
Author

verejoel commented Feb 8, 2024

I tested this also with the --feature-gates=operator.observability.prometheus flag enabled with the same result

@jaronoff97
Copy link
Contributor

Are there any error logs from the operator?

@pavolloffay pavolloffay added area:collector Issues for deploying collector and removed needs triage labels Feb 9, 2024
@pavolloffay
Copy link
Member

The implementation of this feature is very simple

if !instance.Spec.Observability.Metrics.DisablePrometheusAnnotations {

Could you pleae paste collector deployment with DisablePrometheusAnnotations: true

@rivToadd
Copy link
Contributor

rivToadd commented Feb 12, 2024

I just ran a validation

apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
  name: my-collector
spec:
  mode: statefulset
  replicas: 1
  observability:
    metrics:
      enableMetrics: true
      DisablePrometheusAnnotations: true
  config: |
    receivers:
      jaeger:
        protocols:
          grpc:
    processors:

    exporters:
      debug:

    service:
      pipelines:
        traces:
          receivers: [jaeger]
          processors: []
          exporters: [debug]

give it a go with this spec. I was successful with it

@jaronoff97
Copy link
Contributor

an aside, I do think we should rename DisablePrometheusAnnotations to be lowercased to match all of the other fields we have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:collector Issues for deploying collector bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants