Skip to content

Container registry expiration policy schema and models

What does this MR do?

Creates ContainerExpirationPolicy, which will be used to allow users to automate the container bulk delete api as a first iteration in implementing a more expansive expiration and retention policies for container (docker) images in the container registry.

The MR Creates a new table and model for storing container registry expiration policy information which maps to the query params found in the bulk delete api. The purpose of this MR is to create the models and helpers to allow frontend work to be completed on a new settings form for the policies. A separate MR will implement the recurring jobs that will call CleanupContainerRepositoryWorker (same worker used in the bulk delete api endpoint) based on the container_expiration_policy.cadence value created here.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

Related #15398 (closed)

Edited by Steve Abrams

Merge request reports