1
0
mirror of synced 2026-03-19 17:26:55 +00:00

Add delete image-policy and refactor

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>
This commit is contained in:
Michael Bridgen
2020-12-07 10:51:14 +00:00
parent 512761080e
commit 52145c045d
9 changed files with 186 additions and 57 deletions

View File

@@ -26,5 +26,6 @@ The delete auto sub-commands delete automation objects.
### SEE ALSO
* [flux delete](flux_delete.md) - Delete sources and resources
* [flux delete auto image-policy](flux_delete_auto_image-policy.md) - Delete an ImagePolicy object
* [flux delete auto image-repository](flux_delete_auto_image-repository.md) - Delete an ImageRepository object