feat(chart): support deploymentStrategy, lifecycle, minReadySeconds, terminationGracePeriodSeconds - #1054
Merged
burningalchemist merged 1 commit intoAug 10, 2026
Conversation
…nd terminationGracePeriodSeconds Adds four optional passthrough values so users can configure zero-downtime rolling updates for the exporter Deployment: spec.strategy, spec.minReadySeconds, container lifecycle hooks, and terminationGracePeriodSeconds. All default to unset and render nothing, so existing manifests are unaffected. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Owner
|
Hey @eenchevlp, looks good to me! Thanks for your contribution, let's ship it. 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1053
Summary
With
replicas: 1(the common configuration for this exporter), a plainrolling restart briefly drops the only pod backing the Service, causing
Prometheus scrape gaps on every redeploy.
spec.strategy,spec.minReadySeconds, container lifecycle hooks, andterminationGracePeriodSecondswere not configurable, so there was no wayto avoid this from the chart.
This adds four new optional, passthrough values:
deploymentStrategy→ rendered verbatim underspec.strategy(e.g.RollingUpdatewithmaxSurge: 1,maxUnavailable: 0to guarantee anew pod is ready before the old one terminates)
minReadySeconds→spec.minReadySeconds(hold the new pod as "not yetavailable" long enough for Prometheus to discover and scrape it)
lifecycle→ containerlifecyclehooks (e.g.preStop: sleep 45tolet in-flight scrapes finish and service endpoints propagate before
SIGTERM)
terminationGracePeriodSeconds→ pod spec, sized to cover thepreStopdelay
Together these enable gapless rolling updates for single-replica
deployments:
maxUnavailable: 0+ apreStopsleep keeps the old podserving
/metricsuntil the new pod is confirmed ready and endpoints havepropagated.
All four values default to unset/empty and are guarded with
{{- with }}, so existing releases render identically until explicitlyconfigured.
Test plan
helm lint helm/ct lint --charts helmhelm template test helm/diffed against master with the newvalues unset — identical output (only the chart-version
label/checksum differ, from the version bump)
helm template test helm/ -f <values with all four set>— verifiedvia
yqthatspec.strategy,spec.minReadySeconds,spec.template.spec.terminationGracePeriodSeconds, andcontainers[0].lifecycle.preStoprender in the correct locations