Skip to content
This repository has been archived by the owner on Mar 1, 2018. It is now read-only.

projectriff-archive/function-controller

Repository files navigation

The contents of this repository has moved to https://github.com/projectriff/riff/tree/master/function-controller

Function Controller Function Controller Status

Purpose

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.

Development

Prerequisites

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:

Get the source

cd $(go env GOPATH)   #defaults to ~/go
git clone -o upstream https://github.com/projectriff/function-controller src/github.com/projectriff/function-controller

Building

  • 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, using riff/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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published