- Go 98.9%
- Go Template 0.8%
- Just 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
* AGENTS.md: name the clusters this project runs in * internal/natscluster: pin Settled on a NatsCluster whose groups are led elsewhere Reproduces upeks-dev-us-east-2c, Ready=True and Settled=False/GroupsLeaderless: its servers report stream and consumer groups whose leader sits in another NATS cluster, so the merge records NamedLeader and leaves Leader empty. The fixtures are its three /jsz answers cut to what the observer reads for this case (the meta leader, account name and ID, stream and consumer names, raft group and leader), with every name replaced. |
||
| .github | ||
| api | ||
| charts/nats-operator | ||
| cmd | ||
| config | ||
| docs | ||
| hack | ||
| internal | ||
| .gitignore | ||
| .golangci.yml | ||
| .ko.yaml | ||
| AGENTS.md | ||
| CHANGELOG.md | ||
| CONTEXT.md | ||
| go.mod | ||
| go.sum | ||
| Justfile | ||
| LICENSE | ||
| README.md | ||
| SECURITY.md | ||
nats-operator
nats-operator is three Kubernetes controllers that deploy NATS clusters, own their auth plane, and manage and balance JetStream. You can install all three controllers or only the ones you need.
Controllers
- The cluster controller deploys a NATS cluster from a
NatsClusterand restarts it one server at a time. It also joins NATS clusters into a supercluster, or to a hub as leaves. - The auth controller creates the JWT auth plane, which is a NATS operator with its accounts and users, and distributes it to the servers.
- The JetStream controller manages streams, consumers, key-value buckets and object stores, and balances JetStream leadership and placement.
It works through a
NatsConnectionto any NATS cluster.
Install
You need Kubernetes 1.33, Helm 3.14 and nats-server 2.15.0, or later.
To install the CRDs and all three controllers, and then test the release, run these commands with <version> replaced by a release version, such as 0.1.1:
helm install nats-operator oci://ghcr.io/mikluko/nats-operator/charts/nats-operator \
--version <version> \
--namespace nats-operator --create-namespace
helm test nats-operator --namespace nats-operator --logs
To leave a controller out, set cluster.enabled, auth.enabled or jetstream.enabled to false.
Then follow the quickstart to deploy a NATS cluster with JetStream.
Documentation
The site documents main.
For a release, read docs/ at its tag.
- Install: prerequisites, install, upgrade and uninstall.
- Stories: the quickstart tutorial, then one guide per task.
- Reference: API, NATS permissions, telemetry, and the chart's values, flags and RBAC.
- Design and ADRs.
- Security: how to report a vulnerability, the trust boundaries, and how to verify a release.
Development
just generates, builds, tests and lints.
just envtest runs the tests that need an API server, and just e2e runs the stories on kind.
docs/README.md has the steps to build and check the documentation site.