Skip to content

Reload the services

A change to the endpointsOne IP address and port that a service gives, with its load balancing weight. See HTTP API. themselves, in DNS, in a file, in a remote list or in Kubernetes, needs no reloadReading the configuration file again to replace the services, on SIGHUP or POST /reload. See Reload the services., because Vigie reads the sourcesWhere a service reads its endpoints, one of dns, file, url or kubernetes. See Services and sources. again once the cache of the service expires. A reload is for a change to the services of the configuration file, such as a new service or another source.

A reload reads the file again and swaps all the services at once. When the new file is invalid, or one of its sources can’t be built, Vigie keeps every service it had. A reload also empties the cache.

A reload replaces services, with the cache.ttl they take. A change to server or log needs a restart, and so does a change to disable_reload_by_request.

Terminal window
vigie check-config -c /etc/vigie/config.yml

check-config refuses the keys it doesn’t know, where a reload ignores them, so a misspelled key would otherwise pass unnoticed.

Send SIGHUP to the process. It works whatever disable_reload_by_request says.

Terminal window
kill -HUP "$(pgrep -x vigie)"

With the systemd unit of the repository, ExecReload sends the signal:

Terminal window
sudo systemctl reload vigie

The signal gives no answer. The logs of Vigie tell the result. A reload that succeeds logs Services loaded, and one that fails logs an error line with read config or load services.

Terminal window
journalctl -u vigie -n 20

When disable_reload_by_request is false, the default, send a POST to /reload:

Terminal window
curl -s -X POST http://localhost:8080/reload

Vigie answers 200 with services reloaded, or 422 with services not reloaded: and the error, and then keeps the previous services.

Without server.basic_auth, anyone who reaches the port can make Vigie read the file again. When other hosts can reach the server, require a password, or turn the endpoint off and reload with the signal:

config.yml
disable_reload_by_request

disable_reload_by_request

Type boolean · Required no · Default false

Removes the POST /reload endpoint.

: true

/reload then answers 404. This change needs a restart.

A ConfigMap mounted as a volume is updated in the pod after a while, but nothing sends SIGHUP to Vigie. Restart the pods after a change to the ConfigMap:

Terminal window
kubectl -n vigie rollout restart deployment/vigie