- Go 96.5%
- Makefile 2.1%
- Starlark 0.7%
- Dockerfile 0.4%
- Shell 0.3%
|
|
||
|---|---|---|
| .devcontainer | ||
| .github/workflows | ||
| .zed | ||
| api | ||
| cmd | ||
| config | ||
| docs | ||
| hack | ||
| internal | ||
| test | ||
| .dockerignore | ||
| .gitignore | ||
| .golangci.yml | ||
| CLAUDE.md | ||
| codecov.yml | ||
| ctlptl-config.yaml | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| Makefile | ||
| mkdocs.yml | ||
| PROJECT | ||
| README.md | ||
| Tiltfile | ||
Cashu Mint Operator
A Kubernetes operator for running CDK mintd with a single CashuMint custom resource. The operator manages the mint Deployment, generated config, Services, optional PostgreSQL, backups, ingress/TLS, Orchard, metrics, and sidecars so users can operate a Cashu mint with standard Kubernetes workflows instead of hand-managed YAML.
Documentation
- Docs site: https://asmogo.github.io/cashu-operator/
- Overview:
docs/index.md - Getting started:
docs/getting-started.md - Deployment guide:
docs/deployment-guide.md - Payment processors:
docs/payment-processors.md - Sample catalog:
docs/samples.md - API reference:
docs/api-reference.md - Troubleshooting:
docs/troubleshooting.md
What the operator manages
Deployment,ConfigMap, andServicefor every mint- PVCs for SQLite, redb, and Orchard state
- Auto-provisioned PostgreSQL
Secret,Service, andStatefulSet - S3 backup
CronJoband restoreJobfor auto-provisioned PostgreSQL Ingressand optional cert-managerCertificate- Optional Orchard companion resources
- Optional management RPC TLS Secret generation
- Optional
PodMonitorwhen Prometheus metrics are enabled - Optional gRPC payment processor sidecars and LDK node sidecars
Quick start
Install the latest release:
kubectl apply -f https://github.com/asmogo/cashu-operator/releases/latest/download/install.yaml
Deploy the minimal sample:
kubectl create namespace cashu-mints
kubectl apply -n cashu-mints \
-f https://raw.githubusercontent.com/asmogo/cashu-operator/main/config/samples/mint_v1alpha1_cashumint_minimal.yaml
kubectl get cashumints -n cashu-mints -w
Access the mint:
kubectl -n cashu-mints port-forward svc/cashumint-minimal 8085:8085
curl http://localhost:8085/v1/info
Sample manifests
Development
Local development with Tilt + k3d
The recommended local workflow uses the dedicated k3d cluster defined in ctlptl-config.yaml.
make tilt-up
That command creates or updates a dedicated cashu-operator-dev k3d cluster with a local registry, switches kubectl to k3d-cashu-operator-dev, and starts Tilt against that context.
Once Tilt is running:
codegenregenerates manifests and deepcopy code when the API changes.unit-testsis available as a manual Tilt resource formake test.demo-mintis available as a manual Tilt resource to apply a minimalCashuMintfromconfig/dev/.demo-arkade-mintbuilds/Users/asm/git/cashu-arkade-lightning-procesor, importscashu-arkade-lightning-procesor:devinto k3d, and applies the Arkade processor demo fromconfig/dev/arkade/.
The Arkade demo image build defaults can be overridden with ARKADE_PROCESSOR_DIR,
ARKADE_PROCESSOR_IMAGE, ARKADE_PROCESSOR_DOCKERFILE, and
ARKADE_PROCESSOR_PLATFORM.
To inspect the demo mint after triggering demo-mint:
kubectl -n cashu-mints port-forward svc/cashumint-minimal 8085:8085
curl http://localhost:8085/v1/info
To inspect the Arkade processor demo after triggering demo-arkade-mint:
kubectl -n cashu-arkade port-forward svc/cashumint-arkade 8085:8085
curl http://localhost:8085/v1/info
To stop the local loop:
make tilt-down
make dev-cluster-delete
make build # Build controller binary
make run # Run controller locally against active kubeconfig
make dev-cluster-up # Create/update the dedicated local k3d dev cluster
make tilt-up # Start Tilt against the local k3d dev cluster
make tilt-down # Stop Tilt and remove Tilt-managed resources
make dev-reset # Tear down Tilt-managed resources and delete the dev cluster
make test # Run unit tests
make test-e2e # Run end-to-end tests (provisions Kind cluster)
make lint # Run golangci-lint
make manifests # Regenerate CRDs, RBAC, webhook configs
make generate # Regenerate DeepCopy methods
make build-installer # Generate dist/install.yaml
License
Apache 2.0 -- see LICENSE.