Skip to content

gigapi/gigapi-operator

Repository files navigation

GigAPI Kubernetes Operator

A Kubernetes Operator for managing GigAPI clusters on Kubernetes.

Overview

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.

Features

  • 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

CRD Spec Summary

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.

Quickstart (Development)

Prerequisites

  • Go (>=1.21)
  • kubebuilder
  • Docker
  • Access to a Kubernetes cluster (kind, minikube, or real cluster)

1. Install CRDs

make install

2. Run the Operator Locally

make run

3. Apply a Sample GigAPI Resource

kubectl apply -f config/samples/gigapi_v1alpha1_gigapi.yaml

4. Verify Resources

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.

Deploying in Cluster

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

Configuration Reference

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

Troubleshooting

  • Check operator logs: make run or kubectl 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

Next Steps

  • Add status reporting and health checks
  • Tune resource templates for production
  • Contribute improvements via PRs!

Resources


This project is under active development. Feedback and contributions welcome!

About

WIP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published