Skip to content

monder/rkt-sidekick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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