Fix plugin reload mounts (#15579)

* fix plugin reload mounts

* do not require sys/ prefix

* update plugin reload docs with examples

* fix unit test credential read path

* update docs to reflect correct cli usage

* allow sys/auth/foo or auth/foo

* append trailing slash if it doesn't exist in request

* add changelog

* use correct changelog number
This commit is contained in:
John-Michael Faircloth
2022-05-25 13:37:42 -05:00
committed by GitHub
parent 9fd8a97a88
commit 6d2a2183ca
4 changed files with 84 additions and 19 deletions

View File

@@ -13,13 +13,31 @@ must be provided, but not both.
## Examples
Reload a plugin:
Reload a plugin by name:
```shell-session
$ vault plugin reload -plugin my-custom-plugin
Success! Reloaded plugin: my-custom-plugin
```
Reload an auth plugin by mount:
```shell-session
$ vault plugin reload \
-mounts auth/my-custom-plugin-1 \
-mounts auth/my-custom-plugin-2
Success! Reloaded mounts: [auth/my-custom-plugin-1/ auth/my-custom-plugin-2/]
```
Reload a secrets plugin by mount:
```shell-session
$ vault plugin reload \
-mounts my-custom-plugin-1 \
-mounts my-custom-plugin-2
Success! Reloaded mounts: [my-custom-plugin-1/ my-custom-plugin-2/]
```
## Usage
The following flags are available in addition to the [standard set of