A simple Go service, which serves as an exercise bringing together the power of Golang, MongoDB, Kubernetes, Helm, Prometheus, and more!
- 🌐 Register:
/register
- POST your username and password to embark on your tech journey. - 🔐 Login:
/login
- Validate your password and prepare for the adventure. - 📋 List Users:
/listusers
- Discover the vibrant community of registered usernames. - ❤️ Health Check:
/health
- Ensure the heartbeat of the database with a liveness probe. - 📈 Metrics:
/metrics
- Revel in Prometheus instrumentation and monitor the heartbeat of your service.
Run the following command to build the go-auth Docker image:
make build
Enable the necessary Minikube addons and start Minikube with the following commands:
make initialize_minikube
This sets up Minikube with Ingress and starts it with specified resources.
Deploy go-auth and Prometheus locally using Helm:
make start_local
This command upgrades or installs Helm charts for go-auth and Prometheus in the go-auth
namespace.
To stop the local deployment, use the following command:
make uninstall
This will uninstall the go-auth and Prometheus Helm charts.
For a complete local test run, including building, Minikube initialization, and deployment, use:
make local_testrun
This command performs the build, initializes Minikube, and deploys go-auth and Prometheus.
- need to stop users from being able to register again through /register, instead only allow for changing password through /changepassword
- store users' data in a volume/storage