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