bottlerocket-os / bottlerocket-update-operator

A Kubernetes operator for automated updates to Bottlerocket
Other
178 stars 41 forks source link

Splunk otel-collector needs the brupop-controller-deployment pods annotated #676

Open AndreiBanaruTakeda opened 2 months ago

AndreiBanaruTakeda commented 2 months ago

Image I'm using: v1.3.0

Issue or Feature Request: In order for the Splunk otel-collector to scrape the metrics from the brupop-controller-deployment pods, the pods need to be annotated:

prometheus.io/port: "8080"
prometheus.io/scrape: "true"

I see service/brupop-controller-server is annotated with the above, but Splunk looks for those annotations at the pod level.

Proposal is to add the annotations in the deployment/brupop-controller-deployment:

spec:
  template:
    metadata:
      annotations:
        prometheus.io/port: "8080"
        prometheus.io/scrape: "true"

Testing executed:

  1. I manually edited deploy/brupop-controller-deployment and added the above annotations
  2. kubectl rollout restart deployment brupop-controller-deployment
  3. I had to wait for the scheduler_cron_expression for metrics to become available
  4. Checked for the metrics in Splunk