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

Promtail limits_config values not working #3294

Open
ns0092 opened this issue Aug 27, 2024 · 1 comment
Open

Promtail limits_config values not working #3294

ns0092 opened this issue Aug 27, 2024 · 1 comment

Comments

@ns0092
Copy link

ns0092 commented Aug 27, 2024

Helm chart values with extraLimitsConfig error out on apply.

tolerations:
  - key: workload
    operator: Equal
    value: monitoring
    effect: NoSchedule
config:
  clients:
    - url: http://loki-loki-distributed-gateway/loki/api/v1/push
  snippets:
    extraLimitsConfig:
      readline_rate_enabled: true
      readline_rate: 1000
      readline_burst: 2000
    pipelineStages:
    - docker: {}
    - cri: {}
    common:
      - action: replace
        source_labels:
          - __meta_kubernetes_pod_node_name
        target_label: node_name
      - action: replace
        source_labels:
          - __meta_kubernetes_namespace
        target_label: namespace
      - action: replace
        replacement: $1
        separator: /
        source_labels:
          - namespace
          - app
        target_label: job
      - action: replace
        source_labels:
          - __meta_kubernetes_pod_name
        target_label: pod
      - action: replace
        source_labels:
          - __meta_kubernetes_pod_host_ip
        target_label: host
      - action: replace
        source_labels:
          - __meta_kubernetes_pod_label_release
        target_label: release
      - action: replace
        source_labels:
          - __meta_kubernetes_pod_phase
        target_label: pod_phase
      - action: replace
        source_labels:
          - __meta_kubernetes_pod_container_name
        target_label: container
      - action: replace
        replacement: /var/log/pods/*$1/*.log
        separator: /
        source_labels:
          - __meta_kubernetes_pod_uid
          - __meta_kubernetes_pod_container_name
        target_label: __path__
      - action: replace
        replacement: /var/log/pods/*$1/*.log
        regex: true/(.*)
        separator: /
        source_labels:
          - __meta_kubernetes_pod_annotationpresent_kubernetes_io_config_hash
          - __meta_kubernetes_pod_annotation_kubernetes_io_config_hash
          - __meta_kubernetes_pod_container_name
        target_label: __path__

It seems like extraLimitsConfig is expecting a value of type String but I want to provide:

    extraLimitsConfig:
      readline_rate_enabled: true
      readline_rate: 1000
      readline_burst: 2000

Helm chart version: 6.16.5
App version: 3.0.0

Can someone suggest how I can get this working? Appreciate the help!

@SirBrickAlot
Copy link

SirBrickAlot commented Sep 19, 2024

Hi ns0092,

try setting the extraLimitsConfig as follows:

extraLimitsConfig: |
  readline_rate_enabled: true
  readline_rate: 1000
  readline_burst: 2000

This should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants