GithubHelp home page GithubHelp logo

isabella232 / route-override-cni Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openshift/route-override-cni

0.0 0.0 0.0 19.69 MB

CNI plugin to override routes

Dockerfile 0.80% Shell 2.45% Go 96.75%

route-override-cni's Introduction

route-override: Meta CNI plugin for overriding IP route

Travis CI

Overview

route-override IPAM works as meta CNI plugin to override IP route given by previous CNI plugins. It is useful in a case with network-attachment-definition.

Supported runtime

Currently route-override verified its feature with podman and crio(with Kubernetes).

Download

Binaries (for 386/amd64) are in Releases.

Install via daemonset

Installing using the provided daemonset will copy the route-override binary to the /opt/cni/bin on each machine in your Kubernetes cluster.

git clone https://github.com/redhat-nfvpe/cni-route-override.git && cd cni-route-override/
kubectl create -f deployments/daemonset-install.yaml

Example Configuration

{
    "cniVersion": "0.3.0",
    "name" : "mymacvlan",
    "plugins": [
    {
        "type": "macvlan",
        "master": "eth1",
        "mode": "bridge",
        "ipam": {
            ...
        }
    },
    {
        "type" : "route-override",
        "flushroutes" : true,
        "delroutes": [
        {
            "dst": "192.168.0.0/24"
        }],
        "addroutes": [
        {
            "dst": "192.168.0.0/24",
            "gw": "10.1.254.254"
        }]
    }
    ]
}

Configuration Reference

  • type: (string, required): "routing-override"
  • flushroutes: (bool, optional): true if you flush all routes.
  • flushgateway: (bool, optional): true if you flush default route (gateway).
  • delroutes: (object, optional): list of routes add to the container namespace. Each route is a dictionary with "dst" and optional "gw" fields. If "gw" is omitted, value of "gateway" will be used.
  • addroutes: (object, optional): list of routes add to the container namespace. Each route is a dictionary with "dst" and optional "gw" fields. If "gw" is omitted, value of "gateway" will be used.
  • skipcheck: (bool, optional): true if you want to skip CNI's check command. Please set true if you will change routes after its launch

Process Sequence

route-override will manipulate the routes as following sequences:

  1. flush routes if flushroutes is enabled.
  2. flush gateway if flushgateway is enabled.
  3. delete routes in delroutes if delroutes has route and the route is exists in routes.
  4. add routes in addroutes if addroutes has route.

Supported Arguments

The following args conventions are supported:

  • flushroutes: (bool, optional): true if you flush all routes (except interface routes and link-local).
  • flushgateway: (bool, optional): true if you flush default route (gateway).
  • delroutes: (object, optional): list of routes add to the container namespace. Each route is a dictionary with "dst" and optional "gw" fields. If "gw" is omitted, value of "gateway" will be used.
  • addroutes: (object, optional): list of routes add to the container namespace. Each route is a dictionary with "dst" and optional "gw" fields. If "gw" is omitted, value of "gateway" will be used.

route-override-cni's People

Contributors

dougbtv avatar jupierce avatar openshift-bot avatar openshift-merge-robot avatar s1061123 avatar stevekuznetsov avatar yselkowitz 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.