This directory contains all RAINBOW's Kubernetes controllers and CRDs written in Go, except for the scheduler.
There are some RAINBOW-specific data structures that are used in the controllers (see docs for further details):
- Service Graph
- Node Topology Graph
The testbed found in hack/kind-cluster uses kind to create a local Kubernetes cluster in Docker containers.
Any other Kubernetes cluster may be used as well - it only needs to be set as the current context in kubectl
.
To run the RAINBOW controller in the testbed, execute the following steps:
-
Open a terminal in the folder hack/kind-cluster and run
# Creates a test cluster consisting of 4 nodes and a private Docker registry. ./start-kind-cluster.sh
-
To build the controller, open a terminal in the
go
root directory of this repository and runmake
-
Apply all CRDs by running
make install
-
Run the controller locally:
cd bin ./manager
-
Optionally, apply the sample resources to the cluster by opening a terminal in the
go
directory and runningkubectl apply -f ./config/samples
Directory | Contents |
---|---|
apis |
Go types for the CRDs. |
config |
Deployment manifests, CRDs, configuration, and example files. |
controllers |
Kubernetes controllers for the CRDs. |
hack |
Scripts and code generation templates. |
internal |
Types and functions for internal use only. |
pkg |
Types and functions that can be reused by other projects. |