feat(k3s): add trade-api deployment

This commit is contained in:
u1
2026-01-06 01:40:22 +00:00
parent f9797c6acd
commit 2a3ed4b6fc

View File

@@ -0,0 +1,54 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: trade-api
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: trade-api
template:
metadata:
labels:
app.kubernetes.io/name: trade-api
spec:
imagePullSecrets:
- name: gitea-registry
containers:
- name: api
image: rv32i.pl/trade/trade-api:k3s-20260106013603
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 8787
env:
- name: PORT
value: "8787"
- name: APP_VERSION
value: "staging"
- name: HASURA_GRAPHQL_URL
value: "http://hasura:8080/v1/graphql"
- name: HASURA_ADMIN_SECRET
valueFrom:
secretKeyRef:
name: trade-hasura
key: HASURA_GRAPHQL_ADMIN_SECRET
- name: API_ADMIN_SECRET
valueFrom:
secretKeyRef:
name: trade-api
key: API_ADMIN_SECRET
- name: CORS_ORIGIN
value: "*"
readinessProbe:
httpGet:
path: /healthz
port: http
initialDelaySeconds: 2
periodSeconds: 5
livenessProbe:
httpGet:
path: /healthz
port: http
initialDelaySeconds: 10
periodSeconds: 10