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.
92 lines
2.7 KiB
YAML
92 lines
2.7 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: sirius-growth-portal
|
|
namespace: sirius-growth
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: sirius-growth-portal
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: sirius-growth-portal
|
|
spec:
|
|
tolerations:
|
|
- key: dedicated
|
|
operator: Exists
|
|
effect: PreferNoSchedule
|
|
nodeSelector:
|
|
kubernetes.io/hostname: siriussec
|
|
containers:
|
|
- name: portal-api
|
|
image: forgejo.siriusdevops.com/sirius/sirius-growth-portal:d9e558c4e0922d3ecd28214f7698ec0994170481
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 8091
|
|
name: http
|
|
env:
|
|
- name: DATABASE_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sirius-growth-portal-app
|
|
key: database-url
|
|
- name: SESSION_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sirius-growth-portal-app
|
|
key: session-secret
|
|
- name: ADMIN_USERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sirius-growth-portal-app
|
|
key: admin-username
|
|
- name: ADMIN_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sirius-growth-portal-app
|
|
key: admin-password
|
|
- name: S3_ENDPOINT
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sirius-growth-portal-app
|
|
key: s3-endpoint
|
|
- name: S3_BUCKET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sirius-growth-portal-app
|
|
key: s3-bucket
|
|
- name: S3_ACCESS_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sirius-growth-portal-app
|
|
key: s3-access-key
|
|
- name: S3_SECRET_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sirius-growth-portal-app
|
|
key: s3-secret-key
|
|
- name: S3_REGION
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sirius-growth-portal-app
|
|
key: s3-region
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/portal/health
|
|
port: 8091
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/portal/health
|
|
port: 8091
|
|
initialDelaySeconds: 20
|
|
periodSeconds: 20
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 128Mi
|
|
limits:
|
|
memory: 384Mi
|