forked from github-starred/docker-traefik-labels
add node timeout
This commit is contained in:
@@ -12,7 +12,9 @@ labels:
|
||||
- 192.168.18.12
|
||||
- 10.14.120.1
|
||||
# reload labels.nodes every {n} seconds (0 = disabled)
|
||||
interval: 60
|
||||
interval: 0
|
||||
# timeout in seconds for the connection to a Docker node
|
||||
timeout: 2.5
|
||||
rfc2136:
|
||||
# only nsupdate on entries which are different (remove existing entry)
|
||||
update-only: true
|
||||
|
||||
@@ -18,6 +18,7 @@ class Labels{
|
||||
#config = yaml.load(fs.readFileSync(`${process.env.APP_ROOT}/etc/config.yaml`, 'utf8'))?.labels;
|
||||
#defaults = {
|
||||
interval:0,
|
||||
timeout:2.5,
|
||||
tls:{
|
||||
ca:`${process.env.APP_ROOT}/ssl/ca.crt`,
|
||||
crt:`${process.env.APP_ROOT}/ssl/labels.crt`,
|
||||
@@ -75,6 +76,7 @@ class Labels{
|
||||
ca:this.#tls.ca,
|
||||
cert:this.#tls.crt,
|
||||
key:this.#tls.key,
|
||||
timeout:(this.#config?.timeout || this.#defaults.timeout)*1000
|
||||
});
|
||||
this.#nodes[node].labels = {ping:false, firstConnect:init};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user