Conversation
This change upgrades the Node.js version used in the CI/CD pipeline from 18 to 22. This ensures compatibility with the latest dependencies and leverages any performance improvements or new features offered by Node.js 22.
Separates the frontend and backend into distinct Docker images and updates the CI/CD pipeline to build and push these images individually. The Kubernetes deployment configuration is also updated to deploy both images. This allows for independent scaling and deployment of the frontend and backend.
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the CI/CD pipeline to support separate frontend and backend deployments instead of a monolithic approach. The changes split the Docker image building process into frontend and backend components and update the Kubernetes deployment accordingly.
- Split the single Docker build job into separate frontend and backend build jobs
- Updated Kubernetes deployment to use two containers instead of one
- Upgraded Node.js version from 18 to 22 in the CI pipeline
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| kubernetes/deployment.yaml | Updated to deploy separate frontend and backend containers with distinct image variables |
| .github/workflows/ci-cd.yml | Split Docker build process into separate jobs for frontend and backend, updated Node.js version |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| - image: ${FRONTEND_IMAGE} | ||
| name: mentora-frontend | ||
| imagePullPolicy: Always | ||
| ports: | ||
| - containerPort: 80 | ||
| env: | ||
| # Add frontend environment variables here if needed | ||
| - name: NODE_ENV | ||
| value: "production" |
There was a problem hiding this comment.
Running both frontend and backend containers in the same pod violates Kubernetes best practices. Each service should have its own deployment for independent scaling, updates, and resource management. Consider creating separate deployments for frontend and backend services.
This commit separates the application into distinct frontend and backend deployments. - Creates a new `mentora-frontend` service and deployment, serving static assets on port 80. - Configures resource requests and limits, liveness and readiness probes for the `mentora-backend` deployment. - Sets `NODE_ENV` to "production" for the backend.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| ports: | ||
| - containerPort: 80 | ||
| env: | ||
| # Add frontend environment variables here if needed |
There was a problem hiding this comment.
This comment suggests incomplete configuration. Either remove the placeholder comment or add the necessary environment variables for the frontend.
| # Add frontend environment variables here if needed |
No description provided.