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:
@@ -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
|
||||
|
||||
|
||||
44
docs/cmd/flux_get_auto_image-policy.md
Normal file
44
docs/cmd/flux_get_auto_image-policy.md
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user