Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to pull data from multiple docker endpoints (e.g. swarm) #548

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ Options:
config files with template directives. Config files will be merged if this option is specified multiple times. (default [])
-endpoint string
docker api endpoint (tcp|unix://..). Default unix:///var/run/docker.sock
-swarm-node value
docker api endpoints from which to listen for events. Default equals to value of `endpoint` argument
-interval int
notify command interval (secs)
-keep-blank-lines
Expand Down
3 changes: 3 additions & 0 deletions cmd/docker-gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ var (
interval int
keepBlankLines bool
endpoint string
swarmNodes stringslice
tlsCert string
tlsKey string
tlsCaCert string
Expand Down Expand Up @@ -106,6 +107,7 @@ func initFlags() {
flag.IntVar(&interval, "interval", 0, "notify command interval (secs)")
flag.BoolVar(&keepBlankLines, "keep-blank-lines", false, "keep blank lines in the output file")
flag.StringVar(&endpoint, "endpoint", "", "docker api endpoint (tcp|unix://..). Default unix:///var/run/docker.sock")
flag.Var(&swarmNodes, "swarm-node", "swarm node api endpoint (tcp|unix://..).")
flag.StringVar(&tlsCert, "tlscert", filepath.Join(certPath, "cert.pem"), "path to TLS client certificate file")
flag.StringVar(&tlsKey, "tlskey", filepath.Join(certPath, "key.pem"), "path to TLS client key file")
flag.StringVar(&tlsCaCert, "tlscacert", filepath.Join(certPath, "ca.pem"), "path to TLS CA certificate file")
Expand Down Expand Up @@ -174,6 +176,7 @@ func main() {

generator, err := generator.NewGenerator(generator.GeneratorConfig{
Endpoint: endpoint,
SwarmNodes: swarmNodes,
TLSKey: tlsKey,
TLSCert: tlsCert,
TLSCACert: tlsCaCert,
Expand Down
Loading