FIRST PASS - renders and lints, but has NOT been installed on a cluster. See #3898. Needs a real deploy and an upgrade test from 0.2.x before merge. The chart deployed checkmate-client, checkmate-backend and checkmate-mongo, none of which CI publishes any more. Chart.yaml pinned appVersion to v3.8.1 with a comment explaining the chart could not be bumped until it moved to the all-in-one image. This does that move. Structure. The application image serves the client and the API from one origin, so the separate client deployment, service, nginx ConfigMap and ingress are removed and templates/api/ becomes templates/app/. One ingress now routes / to the app rather than one routing / to nginx and another routing /api/v1 to the API - which also drops the CORS annotations, since the browser is same-origin. MongoDB moves to upstream mongo:8.0, matching docker/docker-compose.yaml. Environment. UPTIME_APP_API_BASE_URL and UPTIME_APP_CLIENT_HOST are gone; the server stopped reading them. CLIENT_HOST is derived from the app's own ingress, and is omitted from `env` when secrets.CLIENT_HOST is set, because `env` takes precedence over `envFrom` and would otherwise discard the override silently. Back-compat. checkmate.app merges any legacy client/api/server block over the app defaults, so most values files upgrade unedited. client.image and client.tag are deliberately not inherited - that repo is unpublished, and honouring it would pin an install to an unpullable image. checkmate.api is kept as an alias. Two upgrade cases fail loudly instead of deploying something wrong: a set client.image, and client/api ingress hosts that differ (one origin cannot serve both). Worker is unchanged in shape - still opt-in, still the same image as the app, still deriving QUEUE_PRIMARY_PROCESSES. It referenced .Values.client.protocol, which no longer exists; rendering with worker.enabled=true caught that nil pointer. Verified with helm lint and helm template across: defaults, worker enabled, worker plus KEDA autoscaling, each of the three legacy value blocks, the two new guards, the change_me guard, and the CLIENT_HOST override. No checkmate-client, checkmate-backend, checkmate-mongo or UPTIME_APP_* strings remain in rendered output. Not done: INSTALLATION.md has a new migration section but its body still documents the two-tier layout in places, and no cluster test has been run. Claude-Session: https://claude.ai/code/session_01AbYLvwpEaZFXktHVcqrFRd
72 lines
3.0 KiB
YAML
72 lines
3.0 KiB
YAML
{{- $app := include "checkmate.app" . | fromYaml -}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: checkmate
|
|
spec:
|
|
replicas: 1 # single scheduler — seeds/reconciles the jobs collection
|
|
selector:
|
|
matchLabels:
|
|
app: checkmate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: checkmate
|
|
spec:
|
|
{{- with $app.affinity }}
|
|
affinity:
|
|
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
|
{{- end }}
|
|
{{- with $app.tolerations }}
|
|
tolerations:
|
|
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: checkmate
|
|
image: {{ include "checkmate.image" (dict "image" $app.image "tag" $app.tag "root" $) }}
|
|
imagePullPolicy: {{ $app.imagePullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: {{ $app.port }}
|
|
envFrom:
|
|
- secretRef:
|
|
name: checkmate-secrets
|
|
# Probes hit the Express /api/v1/health endpoint — proves the HTTP server is responsive.
|
|
# NOTE: this does NOT detect a wedged job loop when queuePrimaryProcesses=true (the app is
|
|
# also a worker). Worker-aware health for that mode is a follow-up — see worker-health-checks.md §7.5.
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/v1/health
|
|
port: http
|
|
initialDelaySeconds: {{ $app.probes.liveness.initialDelaySeconds }}
|
|
periodSeconds: {{ $app.probes.liveness.periodSeconds }}
|
|
timeoutSeconds: {{ $app.probes.liveness.timeoutSeconds }}
|
|
failureThreshold: {{ $app.probes.liveness.failureThreshold }}
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/v1/health
|
|
port: http
|
|
initialDelaySeconds: {{ $app.probes.readiness.initialDelaySeconds }}
|
|
periodSeconds: {{ $app.probes.readiness.periodSeconds }}
|
|
timeoutSeconds: {{ $app.probes.readiness.timeoutSeconds }}
|
|
failureThreshold: {{ $app.probes.readiness.failureThreshold }}
|
|
{{- with $app.resources }}
|
|
resources:
|
|
{{- tpl ( . | toYaml) $ | nindent 12 }}
|
|
{{- end }}
|
|
env:
|
|
# The client is served from this same origin, so CLIENT_HOST defaults to
|
|
# the app's own ingress URL. `env` takes precedence over `envFrom`, so an
|
|
# explicit secrets.CLIENT_HOST is honoured by omitting this entry rather
|
|
# than emitting a value that would silently win over it.
|
|
{{- if not (hasKey .Values.secrets "CLIENT_HOST") }}
|
|
- name: CLIENT_HOST
|
|
value: "{{ $app.protocol }}://{{ $app.ingress.host }}"
|
|
{{- end }}
|
|
- name: QUEUE_MODE
|
|
value: "primary"
|
|
# Derived: when a worker tier is deployed the app only schedules (false); otherwise it is
|
|
# all-in-one and processes jobs itself (true). Keeps the two from ever competing for jobs.
|
|
- name: QUEUE_PRIMARY_PROCESSES
|
|
value: {{ not .Values.worker.enabled | quote }}
|