secret ls: align docs, completion, and tests; fix formatting

- Use SecretListReport for --format completion and correct help text
- Update manpage placeholders and ordering per xref rules
- Add and adjust e2e tests; verify CreatedAt contains 'ago'
- gofmt formatting fixes

Signed-off-by: shiavm006 <shivammittal42006@gmail.com>
This commit is contained in:
shiavm006
2025-10-02 17:33:38 +05:30
parent 116e4588c4
commit 00309d3955
3 changed files with 35 additions and 11 deletions

View File

@ -32,16 +32,11 @@ Valid placeholders for the Go template are listed below:
| **Placeholder** | **Description** |
| ------------------------ | ----------------------------------------------------------------- |
| .CreatedAt ... | When secret was created (relative timestamp, human-readable) |
| .CreatedAt | When secret was created (relative timestamp, human-readable) |
| .Driver | Driver name (string) |
| .ID | ID of secret |
| .SecretData | Secret Data (Displayed only with --showsecret option) |
| .Spec ... | Details of secret |
| .Spec.Driver ... | Driver info |
| .Spec.Driver.Name | Driver name (string) |
| .Spec.Driver.Options ... | Driver options (map of driver-specific options) |
| .Spec.Labels ... | Labels for this secret |
| .Spec.Name | Name of secret |
| .UpdatedAt ... | When secret was last updated (relative timestamp, human-readable) |
| .Name | Name of secret |
| .UpdatedAt | When secret was last updated (relative timestamp, human-readable) |
@@option noheading