feat(helm): Horizon deployment (Recreate strategy, 60s grace)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-26 22:54:21 -04:00
parent 4b63fec032
commit 2d633e37ab

View File

@@ -0,0 +1,62 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "ezscale-website.fullname" . }}-horizon
labels:
{{- include "ezscale-website.labels" . | nindent 4 }}
app.kubernetes.io/component: horizon
spec:
replicas: {{ .Values.horizon.replicaCount }}
# Horizon needs SIGTERM + drain time. Don't run two replicas during update.
strategy:
type: Recreate
selector:
matchLabels:
{{- include "ezscale-website.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: horizon
template:
metadata:
labels:
{{- include "ezscale-website.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: horizon
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
terminationGracePeriodSeconds: 60
containers:
- name: horizon
image: {{ include "ezscale-website.image" (dict "ctx" . "role" "horizon") }}
envFrom:
- configMapRef:
name: {{ include "ezscale-website.fullname" . }}-env
- secretRef:
name: {{ include "ezscale-website.secretName" . }}
volumeMounts:
- name: oauth-keys
mountPath: /var/www/html/secrets
readOnly: true
resources:
{{- toYaml .Values.horizon.resources | nindent 12 }}
livenessProbe:
exec:
command:
- php
- artisan
- horizon:status
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 10
volumes:
- name: oauth-keys
secret:
secretName: {{ include "ezscale-website.secretName" . }}
items:
- key: oauth-private.key
path: oauth-private.key
- key: oauth-public.key
path: oauth-public.key
optional: true