From 6161bb8dbc30d6020dd02fe890862df191b1ec3f Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sat, 2 Aug 2025 14:57:08 -0700 Subject: [PATCH] improvement(helm): add additional instructions for AWS deployments (#851) --- helm/sim/README.md | 13 +++++++++++++ helm/sim/templates/deployment-app.yaml | 9 +++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/helm/sim/README.md b/helm/sim/README.md index a2689b62f8..d872a94534 100644 --- a/helm/sim/README.md +++ b/helm/sim/README.md @@ -117,11 +117,24 @@ Each cloud platform example includes optimized configurations: ### AWS (EKS) - **Storage**: EBS GP3 volumes for optimal performance +- **EBS CSI Driver**: Required for persistent storage (install as EKS add-on) - **Node Selectors**: Instance type targeting (`t3.large`, `r5.large`, `g4dn.xlarge`) - **GPU Support**: GPU-optimized instances (G4, P3 families) - **Ingress**: Application Load Balancer (ALB) with AWS Certificate Manager - **IAM**: Service Account annotations for IAM roles +**Prerequisites for AWS:** +```bash +# Install EBS CSI driver add-on +aws eks create-addon --cluster-name your-cluster --addon-name aws-ebs-csi-driver + +# Create IAM role for EBS CSI driver (if using IRSA) +aws iam create-role --role-name AmazonEKS_EBS_CSI_DriverRole \ + --assume-role-policy-document file://ebs-csi-trust-policy.json +aws iam attach-role-policy --role-name AmazonEKS_EBS_CSI_DriverRole \ + --policy-arn arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy +``` + ### GCP (GKE) - **Storage**: Persistent Disk with standard and premium options - **Node Selectors**: Node pool and machine family targeting diff --git a/helm/sim/templates/deployment-app.yaml b/helm/sim/templates/deployment-app.yaml index 92931632b3..8923f335bf 100644 --- a/helm/sim/templates/deployment-app.yaml +++ b/helm/sim/templates/deployment-app.yaml @@ -38,10 +38,11 @@ spec: - name: migrations image: {{ include "sim.image" (dict "context" . "image" .Values.migrations.image) }} imagePullPolicy: {{ .Values.migrations.image.pullPolicy }} - command: ["bun", "run", "db:migrate"] - env: - - name: DATABASE_URL - value: {{ include "sim.databaseUrl" . | quote }} + command: ["/bin/bash", "-c"] + args: + - | + export DATABASE_URL="{{ include "sim.databaseUrl" . }}" + bun run db:migrate {{- if .Values.postgresql.enabled }} envFrom: - secretRef: