Skip to content

Comprehensive DevOps Enhancements: Kubernetes Deployment, CI/CD, and Local Development Improvements#1

Merged
tuhin47 merged 21 commits into
mainfrom
feature/GE4-21-Actions
Aug 19, 2025
Merged

Comprehensive DevOps Enhancements: Kubernetes Deployment, CI/CD, and Local Development Improvements#1
tuhin47 merged 21 commits into
mainfrom
feature/GE4-21-Actions

Conversation

@tuhin47

@tuhin47 tuhin47 commented Aug 19, 2025

Copy link
Copy Markdown
Owner

Key changes include:

  • Kubernetes Deployment: New Kubernetes manifests (.yaml files) are added for deploying core services (LocalStack, Grafana, Keycloak, Mailcatcher, Postgres, Prometheus, Redis, and the main application/worker services) as StatefulSets and Deployments.
  • Configuration Management: Kubernetes ConfigMaps and Secrets are implemented for environment variable and sensitive data management, supported by a new deploy-kubernates.sh script for automated deployments and dynamic path replacement.
  • Observability: Grafana and Prometheus deployments are introduced, with Prometheus configured to scrape application metrics at /api/metrics.
  • Local Development & CI/CD: A new Dockerfile for multi-stage Go builds, updated docker-compose.yml for service alignment, and a GitHub Actions workflow (go-build.yml) for CI/CD are included. Scripts for Minikube setup (minikube.sh), port-forwarding (port_forward.sh), and AWS environment export (aws_export.sh) enhance local development.
  • Networking: NGINX Ingress controller and an Ingress resource are added to manage external access to services via specific paths.

tuhin47 added 21 commits August 12, 2025 23:20
…repositories; implement transaction middleware for improved database operations
…ironment configuration; refactor deployment files to use them
Introduce Kubernetes deployment configurations for the main application (`app`) and background worker (`worker`).

- Create `k8/app.yaml` and `k8/worker.yaml` to define Deployments and Services for the respective components, utilizing pre-built Docker images.
- Update `k8/secrets.yaml` to include `TELEGRAM_TOKEN` and `GEMINI_KEY` for use in Kubernetes deployments.
- Modify `docker-compose.yml` to specify explicit image names for `go-nms` and `go-nms-worker`, aligning with the images used in Kubernetes, and make minor adjustments to local development settings.

This change enables deploying the application and worker components to a Kubernetes cluster.
*   Add support for populating Kubernetes ConfigMaps from `.env` in `deploy-kubernates.sh`.
*   Update `docker-compose.yml` to use `go-nms` image for the worker and add `app` service dependency.
*   Switch to `app-config-prod.json` for SSM configuration upload.
*   Add `TELEGRAM_ENABLED` environment variable to worker Kubernetes deployment.
*   Improve `port_forward.sh` by explicitly mapping ports.
*   Update `.gitignore` to include new config files.
…nment setup

- Add environment variable override for GEMINI_KEY and TELEGRAM_TOKEN in deploy script
- Implement config-server deployment waiting and configuration copying
- Create AWS LocalStack setup script for SSM parameter management
- Simplify port forwarding by removing SSH tunneling
- Optimize Docker build by moving go mod operations before source copy
- Replace bash with sh in curl command execution for better compatibility
- Deploy the NGINX Ingress Controller and define initial ingress rules.
- Configure Keycloak to use a relative path (`/keycloak`) for ingress routing.
- Adjust Prometheus and Grafana configurations for compatibility with ingress.
- Add a `--del` option to `deploy-kubernates.sh` for comprehensive resource deletion.
- Update existing Kubernetes manifests to align with ingress-based external access.
- Add `minikube.sh` script for consistent Minikube cluster setup, including resource allocation and host directory mounting.
- Hide `APISecret` from JSON serialization in `models/ai.go` to prevent accidental exposure of sensitive keys.
- Expand `prometheus.yml` with comprehensive query examples for HTTP performance, Go runtime, and process metrics, aiding in monitoring and dashboard creation.
Move service-specific environment variables from the shared `nms-config` ConfigMap to the `env` section of their respective Kubernetes deployments.
@tuhin47 tuhin47 merged commit 899865e into main Aug 19, 2025
2 checks passed
@tuhin47 tuhin47 deleted the feature/GE4-21-Actions branch August 19, 2025 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant