A lightweight Kubernetes resource management service that provides HTTP API endpoints for managing Helm chart installations.
This service provides RESTful API endpoints to manage Helm chart deployments on Kubernetes clusters. It's built with Go and uses the Gin web framework for HTTP routing and Helm v3 SDK for chart management.
- RESTful API for Helm chart installation
- Graceful shutdown handling
- Request timeout and context cancellation support
- Input validation and comprehensive error handling
- Health check endpoints
- Structured logging
- Static binary compilation for containerized deployments
- Go 1.26 or later
- Kubernetes cluster access
- Helm v3
# Clone the repository
git clone https://github.com/memenow/memenow-resource-manager.git
cd memenow-resource-manager
# Build the binary
make build
# Run the service
./build/memenow-resource-manager# Build Docker image
make container
# Run the container
docker run -p 8080:8080 ghcr.io/memenow/memenow-resource-manager:latestThe service can be configured using environment variables:
PORT: HTTP server port (default:8080)GIN_MODE: Gin framework mode (debug,release,test)HELM_DRIVER: Helm storage driver (e.g.,secret,configmap)
Check if the service is running:
GET /ok
GET /healthResponse:
{
"status": "healthy",
"message": "Service is running"
}Get build version and metadata:
GET /versionResponse:
{
"version": "8aa2e00-dirty",
"gitCommit": "8aa2e00",
"buildTime": "2025-11-06_17:41:37"
}Install a Helm chart to a Kubernetes namespace:
POST /v1/create?chart=<chart-path>&namespace=<namespace>&release=<release-name>Parameters:
chart: Path to the Helm chartnamespace: Kubernetes namespace for the releaserelease: Name for the Helm release
Success Response (200 OK):
{
"status": "success",
"message": "Helm chart installed successfully",
"release": "my-release"
}Error Response (400 Bad Request):
{
"error": "Missing required parameter: chart"
}Error Response (500 Internal Server Error):
{
"error": "Failed to install Helm chart",
"message": "detailed error message"
}# Format code
make fmt
# Run linter
make lint
# Run tests
make test
# Build binary
make build
# Run all quality checks and build
make all# Run tests
make test
# Run tests with coverage
make test-coverageThe project uses several tools to maintain code quality:
gofmt: Code formattinggo vet: Static analysisgolangci-lint: Comprehensive linting
Install development tools:
make install-toolsmake build- Build the binarymake clean- Remove build artifactsmake test- Run testsmake lint- Run lintermake fmt- Format codemake vet- Run go vetmake container- Build Docker imagemake container-push- Build and push Docker imagemake all- Run all quality checks and buildmake help- Show available targets
-
HTTP Server (
cmd/main.go)- Gin-based HTTP server
- Request routing and validation
- Graceful shutdown handling
- Context management for timeouts
-
Helm Operator (
operator/operator.go)- Helm chart installation logic
- Context-aware operations
- Error handling and validation
- Release verification
.
├── cmd/
│ └── main.go # Application entry point
├── operator/
│ └── operator.go # Helm operations
├── build/
│ └── Dockerfile # Container image definition
├── go.mod # Go module dependencies
├── Makefile # Build automation
└── README.md # This file