1
0
mirror of synced 2026-02-06 10:55:56 +00:00

Add get auto image-policy and refactor

This factors the get command implementation so that the control flow
is generic and relies on a handful of methods, then uses that to add
`get auto image-policy` and to rewrite `get auto image-repository`.

Signed-off-by: Michael Bridgen <michael@weave.works>
This commit is contained in:
Michael Bridgen
2020-12-04 18:06:27 +00:00
parent 037a5b71fd
commit 512761080e
5 changed files with 226 additions and 68 deletions

View File

@@ -26,5 +26,6 @@ The get auto sub-commands print the statuses of the automation objects.
### SEE ALSO
* [flux get](flux_get.md) - Get sources and resources
* [flux get auto image-policy](flux_get_auto_image-policy.md) - Get ImagePolicy statuses
* [flux get auto image-repository](flux_get_auto_image-repository.md) - Get ImageRepository statuses

View File

@@ -0,0 +1,44 @@
## flux get auto image-policy
Get ImagePolicy statuses
### Synopsis
The get auto image-policy command prints the status of ImagePolicy objects.
```
flux get auto image-policy [flags]
```
### Examples
```
# List all image policies and their status
flux get auto image-policy
# List image policies from all namespaces
flux get auto image-policy --all-namespaces
```
### Options
```
-h, --help help for image-policy
```
### Options inherited from parent commands
```
-A, --all-namespaces list the requested object(s) across all namespaces
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s)
--verbose print generated objects
```
### SEE ALSO
* [flux get auto](flux_get_auto.md) - Get automation statuses