-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(vault): allow arrays in conf loader to be referenced
### Summary Some properties, like `KONG_SSL_CERT` and `KONG_SSL_CERT_KEY` are arrays and users can specify many. Vaults didn't work in this scenario: For example below didn't work before: ``` CERT_1=$(<cert1.crt) \ KEY_1=$(<key1.key) \ CERT_2=$(<cert2.crt) \ KEY_2=$(<key2.key) \ KONG_SSL_CERT_KEY="{vault://env/key-1},{vault://env/key-2}" \ KONG_SSL_CERT="{vault://env/cert-1},{vault://env/cert-2}" \ kong prepare --vv ``` There were also erroneous warning in logs like because of bad array handling: ``` [warn] 680#0: [kong] vault.lua:1475 error caching secret reference {vault://env/cert-1}: bad value type ``` This fixes those. Signed-off-by: Aapo Talvensaari <[email protected]>
- Loading branch information
Showing
7 changed files
with
86 additions
and
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1673,6 +1673,7 @@ local function new(self) | |
init_worker() | ||
end | ||
|
||
|
||
--- | ||
-- Warmups vault caches from config. | ||
-- | ||
|
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