The contents of this repository has moved to https://github.com/projectriff/riff/tree/master/topic-controller
The topic controller runs inside kubernetes and continuously monitors the topic custom resource definitions for changes. It reacts by creating new topics (with given characteristics such as number of partitions) in the messaging broker.
The following tools are required to build this project:
-
make
-
Docker
-
Glide for dependency management
If you intend to re-generate mocks for testing, install:
If you would like to run tests using the ginkgo
command, install:
cd $(go env GOPATH) #defaults to ~/go
git clone -o upstream https://github.com/projectriff/topic-controller src/github.com/projectriff/topic-controller
-
To build locally (this will produce a binary named
topic-controller
on your machine):make build
-
To build for docker (and deploy as part of the whole riff installation):
make dockerize
This assumes that your docker client is correctly configured to target the daemon where you want the image built.
-
To run tests:
make test
-
To attach a delve capable debugger (such as Goland) to a
topic-controller
running inside k8s:make debug-dockerize
Then expose the
2345
port as a service, usingriff/config/delve/topic-controller-debug.yaml
:kubectl apply -f riff/config/delve/topic-controller-debug.yaml
Then you can connect the debugger through port
30101
.