sirius-growth: deploy the portal API on the existing hostname
FastAPI portal on 8091 behind /api/portal, image pinned to the API commit 406f25c and its manifest digest. Route sits after /api/contact and before the catch-all. Env comes from the sirius-growth-portal-app Secret (DB URL, session secret, admin creds, Garage S3 keys); nothing secret is in git.
This commit is contained in:
parent
36419c8fae
commit
90355d4a76
4 changed files with 115 additions and 0 deletions
92
apps/base/sirius-growth/deployment-portal.yaml
Normal file
92
apps/base/sirius-growth/deployment-portal.yaml
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
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: linode
|
||||
containers:
|
||||
- name: portal-api
|
||||
image: forgejo.siriusdevops.com/sirius/sirius-growth-portal:406f25cc989e729362dea114eab81a69f04bdbaa@sha256:ecc7abee9bc956dfbb794a14085b3b83ac9f90cb4ca61cdd8145a66386d077f1
|
||||
imagePullPolicy: Always
|
||||
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
|
||||
Loading…
Reference in a new issue