Welcome to our repository! This project focuses on a robust CI/CD pipeline using GitHub Actions, deploying applications to Google Kubernetes Engine (GKE) with the aid of Kustomize for manifest customization.
- Workflow Trigger
- Environment Setup
- CI/CD Pipeline
- Future Implementations and Enhancements
- Conclusion
- Contributing
- License
Our workflow is initiated when a pull request is merged into specific branches: main
, develop
, and main
. This ensures that the CI/CD process is initiated only when code changes are finalized and ready for deployment.
Before diving into the CI/CD steps, we set up environment variables. These variables, some fetched from GitHub secrets, provide necessary context and credentials for the subsequent steps.
- Checkout Code: The workflow starts by checking out the latest code from the repository.
- Authenticate with GCloud: To interact with Google Cloud services, the workflow authenticates using a service account key.
- Configure Docker for GCloud: This step ensures Docker can push images to Google's Artifact Registry.
- Build and Push Docker Image: The application is containerized and the resulting Docker image is pushed to the Artifact Registry.
- Setup Kustomize: Kustomize is downloaded and set up. It will be used later for customizing Kubernetes manifests.
- Get GKE Credentials: To deploy to GKE, the workflow fetches credentials for the Kubernetes cluster.
- Clone k8s-infra and Deploy: The
k8s-infra
repository, which contains Kubernetes manifests, is cloned using a deploy key. Then, Kustomize customizes the manifests, and the application is deployed to GKE.
- ArgoCD Integration: ArgoCD is a declarative, GitOps continuous delivery tool for Kubernetes.
- Enhanced Monitoring with Prometheus and Grafana: Get real-time metrics on application performance and set up alerts for any anomalies.
- Automated Testing with SonarQube: Continuous inspection of code quality.
- Infrastructure as Code with Terraform: Define and provide data center infrastructure using a declarative configuration language.
Our GitHub Actions workflow provides a robust foundation for CI/CD. By considering integrations like ArgoCD, Prometheus, Grafana, SonarQube, and Terraform, we can ensure a more efficient, scalable, and reliable deployment process.
This README.md
provides an overview of the project, its structure, and its goals. You can further customize it based on any additional sections or details you'd like to include.