You'll need a Kubernetes cluster to run against. Use KIND for local development, or point at a remote cluster via your kubeconfig.
Install: Go, Docker, kind, kubectl, task
- Clone the repository and initialize the build submodule:
git clone https://github.com/openmcp-project/metrics-operator
cd metrics-operator
git submodule update --init- Configure a DataSink for local testing. Copy the example and fill in your credentials:
cp examples/datasink/basic-datasink.yaml examples/datasink/dynatrace-prod-secret.yaml
# edit dynatrace-prod-secret.yaml with your endpoint and credentialsThe
*.secret.yamlpath is in.gitignore— safe to put real credentials here locally.
- Set up a local kind cluster with all CRDs, Crossplane, and sample resources:
task dev:local:all- Run the operator locally:
task run- Check your data sink for incoming metrics.
| Command | Description |
|---|---|
task dev:local:all |
Set up local kind cluster with CRDs, Crossplane, sample resources |
task run |
Run the operator locally |
task dev:clean |
Delete the local kind cluster |
task test |
Run all Go tests |
task generate |
Regenerate CRDs and deepcopy code after API changes |
task validate:lint |
Run golangci-lint |
Run task with no arguments for the full list of available tasks.