-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: auto restart deployment when secret files change (#43)
Signed-off-by: Laszlo Uveges <[email protected]>
- Loading branch information
Showing
4 changed files
with
30 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
suite: secret checksum in deployment | ||
# Can't use global templates in this test suite as it will break the checksum calculation | ||
# causing false negative test outcome. | ||
# templates: | ||
# - deployment.yaml | ||
tests: | ||
- it: has no checksum/secret if no config | ||
template: deployment.yaml | ||
asserts: | ||
- isNull: | ||
path: spec.template.metadata.annotations.checksum/secret | ||
- it: generate checksum/secret if config is present | ||
template: deployment.yaml | ||
set: | ||
mountSecret: true | ||
secretFiles: | ||
htpasswd: |- | ||
admin:$2y$05$vmiurPmJvHylk78HHFWuruFFVePlit9rZWGA/FbZfTEmNRneGJtha | ||
user:$2y$05$L86zqQDfH5y445dcMlwu6uHv.oXFgT6AiJCwpv3ehr7idc0rI3S2G | ||
asserts: | ||
- isNotNull: | ||
path: spec.template.metadata.annotations.checksum/secret | ||
- matchRegex: | ||
path: spec.template.metadata.annotations.checksum/secret | ||
pattern: "^[a-f0-9]{64}$" # SHA256 hex output |
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