Coder Social home page Coder Social logo

rkt-sidekick's Introduction

rkt-sidekick

Go Report Card license GitHub tag

An ACI that writes container ip address to etcd. That provides the more rkt-like approach to sidekick model implementation which comes in handy when using multihost network solutions such as flannel

Images

Signed ACIs for linux-arm64 are available at monder.cc/rkt-sidekick with versions matching git tags.

Usage

rkt run \
   --insecure-options=image \
   --net=flannel \
   docker://redis \
   monder.cc/rkt-sidekick:v0.1.0 -- -cidr 10.0.0.0/16 -format '{"host":"$ip", "port":3000}' /services/redis-a6f43b/ip

The script above will launch redis and a sidekick in the same pod. The sidekick will enumerate all network interfaces and write the first one matching 10.0.0.0/16 to the formatted string to /services/redis-a6f43b/ip

Please note how to pass arguments to multiple images: https://coreos.com/rkt/docs/latest/subcommands/run.html#passing-arguments

Other options

Usage: rkt-sidekick route53 [options] [ZONE_ID] [HOSTNAME]

Options:
    -cidr              cidr to match the ip (default: "0.0.0.0/0")  


Usage: rkt-sidekick etcd [options] [KEY_IN_ETCD]

Options:
    -cidr              cidr to match the ip (default: "0.0.0.0/0")
    -etcd-endpoint     an etcd address in the cluster (default: "http://172.16.28.1:2379")
    -format            format of the etcd key value. '$ip' will be replace by container's ip address (default: "$ip")
    -expire-dir        set expiration TTLs for all items under that directory, not only the leaf node
    -interval          refresh interval (default: "1m")

License

MIT

rkt-sidekick's People

Contributors

monder avatar

Watchers

 avatar  avatar

rkt-sidekick's Issues

flannel and etcd setup

would you please describe your flannel and etcd setup. Running etcd on the host and not within the flannel subnet is throwing errors.

optional format string

The user provides a etcd key and the sidekick stores the IP address in that location, however, skyDNS uses a JSON formatted value that include a TTL. It would be helpful if the RUN command could include the format of the value in the go template format or at least Printf() format string.

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.