A Go-based REST API that serves resume/CV data from PostgreSQL.
- RESTful API for resume data
- PostgreSQL database for storage
- Containerized with Docker
- Kubernetes deployment with Helm
- External access via Gateway API (HttpRoute)
- Go 1.21+
- PostgreSQL 15+
- Docker (optional, for containerized database)
- Clone the repository
- Copy the example environment file:
cp .env.example .env
- Edit the
.env
file with your specific settings - Start the database:
make dev-db
- Apply migrations:
make migrate-up
- Run the API:
go run cmd/api/main.go
For more detailed development instructions, see docs/development.md.
Build and run the Docker image:
docker build -t resume-api .
docker run -p 8080:8080 resume-api
The application can be deployed to Kubernetes using the provided Helm chart:
# Install the chart
helm install resume-api ./deployments/helm/resume-api
# Upgrade an existing installation
helm upgrade resume-api ./deployments/helm/resume-api
# Uninstall the chart
helm uninstall resume-api
The Helm chart includes support for external access using the Gateway API. This requires the Gateway API CRDs to be installed on your cluster.
The chart creates:
- A Gateway resource that defines the entry point to the cluster
- An HttpRoute resource that routes traffic to the resume-api service
To configure the Gateway and HttpRoute, edit the values in values.yaml
:
gateway:
enabled: true
name: resume-api-gateway
namespace: default
className: istio
listeners:
- name: http
port: 80
protocol: HTTP
allowedRoutes:
namespaces:
from: Same
httpRoute:
enabled: true
name: resume-api-route
hostnames:
- "resume-api.example.com"
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: resume-api
port: 8080
For more information about the Helm chart, see deployments/helm/resume-api/README.md.
Run the tests:
# Run all tests
make test
# Run tests without database dependencies
make test-short
This project is licensed under the MIT License - see the LICENSE file for details.