Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 1.82 KB

File metadata and controls

53 lines (36 loc) · 1.82 KB

Local Development

You'll need a Kubernetes cluster to run against. Use KIND for local development, or point at a remote cluster via your kubeconfig.

Prerequisites

Install: Go, Docker, kind, kubectl, task

Quickstart

  1. Clone the repository and initialize the build submodule:
git clone https://github.com/openmcp-project/metrics-operator
cd metrics-operator
git submodule update --init
  1. 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 credentials

The *.secret.yaml path is in .gitignore — safe to put real credentials here locally.

  1. Set up a local kind cluster with all CRDs, Crossplane, and sample resources:
task dev:local:all
  1. Run the operator locally:
task run
  1. Check your data sink for incoming metrics.

Common Tasks

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.