The contents of this repository has moved to https://github.com/projectriff/riff/tree/master/function-controller
The function controller runs inside kubernetes and continuously monitors the function and topic custom resource definitions for changes. It then reacts by requesting the deployment of functions, and scales them according to new events being detected on their input topics.
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/function-controller src/github.com/projectriff/function-controller
-
To build locally (this will produce a binary named
function-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
function-controller
running inside k8s:make debug-dockerize
Then expose the
2345
port as a service, usingriff/config/delve/function-controller-debug.yaml
:kubectl apply -f riff/config/delve/function-controller-debug.yaml
Then you can connect the debugger through port
30102
.