-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#17442 from ycliuhw/secret-revision-expiry-wat…
…cher juju#17442 This PR implements the service watcher for watching secret expiration changes. Once this lands, the user can set the expiration time for the secrets, a `secret-expired` will be fired when the secret is expired. There is no business logic change in this PR. Additionally, this PR fixes a bug in the UpdateCharmSecret method(the secret expiry config was ignored) in the secret domain layer. ## Checklist <!-- If an item is not applicable, use `~strikethrough~`. --> - [x] Code style: imports ordered, good names, simple structure, etc - [x] Comments saying why design decisions were made - [x] Go unit tests, with comments saying what you're testing - [ ] ~[Integration tests](https://github.com/juju/juju/tree/main/tests), with comments saying what you're testing~ - [ ] ~[doc.go](https://discourse.charmhub.io/t/readme-in-packages/451) added or updated in changed packages~ ## QA steps ``` juju exec --unit dummy-source/0 -- secret-set cpc3skubpn0hb7602f8g --expire=1m juju exec --unit dummy-source/0 -- secret-set cpc3sbebpn0hb7602f80 --expire=1m juju show-secret cpc3sbebpn0hb7602f80 cpc3sbebpn0hb7602f80: revision: 2 expires: 2024-05-30T09:07:33.816994754Z rotation: never owner: dummy-source created: 2024-05-30T08:51:57.822932829Z updated: 2024-05-30T09:06:33.821168294Z juju show-secret cpc3skubpn0hb7602f8g cpc3skubpn0hb7602f8g: revision: 3 expires: 2024-05-30T09:07:23.105946731Z rotation: never owner: dummy-source/0 created: 2024-05-30T08:52:35.97915777Z updated: 2024-05-30T09:06:23.109453691Z juju show-status-log dummy-source/0 Time Type Status Message ... 30 May 2024 19:06:33+10:00 juju-unit executing running action juju-exec 30 May 2024 19:06:33+10:00 juju-unit idle 30 May 2024 19:07:23+10:00 juju-unit executing running secret-expired hook for cpc3skubpn0hb7602f8g/3 30 May 2024 19:07:23+10:00 juju-unit executing running secret-expired hook for cpc3sbebpn0hb7602f80/2 ``` ## Documentation changes No ## Links **Jira card:** JUJU-5895
- Loading branch information
Showing
9 changed files
with
726 additions
and
135 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.