Kubernetes Deployment

The backend is deployed to Digital Ocean Kubernetes (DOKS) using Helm charts.

Helm Chart

The chart is located at backend/.helm/ and is named nmt-backend (version 0.1.0).

Chart Resources

The Helm chart creates these Kubernetes resources:

Resource Purpose
Deployment Runs the backend application
Service Internal networking (ClusterIP)
Ingress External access via NGINX
Certificate TLS via cert-manager

Deployment Configuration

Setting Value
Replicas 1
Namespace stage
Image pull ghcr.io/{org}/nmt-backend:{sha}
Liveness probe HTTP health check
Readiness probe HTTP health check

Ingress Configuration

Setting Value
Controller NGINX (kubernetes.io/ingress.class: nginx)
Domain backend.stage.newmarkettrading.com
TLS Automatic via cert-manager
Issuer Let's Encrypt (ClusterIssuer: letsencrypt-prod)

Resource Limits

resources:
  requests:
    cpu: "1"
    memory: "2Gi"
  limits:
    cpu: "2"
    memory: "4Gi"

Additional RAM-backed volumes:

  • chrome-data: 2Gi (for headless Chrome)
  • tmp: 1Gi (for temporary files)

Environment Variables

The Helm chart injects 100+ environment variables into the pod, covering:

  • Database connections
  • RPC endpoints (per chain)
  • API keys for external services
  • Worker configuration parameters
  • Protocol-specific settings (addresses, min TVL, intervals)

These values are set via --set-string flags in the CI/CD pipeline, pulling from GitHub Secrets.

Deploying

Deployments are triggered automatically by the CI/CD pipeline (see CI/CD). Manual deployment is possible using:

helm upgrade --install nmt-backend .helm/ \
  --namespace stage \
  --set-string image.tag={git-sha} \
  # ... (many more --set-string flags)

In practice, the CI pipeline handles all the --set-string flags automatically from GitHub Secrets.

results matching ""

    No results matching ""