==========================
Straw is an etcdshim that consume event from transport instead of etcd. Which enable your Kubernetes to List/Watch
resources through the straw.
- Runs an informer to consume(
List/Watch
) resources from a transport - Implements an etcdshim to translate the transport to etcd API
- Initializes a Provider to send data to the transport
- List and watch resources from etcd to local cache
- Send resources from the cache to transport
- Resend cache data to transport periodically
Build a multi-cluster management prototype based on the above implementation. It can achieve the following goals:
- Deploy a resource(
deployment
) on thecluster1
namespace ofhub
- The resource(
deployment
) is propagated tocluster1
bytransport
- Report the resource status(
deployment.Status.AvailableReplicas
) oncluster1
tohub
(add anAvailableReplicas
annotation to the originaldeployment
) throughtransport
To run a sample MQTT broker using docker:
docker run -it --rm --name mosquitto -p 1883:1883 eclipse-mosquitto:2.0 mosquitto -c /mosquitto-no-auth.conf
# with config
# docker run -it --rm --name mosquitto -p 1883:1883 -v `pwd`/resource/mosquitto.conf:/mosquitto/config/mosquitto.conf eclipse-mosquitto
# Build binary
make build
# reflector from hub
./bin/reflector --broker 127.0.0.1:1883 --client-id hub-cluster-id --send-topic /event/signal --receive-topic /event/payload