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
|
||||||
|
|
@ -18,6 +18,13 @@ spec:
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: sirius-growth-contact
|
- name: sirius-growth-contact
|
||||||
port: 8090
|
port: 8090
|
||||||
|
- matches:
|
||||||
|
- path:
|
||||||
|
type: PathPrefix
|
||||||
|
value: /api/portal
|
||||||
|
backendRefs:
|
||||||
|
- name: sirius-growth-portal
|
||||||
|
port: 8091
|
||||||
- matches:
|
- matches:
|
||||||
- path:
|
- path:
|
||||||
type: PathPrefix
|
type: PathPrefix
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@ resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
- deployment-api.yaml
|
- deployment-api.yaml
|
||||||
|
- deployment-portal.yaml
|
||||||
- service.yaml
|
- service.yaml
|
||||||
- service-api.yaml
|
- service-api.yaml
|
||||||
|
- service-portal.yaml
|
||||||
- httproute.yaml
|
- httproute.yaml
|
||||||
- deployer.yaml
|
- deployer.yaml
|
||||||
- cluster.yaml
|
- cluster.yaml
|
||||||
|
|
|
||||||
14
apps/base/sirius-growth/service-portal.yaml
Normal file
14
apps/base/sirius-growth/service-portal.yaml
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: sirius-growth-portal
|
||||||
|
namespace: sirius-growth
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app: sirius-growth-portal
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 8091
|
||||||
|
targetPort: 8091
|
||||||
|
protocol: TCP
|
||||||
Loading…
Reference in a new issue