Comprehensive DevOps Enhancements: Kubernetes Deployment, CI/CD, and Local Development Improvements#1
Merged
Merged
Conversation
…repositories; implement transaction middleware for improved database operations
…ironment configuration; refactor deployment files to use them
…c path replacement
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Key changes include:
.yamlfiles) are added for deploying core services (LocalStack, Grafana, Keycloak, Mailcatcher, Postgres, Prometheus, Redis, and the main application/worker services) as StatefulSets and Deployments.deploy-kubernates.shscript for automated deployments and dynamic path replacement./api/metrics.Dockerfilefor multi-stage Go builds, updateddocker-compose.ymlfor 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.