Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
entrypoint: support hot reloading of configs (#6)
* entrypoint: support hot reloading of configs This change does the following: - Watches the user config file for changes and updates the collector config if detected - The collector uses the same port throughout the lifetime of an instance To test this change do the following: - Run `./create-sa-and-ar.sh` - Run `gcloud builds submit . --config=cloudbuild.yaml --region=<SOME REGION>`. Now you have a sample app and a sidecar running. - Run `gcloud secrets versions add run-gmp-config --data-file=<NEW CONFIG FILE>` to update the secret, where the config is stored. - Look at metrics and logs, collector should be using updated config. Change-Id: I2f15ae2d94e0f94ffe57d9ffb03f883341301ca5 Signed-off-by: Ridwan Sharif <[email protected]> * confgenerator: use new port for self metrics on reload Change-Id: I923f9f19b238c5f00ad3c9e644a6026fff79d743 Signed-off-by: Ridwan Sharif <[email protected]> * dnm: debug Change-Id: I5d7873fa70c33a42bfc73216b0afd5e8cf208f42 * Revert "dnm: debug" This reverts commit 7542f65. * collector: update to v0.94.0 Change-Id: I59bfe1d8023dc1aaa2fef0482df8327decfcae7e * entrypoint: use same self metrics port for a single instance Change-Id: I2de4d85d9181e5b42341f1b5b4a5b1ef0e2efb9c * entrypoint: only reload when theres a change since last stat Change-Id: Id2b26ac156ecf97561c8b7597ae60edac9c5db34 Signed-off-by: Ridwan Sharif <[email protected]> * collector: update mdatagen Change-Id: I32941dbd9db49a195ba9b13d03857d7e8b863d01 Signed-off-by: Ridwan Sharif <[email protected]> * entrypoint: log the used user config Change-Id: I9a0e8d831e92cb10c21e60958b7c3488ca372e78 Signed-off-by: Ridwan Sharif <[email protected]> * entrypoint: deduplicate logic acound checking for the user config Change-Id: I3421e3800600d484fbbef5666277968d87715898 * entrypoint: use raw string compare of config files instead of FileInfo The `gen1` execution environment doesn't support mod time changes being picked up correctly. Change-Id: I4d39b9ca81aa0d16399dfa7fa84e3d70673a6e52 Signed-off-by: Ridwan Sharif <[email protected]> * entrypoint: reword comment Change-Id: I8c6a2386a17a7112d45abcd624d71717b7e369cb --------- Signed-off-by: Ridwan Sharif <[email protected]>
- Loading branch information