Add secret list --filter to cli

This PR is a follow-up of #11431. It adds possibility of filtering
secret list based on id and name.

Signed-off-by: Jakub Guzik <jguzik@redhat.com>
This commit is contained in:
Jakub Guzik
2021-12-13 11:21:31 +01:00
parent 4543fd463e
commit 50501f49a3
6 changed files with 104 additions and 11 deletions

View File

@ -20,11 +20,24 @@ Format secret output using Go template.
Omit the table headings from the listing of secrets. .
#### **--filter**, **-f**=*filter=value*
Filter output based on conditions given.
Multiple filters can be given with multiple uses of the --filter option.
Valid filters are listed below:
| **Filter** | **Description** |
| ---------- | ----------------------------------------------------------------- |
| name | [Name] Secret name (accepts regex) |
| id | [ID] Full or partial secret ID |
## EXAMPLES
```
$ podman secret ls
$ podman secret ls --format "{{.Name}}"
$ podman secret ls --filter name=confidential
```
## SEE ALSO