Skip to content

feat: add the value lifecycle for the hooks of the API container - #8

Merged
kaufmo merged 1 commit into
v1.xfrom
feat/lifecycle
Nov 26, 2026
Merged

kaufmo merged 1 commit into
v1.xfrom
feat/lifecycle

Conversation

@kaufmo

@kaufmo kaufmo commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Adds the value lifecycle, which sets the lifecycle hooks of the API container. The default {} renders nothing, so existing releases do not change.

           resources:
             {{- toYaml .Values.resources | nindent 12 }}
+{{- with .Values.lifecycle }}
+          lifecycle:
+            {{- toYaml . | nindent 12 }}
+{{- end }}
           volumeMounts:

When a pod terminates, Kubernetes removes it from the Service endpoints while it starts the shutdown, and the ingress controller sees the change a few seconds later. A service that closes its listener on SIGTERM refuses the requests that arrive in that time. A preStop pause keeps the listener open until the ingress no longer routes to the pod:

lifecycle:
  preStop:
    sleep:
      seconds: 5

A service that must not refuse requests during a rollout needs a `preStop` pause, so the ingress drops the pod from its endpoints before the listener closes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kaufmo kaufmo self-assigned this Nov 26, 2026
@kaufmo
kaufmo merged commit afff322 into v1.x Nov 26, 2026
2 checks passed
@kaufmo
kaufmo deleted the feat/lifecycle branch November 26, 2026 10:00
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

Successfully merging this pull request may close these issues.

3 participants