A shuttle application to move ConfigMaps
into Kapacitor. This uses the informer framework for watch notification against the Kubernetes API.
Lead Maintainer: Lam Chan
Kapacitor is a data calculator designed around TICK script. These scripts can be used to create alerts and events based off of custom thresholds. Currently, there is no absolute way to set up the TICK environment. Kubernetes allows for easy boot strapping of containers into a hosting environment. But there is no easy way to feed Kapacitor TICK scripts to scale containers per deployment. Also, the subscription binding mechanism between Kapacitor and InfluxDB is less than desirable with the lack of orphaned subscription cleanup. This controller is a solution to solve these sets of problem
In short, this controller listens to the Kubernetes State for ConfigMap
changes. Any changes will be replicated to Kapacitor.
- Delete all InfluxDB subscriptions
- Any subscriptions that are still used will automatically regenerate
- On start, collects all filtered
ConfigMaps
from Kubernetes- Filtered applied is base on
prefix
name matching on theConfigMap
name property
- Filtered applied is base on
- The initial list of
ConfigMaps
are upserted to Kapacitor as task - All future
ConfigMap
changes are listened on and translated to the appropriate create, update, delete task comands to Kapacitor. - When Kapacitor falls over and loses all tasks when new container is started
- Will detect the fall over and reseed kapacitor with desired state from config map
- Will remove all InfluxDB subscriptions to ensure no subscriptions are orphaned.
This installation guide assumes go
and glide
is installed
go get github.com/xogroup/kapacitor-configmap-listener
cd $GOPATH/src/github.com/xogroup/kapacitor-configmap-listener
glide install
go build
Or using Docker
docker pull xogroup/kapacitor-configmap-listener
kapacitor-configmap-listener -kapacitorurl http://xyz.com:9092
# or
KAPACITOR_URL=http://xyz.com:9092 kapacitor-configmap-listener
Or using Docker
docker run -d xogroup/kapacitor-configmap-listener -kapacitorurl http://xyz.com:9092
# or
docker run -d -e KAPACITOR_URL=http://xyz.com:9092 xogroup/kapacitor-configmap-listener
Look at the Diagrams.
See the API Reference.
We love community and contributions! Please check out our guidelines before making any PRs.
- Clone this project and
cd
into the project directory - Run the commands below
glide install
go build