GithubHelp home page GithubHelp logo

isabella232 / consul2calico Goto Github PK

View Code? Open in Web Editor NEW

This project forked from taboola/consul2calico

0.0 0.0 0.0 606 KB

Sync Consul registry to Calico GlobalNetworkSet

License: Apache License 2.0

Dockerfile 1.67% Go 98.33%

consul2calico's Introduction

Go Report Card

Consul Calico Sync

Overview

This project will sync/configure calico network policies based on consul KV state.

It will allow ingress/egress traffic from nodes registered in consul to deployments running on kubernetes .

Whenever a node is added to the Hostgroup / rebuilt / changes ip , this project will dynamically change the corresponding calico GlobalNetworkSet.

Getting Started Running with Helm

  1. Create ETCD secret:

    kubectl create secret generic etcd-cert \
    --from-file=etcd-ca.crt=./etcd-ca.crt.txt \
    --from-file=etcd.crt=./etcd.crt.txt \
    --from-file=etcd.key=./etcd.key.txt 
  2. Build docker image :

    docker build -t consul-calico-sync:0.0.1 .
  3. Push to local repository :

    docker push  http://local-repo:8080/consul-calico-sync:0.0.1 .
  4. Change image in values.yaml

    # The name (and tag) of the Docker image for consul2calico sync.
    image:
    repository: http://local-repo:8080/consul-calico-sync
    pullPolicy: Always
    tag: 0.0.1
  5. Install chart

    helm install -n consul-calico-sync -c ./charts/ --namespace namespace

How to run tests :

Defaults configured for tests : CALICO_SYNC_INTERVAL=2s CALICO_REMOVE_GRACE_TIME=30m

  • With logs :

    go test  ./...
  • Without logs :

    go test  ./... -v

Future releases

  • Add support for Kubernetes API datastore . (Currently this project support Calico deployments with etcd as datastore)
  • Add support for consul TLS .

consul2calico's People

Contributors

baraklevi avatar shalevpenker97 avatar zamog avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.