Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

raisingthefloor/monitoring-controller

Repository files navigation

monitoring-controller

Install CRDs into kubernetes that periodically monitor resources. Currently handles HTTP, but could be extended to handle more.

Data is exported as prometheus metrics, which may be used to send alerts.

CustomResourceDefinitions

Examples

See samples.

Available Metrics

See metrics.go.

Grafana Dashboard

The grafana dashboard may be found in the kustomize-based deployment repo.

Kubebuilder

This project uses kubebuilder as a way of generating code.

To install kubebuilder:

os=$(go env GOOS)
arch=$(go env GOARCH)

# download kubebuilder and extract it to tmp
curl -L https://go.kubebuilder.io/dl/2.3.1/${os}/${arch} | tar -xz -C /tmp/

sudo mv /tmp/kubebuilder_2.3.1_${os}_${arch}/bin/kubebuilder /usr/local/

Updating Existing Monitoring CRDs:

  1. update *_types.go file
  2. make manifests - generate CRD YAML in config/crd/bases/
  3. make generate - generate GO code

Adding New Monitoring CRDs

  1. kubebuilder create api --group monitoring.raisingthefloor.org --version v1alpha1 --kind [new kind]
  2. fill in api/v1alpha1/[new kind]_types.go
  3. implement controllers/[new kind]_controller.go
  4. make manifests generate

Development

This project uses KIND and tilt for rapid development.

For setup:

export KUBECONFIG=kind-kubeconfig.yaml

# Sets up a KIND cluster and a local registry connected to it
sh kind-up.sh

# start tilt. Hit space after to open tilt in your browser (recommended)
# Local changes will automatically be built and pushed to kube.
tilt up

# To shut down:
tilt down
sh kind-down.sh

About

kubernetes operator for monitoring services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published