consul/website/content/docs
Dhia Ayachi 319fe48561
documentation for config auto reload feature (#12548)
* add config watcher to the config package

* add logging to watcher

* add test and refactor to add WatcherEvent.

* add all API calls and fix a bug with recreated files

* add tests for watcher

* remove the unnecessary use of context

* Add debug log and a test for file rename

* use inode to detect if the file is recreated/replaced and only listen to create events.

* tidy ups (#1535)

* tidy ups

* Add tests for inode reconcile

* fix linux vs windows syscall

* fix linux vs windows syscall

* fix windows compile error

* increase timeout

* use ctime ID

* remove remove/creation test as it's a use case that fail in linux

* fix linux/windows to use Ino/CreationTime

* fix the watcher to only overwrite current file id

* fix linter error

* fix remove/create test

* set reconcile loop to 200 Milliseconds

* fix watcher to not trigger event on remove, add more tests

* on a remove event try to add the file back to the watcher and trigger the handler if success

* fix race condition

* fix flaky test

* fix race conditions

* set level to info

* fix when file is removed and get an event for it after

* fix to trigger handler when we get a remove but re-add fail

* fix error message

* add tests for directory watch and fixes

* detect if a file is a symlink and return an error on Add

* rename Watcher to FileWatcher and remove symlink deref

* add fsnotify@v1.5.1

* fix go mod

* do not reset timer on errors, rename OS specific files

* rename New func

* events trigger on write and rename

* add missing test

* fix flaking tests

* fix flaky test

* check reconcile when removed

* delete invalid file

* fix test to create files with different mod time.

* back date file instead of sleeping

* add watching file in agent command.

* fix watcher call to use new API

* add configuration and stop watcher when server stop

* add certs as watched files

* move FileWatcher to the agent start instead of the command code

* stop watcher before replacing it

* save watched files in agent

* add add and remove interfaces to the file watcher

* fix remove to not return an error

* use `Add` and `Remove` to update certs files

* fix tests

* close events channel on the file watcher even when the context is done

* extract `NotAutoReloadableRuntimeConfig` is a separate struct

* fix linter errors

* add Ca configs and outgoing verify to the not auto reloadable config

* add some logs and fix to use background context

* add tests to auto-config reload

* remove stale test

* add tests to changes to config files

* add check to see if old cert files still trigger updates

* rename `NotAutoReloadableRuntimeConfig` to `StaticRuntimeConfig`

* fix to re add both key and cert file. Add test to cover this case.

* review suggestion

Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>

* add check to static runtime config changes

* fix test

* add changelog file

* fix review comments

* Apply suggestions from code review

Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>

* update flag description

Co-authored-by: FFMMM <FFMMM@users.noreply.github.com>

* fix compilation error

* add static runtime config support

* fix test

* fix review comments

* fix log test

* Update .changelog/12329.txt

Co-authored-by: Dan Upton <daniel@floppy.co>

* transfer tests to runtime_test.go

* fix filewatcher Replace to not deadlock.

* avoid having lingering locks

Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>

* split ReloadConfig func

* fix warning message

Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>

* convert `FileWatcher` into an interface

* fix compilation errors

* fix tests

* extract func for adding and removing files

* add a coalesceTimer with a very small timer

* extract coaelsce Timer and add a shim for testing

* add tests to coalesceTimer fix to send remaining events

* set `coalesceTimer` to 1 Second

* support symlink, fix a nil deref.

* fix compile error

* fix compile error

* refactor file watcher rate limiting to be a Watcher implementation

* fix linter issue

* fix runtime config

* fix runtime test

* fix flaky tests

* fix compile error

* Apply suggestions from code review

Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>

* fix agent New to return an error if File watcher New return an error

* add a coalesceTimer with a very small timer

* extract coaelsce Timer and add a shim for testing

* set `coalesceTimer` to 1 Second

* add flag description to agent command docs

* fix link

* add Static runtime config docs

* fix links and alignment

* fix typo

* Revert "add a coalesceTimer with a very small timer"

This reverts commit d9db2fcb82.

* Revert "extract coaelsce Timer and add a shim for testing"

This reverts commit 0ab86012a4.

* Apply suggestions from code review

Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>

Co-authored-by: Ashwin Venkatesh <ashwin@hashicorp.com>
Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>
Co-authored-by: FFMMM <FFMMM@users.noreply.github.com>
Co-authored-by: Daniel Upton <daniel@floppy.co>
Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>
2022-04-04 12:01:38 -04:00
..
agent documentation for config auto reload feature (#12548) 2022-04-04 12:01:38 -04:00
api-gateway website(api-gateway): add common errors page (#12643) 2022-03-30 16:05:00 -04:00
architecture website: redirect /api to /api-docs (#12660) 2022-03-30 16:16:26 -05:00
connect website: redirect /api to /api-docs (#12660) 2022-03-30 16:16:26 -05:00
discovery website: redirect /api to /api-docs (#12660) 2022-03-30 16:16:26 -05:00
dynamic-app-config website: redirect /api to /api-docs (#12660) 2022-03-30 16:16:26 -05:00
ecs Merge pull request #12523 from Petenerd/patch-1 2022-03-22 16:43:06 -04:00
enterprise website: redirect /api to /api-docs (#12660) 2022-03-30 16:16:26 -05:00
guides
install website: redirect /api to /api-docs (#12660) 2022-03-30 16:16:26 -05:00
integrate Update website/content/docs/integrate/partnerships.mdx 2022-02-17 13:42:21 -07:00
internals docs: Avoid redirects by pointing links to new URLs 2022-01-20 08:52:51 -08:00
intro updated all sub-headers to sentence case 2022-02-04 09:00:59 -07:00
k8s Merge pull request #12680 from hashicorp/fix-k8s-dns-service-name 2022-04-01 11:03:24 -04:00
nia website: redirect /api to /api-docs (#12660) 2022-03-30 16:16:26 -05:00
releases [RelAPI Onboarding] Add release API metadata file (#12591) 2022-03-28 13:45:53 -07:00
security website: redirect /api to /api-docs (#12660) 2022-03-30 16:16:26 -05:00
troubleshoot Revert "[Docs] Agent configuration hierarchy " 2022-03-15 16:13:58 -07:00
upgrading mark disable_compat_1.9 to deprecate in 1.13, change default to true (#12675) 2022-04-01 10:35:56 -07:00
download-tools.mdx Add CTS and API Gateway to docs on tools page 2022-01-11 10:22:30 -06:00
index.mdx Revert "[Docs] Agent configuration hierarchy " 2022-03-15 16:13:58 -07:00