fix(chart): delay relay shutdown before termination

Co-authored-by: npub128x7j3pwgm4vs8yra3c42fcgcwcvh94g3luwzkqa376du2q6l0esqcrwch <51cde9442e46eac81c83ec71552708c3b0cb96a88ff8e1581d8fb4de281afbf3@buzz.block.builderlab.xyz>
Signed-off-by: npub128x7j3pwgm4vs8yra3c42fcgcwcvh94g3luwzkqa376du2q6l0esqcrwch <51cde9442e46eac81c83ec71552708c3b0cb96a88ff8e1581d8fb4de281afbf3@buzz.block.builderlab.xyz>
This commit is contained in:
npub128x7j3pwgm4vs8yra3c42fcgcwcvh94g3luwzkqa376du2q6l0esqcrwch
2026-07-31 19:01:26 -04:00
parent b1b283cd4c
commit 1de51cd1c9
5 changed files with 19 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ description: |
PostgreSQL and Redis. Configurable for single-node evaluation
(subcharts on) and HA production (external services, existingSecret).
type: application
version: 0.1.7
version: 0.1.8
appVersion: "0.1.0"
home: https://github.com/block/buzz
sources:

View File

@@ -101,6 +101,10 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.relay.containerSecurityContext | nindent 12 }}
{{- with .Values.relay.lifecycle }}
lifecycle:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.relay.command }}
command:
{{- toYaml . | nindent 12 }}

View File

@@ -30,6 +30,12 @@ tests:
path: kind
value: Service
template: templates/service.yaml
- equal:
path: spec.template.spec.containers[0].lifecycle.preStop.exec.command
value:
- sleep
- "5"
template: templates/deployment.yaml
- notContains:
path: spec.template.spec.containers[0].env
content:

View File

@@ -73,6 +73,10 @@
"items": { "type": "string" }
},
"ephemeralTtlOverride": { "type": "integer", "minimum": 0 },
"lifecycle": {
"type": "object",
"description": "Kubernetes lifecycle hooks for the relay container."
},
"command": {
"type": "array",
"items": { "type": "string" },

View File

@@ -101,6 +101,10 @@ secrets:
# ── Relay behavior ───────────────────────────────────────────────────────────
relay:
lifecycle:
preStop:
exec:
command: ["sleep", "5"]
bindAddr: "0.0.0.0:3000"
maxConnections: 10000
maxConcurrentHandlers: 1024