Skip to content

Add automated registry pruning #4456

@corang

Description

@corang

Is your feature request related to a problem? Please describe.

When zarf is deployed on systems that are disconnected from cloud environments the registry may be backed by a pvc or other storage solution with limited space. As of now, without human intervention or hand rolled automation, the registry will continue to fill with images until it's backing storage runs out of space.

Required Enhancement

To support this feature zarf would need to track the history of images deployed for each package, not just the current or current and last images deployed.

Describe the behavior you'd like

  • Given zarf registry is deployed in a storage constrained environment
  • When automated pruning is enabled in the init package
  • Then a sidecar or separate pod is deployed that routinely parses the zarf image history of each package and removes images from package versions of more than 2 (configurable) revisions ago

Describe alternatives you've considered

The current alternative is to have a person remember to run the prune command, which I'm not super comfortable with since it doesn't leave the previous package version's images should something go wrong/a rollback occur. The prune command could also be automated/scheduled.

Additional context

Defense Unicorns internal slack thread

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions