grafana / alloy

OpenTelemetry Collector distribution with programmable pipelines
https://grafana.com/oss/alloy
Apache License 2.0
1.42k stars 205 forks source link

add lifecycle on pod_template #1673

Closed jianpingzhangBill closed 1 month ago

jianpingzhangBill commented 2 months ago

Request

We running alloy in daemonset to collect pod logs. We use AWS spot node, it often was removed. But the alloy pods recycled faster then other pods, it will cause some log didn't send to loki.

Can you help add lifecycle and terminationGracePeriodSeconds to pod_template?

lifecycle:
  preStop:
    exec:
      command: ["sleep", "30"]

Use case

Can you help add lifecycle and terminationGracePeriodSeconds to pod_template?

terminationGracePeriodSeconds: 60
lifecycle:
  preStop:
    exec:
      command: ["sleep", "30"]
etiennep commented 1 month ago

This is a duplicate of #1140

etiennep commented 1 month ago

Here's a PR that adds these features: https://github.com/grafana/alloy/pull/1774