From 2d633e37ab3d2167f391ef5b6212d49c68c71c97fdc183c0fab6b68655c8a854 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 26 Apr 2026 22:54:21 -0400 Subject: [PATCH] feat(helm): Horizon deployment (Recreate strategy, 60s grace) Co-Authored-By: Claude Opus 4.7 (1M context) --- .../templates/deployment-horizon.yaml | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 helm/ezscale-website/templates/deployment-horizon.yaml diff --git a/helm/ezscale-website/templates/deployment-horizon.yaml b/helm/ezscale-website/templates/deployment-horizon.yaml new file mode 100644 index 0000000..a20b318 --- /dev/null +++ b/helm/ezscale-website/templates/deployment-horizon.yaml @@ -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