Code Base: deploy the full-stack template from fastapi/full-stack-fastapi-template
Objective: Validate your ability to implement a GitOps workflow that deploys a React frontend, FastAPI backend and PostgreSQL database into two separate Kubernetes namespaces (dev/prod) using Argo CD, Helm charts, AWS Secrets Manager and AWS ECR, with CI/CD automated by GitHub Actions.
-
Initialize the GitOps repository
- Fork or clone your repo and add a root “App of Apps” Argo CD application that points at an
argocd-apps/directory.
- Fork or clone your repo and add a root “App of Apps” Argo CD application that points at an
-
External Secrets
- Create a
ClusterSecretStorefor AWS Secrets Manager. - Define two
ExternalSecretresources (dev/backend-secret,prod/backend-secret) to consume secrets from AWS.
- Create a
-
PostgreSQL via ApplicationSet
- Write an Argo CD
ApplicationSet(matrix or list generator) that provisions two PostgreSQL instances—one in namespacedev(1 Gi storage) and one inprod(2 Gi)—using the Bitnami chart and the above secrets.
- Write an Argo CD
-
Custom Helm charts
- Populate
templates/deployment.yaml,service.yamlandingress.yamlincustom-charts/backendandcustom-charts/frontend. - In the backend chart, add
initContainersto wait for Postgres and run migrations. - Configure Ingress rules:
- Backend:
/apiand/docs→backend-service - Frontend:
/→frontend-service
- Backend:
- Populate
-
CI/CD with GitHub Actions
- Create two workflows in
.github/workflows:backend.yamlandfrontend.yaml, each triggered byworkflow_dispatchwith anenvironmentinput (devorprod). - Use OIDC to assume an IAM role and push Docker images to AWS ECR (public).
- In each workflow:
- Check out code
- Configure AWS credentials (
aws-actions/configure-aws-credentials) - Log in to ECR (
aws-actions/amazon-ecr-login) - Build and push images tagged with the short Git SHA, and—if
prod—also push alatesttag - Update the image tag in
custom-charts/<service>/values-<environment>.yamlviafjogeleit/yaml-update-action
- In
frontend.yaml, additionally setBACKEND_URL(https://dev.myapp.localorhttps://myapp.local) as a build-argVITE_API_URL.
- Create two workflows in
-
ApplicationSet for apps
- Create a single Argo CD
ApplicationSetthat generates four applications:backend-dev,backend-prod,frontend-dev,frontend-prod, each pointing at the appropriate chart and values file.
- Create a single Argo CD
-
Local testing
- Map
dev.myapp.localandmyapp.localto127.0.0.1(e.g./etc/hosts). - Ensure pods are running, UI and API are reachable at both domains, and that
dev/proddata are isolated.
- Map
-
Documentation
- Update the README with a concise Quick Start section showing how to:
git clone <your-fork> # Argo CD auto-sync kubectl get applications -n argocd
- Describe where to view Argo CD status, how to access the UI, and how to trigger workflows.
- Update the README with a concise Quick Start section showing how to:
- A fork with all changes committed.
- A Pull Request containing:
- Inline comments on each workflow and chart explaining your implementation
- A brief PR description summarizing testing steps and outcomes
Good luck!