-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce
zarf tools registry prune
(#1966)
## Description This introduces a new Zarf tools command to prune images in a registry that do not relate to any currently deployed Zarf components. ## Related Issue Fixes #1960 Fixes #1945 ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [x] Test, docs, adr added or updated as needed - [X] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow) followed
- Loading branch information
Showing
11 changed files
with
327 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
docs/2-the-zarf-cli/100-cli-commands/zarf_tools_registry_delete.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# zarf tools registry delete | ||
<!-- Auto-generated by hack/gen-cli-docs.sh --> | ||
|
||
Delete an image reference from its registry | ||
|
||
``` | ||
zarf tools registry delete IMAGE [flags] | ||
``` | ||
|
||
## Examples | ||
|
||
``` | ||
# delete an image digest from an internal repo in Zarf | ||
$ zarf tools registry delete 127.0.0.1:31999/stefanprodan/podinfo@sha256:57a654ace69ec02ba8973093b6a786faa15640575fbf0dbb603db55aca2ccec8 | ||
# delete an image digest from a repo hosted at reg.example.com | ||
$ zarf tools registry delete reg.example.com/stefanprodan/podinfo@sha256:57a654ace69ec02ba8973093b6a786faa15640575fbf0dbb603db55aca2ccec8 | ||
``` | ||
|
||
## Options | ||
|
||
``` | ||
-h, --help help for delete | ||
``` | ||
|
||
## Options inherited from parent commands | ||
|
||
``` | ||
--allow-nondistributable-artifacts Allow pushing non-distributable (foreign) layers | ||
--insecure Allow image references to be fetched without TLS | ||
--platform string Specifies the platform in the form os/arch[/variant][:osversion] (e.g. linux/amd64). (default "all") | ||
-v, --verbose Enable debug logs | ||
``` | ||
|
||
## SEE ALSO | ||
|
||
* [zarf tools registry](zarf_tools_registry.md) - Tools for working with container registries using go-containertools |
41 changes: 41 additions & 0 deletions
41
docs/2-the-zarf-cli/100-cli-commands/zarf_tools_registry_digest.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# zarf tools registry digest | ||
<!-- Auto-generated by hack/gen-cli-docs.sh --> | ||
|
||
Get the digest of an image | ||
|
||
``` | ||
zarf tools registry digest IMAGE [flags] | ||
``` | ||
|
||
## Examples | ||
|
||
``` | ||
# return an image digest for an internal repo in Zarf | ||
$ zarf tools registry digest 127.0.0.1:31999/stefanprodan/podinfo:6.4.0 | ||
# return an image digest from a repo hosted at reg.example.com | ||
$ zarf tools registry digest reg.example.com/stefanprodan/podinfo:6.4.0 | ||
``` | ||
|
||
## Options | ||
|
||
``` | ||
--full-ref (Optional) if true, print the full image reference by digest | ||
-h, --help help for digest | ||
--tarball string (Optional) path to tarball containing the image | ||
``` | ||
|
||
## Options inherited from parent commands | ||
|
||
``` | ||
--allow-nondistributable-artifacts Allow pushing non-distributable (foreign) layers | ||
--insecure Allow image references to be fetched without TLS | ||
--platform string Specifies the platform in the form os/arch[/variant][:osversion] (e.g. linux/amd64). (default "all") | ||
-v, --verbose Enable debug logs | ||
``` | ||
|
||
## SEE ALSO | ||
|
||
* [zarf tools registry](zarf_tools_registry.md) - Tools for working with container registries using go-containertools |
28 changes: 28 additions & 0 deletions
28
docs/2-the-zarf-cli/100-cli-commands/zarf_tools_registry_prune.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# zarf tools registry prune | ||
<!-- Auto-generated by hack/gen-cli-docs.sh --> | ||
|
||
Prunes images from the registry that are not currently being used by any Zarf packages. | ||
|
||
``` | ||
zarf tools registry prune [flags] | ||
``` | ||
|
||
## Options | ||
|
||
``` | ||
--confirm Confirm the image prune action to prevent accidental deletions | ||
-h, --help help for prune | ||
``` | ||
|
||
## Options inherited from parent commands | ||
|
||
``` | ||
--allow-nondistributable-artifacts Allow pushing non-distributable (foreign) layers | ||
--insecure Allow image references to be fetched without TLS | ||
--platform string Specifies the platform in the form os/arch[/variant][:osversion] (e.g. linux/amd64). (default "all") | ||
-v, --verbose Enable debug logs | ||
``` | ||
|
||
## SEE ALSO | ||
|
||
* [zarf tools registry](zarf_tools_registry.md) - Tools for working with container registries using go-containertools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.