Skip to content

[Feature Request] Helm chart: support overriding additional parameters #1053

Description

@eenchevlp

When running the chart with a single replica (the common case), every helm upgrade or pod restart causes a short metrics gap in Prometheus: the old pod is terminated before the new one is ready to serve /metrics, so one or more scrape intervals are missed.

The standard Kubernetes mitigations for this are:

spec.strategy with maxSurge: 1 / maxUnavailable: 0, so the new pod must be Ready before the old one is terminated
a preStop lifecycle hook (e.g. sleep 45) so the old pod keeps answering scrapes while endpoints propagate, together with a matching terminationGracePeriodSeconds
minReadySeconds to keep the old pod around a bit longer after the new one reports Ready

Describe the solution you'd like

Expose passthrough values in values.yaml, rendered into the Deployment only when set:

# -- Deployment update strategy (spec.strategy), rendered as-is
deploymentStrategy: {}
#  type: RollingUpdate
#  rollingUpdate:
#    maxSurge: 1
#    maxUnavailable: 0

# -- Minimum seconds a new pod must be Ready before being considered available (spec.minReadySeconds)
minReadySeconds: ""

# -- Container lifecycle hooks (e.g. preStop sleep for graceful scrape handover)
lifecycle: {}
#  preStop:
#    exec:
#      command: ["sleep", "45"]

# -- Pod terminationGracePeriodSeconds (should exceed any preStop sleep)
terminationGracePeriodSeconds: ""

This pattern (deploymentStrategy, lifecycle, terminationGracePeriodSeconds as opaque passthroughs) is common across prometheus-community exporter charts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions