homek8s/apps/base/sirius-growth/deployment-api.yaml
Lance Walters 5273a993f2 apps: pin every first-party site image to an immutable ref
Replace ':latest' + imagePullPolicy: Always on all seven site images with a
pinned tag (or digest) and IfNotPresent, so the image a Deployment runs is
chosen by this repo and rolled by Flux, not by CI patching restartedAt.

Every pin is the image that was already running, so the change is a no-op for
visitors: each pinned tag's manifest/config digest equals the running pod's
imageID (siriusdevops-* f0dde2f4, growth-site ea306b7, growth-portal d9e558c4,
phs-site 5b590cd).

sirius-growth-contact and phs-contact have no CI build path (no workflow has
ever pushed anything but :latest for them), so they are pinned by @sha256:
digest rather than inventing a pipeline; documented in
docs/site-image-pinning.md along with the operator flow.
2026-11-02 17:17:36 -05:00

54 lines
1.6 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: sirius-growth-contact
namespace: sirius-growth
spec:
replicas: 1
selector:
matchLabels:
app: sirius-growth-contact
template:
metadata:
labels:
app: sirius-growth-contact
spec:
tolerations:
- key: dedicated
operator: Exists
effect: PreferNoSchedule
nodeSelector:
kubernetes.io/hostname: siriussec
containers:
- name: contact-api
# This contact API has no CI build path that publishes a tagged image
# (see docs/site-image-pinning.md), so it is pinned by digest.
image: forgejo.siriusdevops.com/sirius/sirius-growth-contact@sha256:cba0a5c67fee639dea78b568cbdf5889b2c78cc2c9cf85b02964ce17d60aab31
imagePullPolicy: IfNotPresent
command: ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8090"]
ports:
- containerPort: 8090
name: http
env:
- name: TG_TOKEN
valueFrom:
secretKeyRef:
name: sirius-growth-contact
key: TG_TOKEN
- name: TG_CHAT
valueFrom:
secretKeyRef:
name: sirius-growth-contact
key: TG_CHAT
readinessProbe:
httpGet:
path: /health
port: 8090
initialDelaySeconds: 5
periodSeconds: 10
resources:
requests:
cpu: 50m
memory: 128Mi
limits:
memory: 256Mi