-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support min/max backoff annotations and env vars (#341)
When auto auth fails, the agent will automatically retry with an exponential backoff starting from 1 second up to 5 minutes. Those values can be overridden in Vault itself. Here, we wire up agent to pass min and max backoff values from its environment variables or the pod's annotations. * If the `AGENT_INJECT_AUTH_MIN_BACKOFF` or `AGENT_INJECT_MAX_BACKOFF` environment variables are set on the agent, these will be used as the default values. * If a pod has the annotations `vault.hashicorp.com/auth-min-backoff` or `vault.hashicorp.com/auth-max-backoff` set, these will be used as the min and max backoff values. These will override any defaults from the agent environment variables. The environment variables can be set via helm as well via, for example, ```sh helm install vault hashicorp/vault \ --set "injector.extraEnvironmentVars.AGENT_INJECT_AUTH_MIN_BACKOFF=4s" \ --set "injector.extraEnvironmentVars.AGENT_INJECT_AUTH_MAX_BACKOFF=5s" ``` This was tested via `helm` and by setting the pod annotations and confirming that the Vault agent picked up the settings when auto auth is failing.
- Loading branch information
Christopher Swenson
authored
May 10, 2022
1 parent
a308303
commit 5d84872
Showing
9 changed files
with
130 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters