Developer Overview
The main power of ConfigHub comes through building tools and platforms on top of it.
The ConfigHub SDK is available on GitHub: https://github.com/confighub/sdk
It is primarily written in Go: https://pkg.go.dev/github.com/confighub/sdk
Within the SDK, ConfigHub has several surfaces you can build on:
- API
- Go client library: generated client and non-generated helpers
- Javascript SDK and Typescript RTK query library
- Functions
The CLI source is included in the SDK also, as an example API client. The CLI reference can be found on the left and the CLI usage overview can be found among the guides.
The API and client libraries are for building tools, UI surfaces, and other external clients that call ConfigHub.
There are multiple ways to extend ConfigHub with your own code.
Tools call ConfigHub's API and perform essentially arbitrary automation tasks. CLIs are a good form factor for use by AI agents. Examples:
- CLIs
- Namespace manager
- Network policy manager
- RBAC manager
- EKS manager
- EKS inference stack installer
- Score translator
- Workload manager
- Autoscale manager
- Observability manager
- Scheduling manager
- Web tools
- RBAC manager
- Security scanner
- Cost manager
- Fleet data explorer
Functions change, validate, and extract data from configuration data in ConfigHub. They run synchronously and mostly hermetically, either built into ConfigHub or in a Worker you run. They can be invoked on demand or automatically by Triggers, and they operate on ConfigHub's converted intermediate representation, so many support multiple ToolchainTypes. Functions are the right choice for anything that reads or transforms resources and/or application configuration documents independently. Examples:
- Hello World function example
- Kyverno CLI validation function
- Kyverno admission webhook validation function
- OPA Gatekeeper admission webhook validation function
- Kubescape validation function
- Kube-linter validation function
- Kube-score validation function
- Kubepug validation function
Event consumers react to things that happen. ConfigHub records actions in an append-only event log — a Release was published, a function ran — and a consumer subscribes and does something in response: trigger a deployment, post a notification, synchronize an external system. Consumers are pure readers that authenticate as a Worker. They are the right choice for anything that needs to happen after ConfigHub does something. Examples:
Deploying configuration is none of these. Configuration reaches live infrastructure by being published as a Release that a GitOps operator pulls — see integrating with GitOps operators.