This repository has been archived by the owner on Jul 9, 2024. It is now read-only.
Add scheduled task of reloading proxy Acls from dynamoDB table. #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add feature of loading proxy rules from DynamoDB:
ddbconfig
for receiving name of DynamoDB table storing proxy configurations. If the flag is set, a background task scheduled every minute will reload proxy configurations from the DynamoDB table by doing a full table scan. If the flag is not set, then proxy configurations will be reloaded from local configuration directory every minute.LoadConfigFromDirectory
now takes an extra optional argument flagging if the process is an initial configuration loading or reloading. If reloading fails, initial configurations remain unchanged.ConfigName
(key) andConfigBody
(base64 encoded string of proxy configuration).Integration testing
Note: bsycorp/inkfish@sha256:29d9ca858e4ee196c6f297569362239f3ddffa484e232cebf71044b0dc40acd4 is built from this branch and tested.
Options LocalDir + DDB
-- DDB tables of proxy rules at apps level are created from TF codes in apps repos, which is independent from infra codes.
-- Inkfish startup flag
-ddb-config
takes a DDB table name regex (e.g. -ddb-config ${var.env_label}[^0-9]+proxy-rules) to discover all matching DDB tables for the current environment.-- For each proxy config reloading process, the list of all DDB tables having table name matching the name regex will be scanned.