Skip to content

[helm chart] Loki pod annotations in gateway #16918

@blezoray

Description

@blezoray

Describe the bug
When i configure "Prometheus" annotations in "loki" section values:

# @default -- See values.yaml
loki:
...
  # -- Common annotations for all pods
  podAnnotations:
    prometheus.io/scrape: "true"
    prometheus.io/port: "3100"
...

the gateway deployment has these annotations and it generates alerts because it has no exporter on port 3100.

❯ k get deployment/loki-gateway -o yaml| yq .spec.template.metadata.annotations
checksum/config: 2a3f137dea8f98982978b976f1e74758853372f5ff6d83c9c46ebb0a490dc358
prometheus.io/port: "3100"
prometheus.io/scrape: "true"

Gateway deployment should not have "loki" annotations but only its owned annotations.

Code: https://github.com/grafana/loki/blob/main/production/helm/loki/templates/gateway/deployment-gateway-nginx.yaml#L34-L36

Environment:

  • Infrastructure: Kubernetes
  • Deployment tool: helm-loki-6.28.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions