Automated Infrastructure Connection Practices
This repository includes the Conn3ction prototype - a minimal DNS and region-aware system implementing CoreDNS + etcd + a simple DNS API with Helm charts.
- Go 1.21+ (for building the API)
- Docker (for building images)
- Kubernetes cluster (minikube, kind, or cloud provider)
- kubectl
- Helm 3.x
- dig (for testing DNS)
cd prototype/api
go build -o conn3ction-api .cd prototype/api
docker build -t conn3ction-api:latest .For kind clusters:
./prototype/scripts/build-and-load.shDeploy etcd and CoreDNS:
helm install coredns-etcd ./prototype/charts/coredns-etcd/Deploy the API service:
helm install conn3ction-api ./prototype/charts/api/ \
--set etcd.enabled=true \
--set etcd.endpoints="coredns-etcd-etcd-0.coredns-etcd-etcd:2379"kubectl apply -f prototype/k8s/etcd-statefulset.yaml
kubectl apply -f prototype/k8s/coredns-deployment.yaml
kubectl apply -f prototype/k8s/api-deployment.yamlPort-forward the API service:
kubectl port-forward svc/conn3ction-api 8080:8080Test health endpoint:
curl http://localhost:8080/healthzCreate a DNS record:
curl -X POST http://localhost:8080/records \
-H "Content-Type: application/json" \
-d '{"name":"app.example.local","type":"A","values":["10.1.2.3"],"ttl":60}'List records:
curl http://localhost:8080/recordsUse the test script:
./prototype/scripts/test-dns.shOr manually with port-forward:
kubectl port-forward svc/coredns 5353:53
dig @localhost -p 5353 app.example.localGET /healthz- Health check (returns 200 OK)GET /records- List all DNS recordsPOST /records- Create a DNS recordPUT /records/{name}- Update a DNS recordDELETE /records/{name}- Delete a DNS recordGET /records/{name}- Get a specific DNS record
ETCD_ENDPOINTS- Comma-separated etcd endpoints (optional, uses in-memory store if not set)ETCD_PREFIX- Key prefix for records (default:/conn3ction/records/)
See prototype/charts/api/values.yaml and prototype/charts/coredns-etcd/values.yaml for configuration options.
See CONN3CTION_ARCHITECTURE.md for detailed architecture documentation.
Run the API locally:
cd prototype/api
go run .Run with etcd (requires etcd running locally):
export ETCD_ENDPOINTS="localhost:2379"
go run .Run tests:
cd prototype/api
go test -v ./...- Implement RBAC for API authentication and authorization
- Add persistence hardening for production deployments
- Integrate with region-manager for multi-region awareness
- Add support for additional DNS record types (CNAME, SRV, TXT)
- Implement geographic routing capabilities
- Add Prometheus metrics and monitoring
- Enable DNSSEC support
prototype/
├── api/ # Go API service
│ ├── main.go # Application entry point
│ ├── handlers.go # HTTP handlers
│ ├── store.go # Storage implementations
│ ├── go.mod # Go module definition
│ └── Dockerfile # Container image
├── charts/ # Helm charts
│ ├── api/ # API service chart
│ └── coredns-etcd/ # CoreDNS + etcd chart
├── k8s/ # Kubernetes manifests
│ ├── api-deployment.yaml
│ ├── etcd-statefulset.yaml
│ └── coredns-deployment.yaml
└── scripts/ # Helper scripts
├── build-and-load.sh
└── test-dns.sh
When contributing to the Conn3ction prototype:
- Ensure Go code is formatted with
gofmt - Run
go vetto check for issues - Test locally before submitting PRs
- Update documentation for new features
See repository license file for details.