From 2a3ed4b6fc6d2b0ed77034a74336ada5d6248aab Mon Sep 17 00:00:00 2001 From: u1 Date: Tue, 6 Jan 2026 01:40:22 +0000 Subject: [PATCH] feat(k3s): add trade-api deployment --- kustomize/base/api/deployment.yaml | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 kustomize/base/api/deployment.yaml diff --git a/kustomize/base/api/deployment.yaml b/kustomize/base/api/deployment.yaml new file mode 100644 index 0000000..33efb3e --- /dev/null +++ b/kustomize/base/api/deployment.yaml @@ -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