mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-11 02:07:30 +00:00
This adds a command for deleting ImagePolicy objects. Since the control flow for the command needs only a runtime.Object (and a name for the type), it can be factored out. I have made the argument (field in the deleteCommand struct) an interface `objectContainer`, through which the command code gets a `runtime.Object` to deserialise into (and delete). It could be simply a `runtime.Object` here; however things like `getCommand` require other methods, so it's convenient to have an interface for it. Signed-off-by: Michael Bridgen <michael@weave.works>
41 lines
935 B
Markdown
41 lines
935 B
Markdown
## flux delete auto image-policy
|
|
|
|
Delete an ImagePolicy object
|
|
|
|
### Synopsis
|
|
|
|
The delete auto image-policy command deletes the given ImagePolicy from the cluster.
|
|
|
|
```
|
|
flux delete auto image-policy [name] [flags]
|
|
```
|
|
|
|
### Examples
|
|
|
|
```
|
|
# Delete an image policy
|
|
flux delete auto image-policy alpine3.x
|
|
|
|
```
|
|
|
|
### Options
|
|
|
|
```
|
|
-h, --help help for image-policy
|
|
```
|
|
|
|
### Options inherited from parent commands
|
|
|
|
```
|
|
--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")
|
|
-s, --silent delete resource without asking for confirmation
|
|
--timeout duration timeout for this operation (default 5m0s)
|
|
--verbose print generated objects
|
|
```
|
|
|
|
### SEE ALSO
|
|
|
|
* [flux delete auto](flux_delete_auto.md) - Delete automation objects
|
|
|