rancher1.x-restarting-controller

command module
v0.0.0-...-635b6f0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2018 License: MIT Imports: 9 Imported by: 0

README

Rancher1.x Restart Action Controller

A controller of Rancher1.x to manage the restart action of container.

    

  

References

Rancher version supported

How to use this image

  • This controller is deployed on each "Environment" (as same as "Infrastructure") and labeled by io.rancher.container.create_agent=true, io.rancher.container.agent.role=environment, it will detect the stopped status of each "Container".
  • By default, this controller have 300 intolerable seconds, which means it can allow one "Container" to be restarted below 3 times during the 300 seconds.
  • If one "Container" has been labeled by io.rancher.restarting_controller.ignore=true, this controller will never manage it.
Running parameters
$ rancher-restarting-controller -h
NAME:
   rancher-restarting-controller - A controller of Rancher1.x to manage the restart action of container.

USAGE:
   rancher-restarting-controller [global options] command [command options] [arguments...]

...

COMMANDS:
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
 --cattle_url value            The URL of Rancher Server API, e.g. http://127.0.0.1:8080 [$CATTLE_URL]
 --cattle_access_key value     The access key for Rancher API [$CATTLE_ACCESS_KEY]
 --cattle_secret_key value     The secret key for Rancher API [$CATTLE_SECRET_KEY]
 --log_level value             Set the logging level (default: "debug") [$LOG_LEVEL]
 --intolerable_interval value  How many seconds can not be tolerated (default: 300) [$INTOLERABLE_INTERVAL]
 --tolerable_counts value      The number of restarts that can be tolerated in an interval that can not be tolerated (default: 3) [$TOLERABLE_COUNTS]
 --ignore_label value          Set the ignoring label (default: "io.rancher.restarting_controller.ignore") [$IGNORE_LABEL]
 --help, -h                    show help
 --version, -v                 print the version

Start an instance

To start a container, use the following:

$ docker run -d --name test-rrc -p 9173:9173 -e CATTLE_URL=<cattel_url> -e CATTLE_ACCESS_KEY=<cattel_ak> -e CATTLE_SECRET_KEY=<cattel_sk> maiwj/rancher1.x-restarting-controller

License

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL