-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
salt, build: Add reactor for certs renewal
This reactor will be called when an expired certificate event will be received. It will then launch an orchestrate `orchestrate.certs.renew`, passing the list of expired certificates, to renew them. Refs: #1887
- Loading branch information
1 parent
f93281c
commit 3db8c10
Showing
2 changed files
with
29 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{%- set target = data["id"] %} | ||
{%- set certificates = data["certificates"] | | ||
map(attribute="cert_path") | list %} | ||
|
||
# workaround for https://github.com/saltstack/salt/issues/50827, | ||
# saltenv is not passed to the reactor | ||
{%- set saltenv = "metalk8s-@@VERSION" %} | ||
|
||
Renew expired certificates: | ||
runner.state.orchestrate: | ||
- args: | ||
- mods: metalk8s.orchestrate.certs.renew | ||
- saltenv: {{ saltenv }} | ||
- pillar: | ||
orchestrate: | ||
target: {{ target }} | ||
certificates: {{ certificates | json }} |