A Kubernetes Operator for managing GigAPI clusters on Kubernetes.
The GigAPI Operator automates the deployment and management of GigAPI server and querier components, including persistent storage, configuration, and optional Redis metadata support. It ensures your GigAPI cluster is always running according to your desired spec.
- Declarative management of GigAPI clusters via CRD
- Automated StatefulSet, Service, PVC, ConfigMap, and Secret management
- Optional Redis deployment for distributed metadata
- Flexible configuration via environment variables
- Supports rolling updates and scaling
The GigAPI
custom resource supports:
- server/querier: Replica count, resource requests/limits
- storage: Size, storage class, access modes
- config: All GigAPI environment variables (see below)
- service: Service type and ports
- deployRedis: Optionally deploy Redis for metadata
See config/samples/gigapi_v1alpha1_gigapi.yaml
for a full example.
- Go (>=1.21)
- kubebuilder
- Docker
- Access to a Kubernetes cluster (kind, minikube, or real cluster)
make install
make run
kubectl apply -f config/samples/gigapi_v1alpha1_gigapi.yaml
kubectl get gigapi
kubectl get statefulsets,pods,svc,pvc,configmap,secrets
You should see StatefulSets, Services, PVC, ConfigMap, and Secret for your GigAPI cluster, and Redis if enabled.
To build and deploy the operator in your cluster:
make docker-build docker-push IMG=<your-repo>/gigapi-operator:latest
make deploy IMG=<your-repo>/gigapi-operator:latest
All GigAPI environment variables are supported via the config
field in the CRD:
GIGAPI_ROOT
,GIGAPI_MERGE_TIMEOUT_S
,GIGAPI_SAVE_TIMEOUT_S
,GIGAPI_NO_MERGES
,GIGAPI_UI
,GIGAPI_MODE
,GIGAPI_METADATA_TYPE
,GIGAPI_METADATA_URL
,HTTP_PORT
,HTTP_HOST
,HTTP_BASIC_AUTH_USERNAME
,HTTP_BASIC_AUTH_PASSWORD
,FLIGHTSQL_PORT
,FLIGHTSQL_ENABLE
,LOGLEVEL
,DUCKDB_MEM_LIMIT
,DUCKDB_THREAD_LIMIT
- Check operator logs:
make run
orkubectl logs deployment/gigapi-operator-controller-manager -n gigapi-operator-system
- Ensure your cluster has a default StorageClass for PVCs
- If Redis is enabled, check for the Redis StatefulSet and Service
- Add status reporting and health checks
- Tune resource templates for production
- Contribute improvements via PRs!
This project is under active development. Feedback and contributions welcome!