Skip to content

Kubernetes checkly operator

Notifications You must be signed in to change notification settings

conduitxyz/checkly-operator

 
 

Repository files navigation

checkly-operator

Build and push

A kubernetes operator for checklyhq.com.

The operator can create checklyhq.com checks, groups and alert channels based of kubernetes CRDs and Ingress object annotations.

Documentation

Please see our docs for more details on how to install and use the operator.

Get involved

Join us on the #checkly-k8s-operator channel in the Checkly community Slack, where we're discussing everything related to the project. If you're interested in contributing, be sure to check out CONTRIBUTING.md for more details.

Development

direnv

We're using direnv to manage environment variables for this project (or export them manually and you can skip this step). Make sure you generate a checkly API key and you get the account ID as well.

touch .envrc
echo "export CHECKLY_API_KEY=foorbarbaz" > .envrc
echo "export CHECKLY_ACCOUNT_ID=randomnumbers" >> .envrc
direnv allow .

Makefile

Make sure your current kubectl context is set to the appropriate kubernetes cluster where you want to test the operator, then run

kubectl apply -f config/crd/bases/k8s.checklyhq.com_apichecks.yaml
kubectl apply -f config/crd/bases/k8s.checklyhq.com_groups.yaml
kubectl apply -f config/crd/bases/k8s.checklyhq.com_alertchannels.yaml
make run

If you update any of the types for the CRD, run

make manifests

and re-apply the CRD.

Testing the controller

Unit and integration tests

  • Make sure your kubectl context is set to your local k8s cluster
  • Run USE_EXISTING_CLUSTER=true make test
  • To see coverage run go tool cover -html=cover.out

Running locally

See docs for details.

Source material

Sources used for kick starting this project:

Versions

We're using the following versions of packages:

  • operator-sdk 1.37.0
  • golang 1.22

Tested with K8s v1.29.

About

Kubernetes checkly operator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 85.5%
  • Makefile 13.5%
  • Dockerfile 1.0%