Skip to content

Enable the GitLab Image expiration policy for all projects for self-managed instances

Problem to solve

The container expiration policy feature is available but only for new projects. We need a way to allow self-managed customers to enable the feature for existing projects at their own risk.

Intended users

Further details

This update will allow self-managed users to have more control over their expiration policies rather than being forced to wait for performance updates that may or may not apply to their situation.

Proposal

Add a column to application_settings:

  • container_expiration_policies_enable_historic_entries - If true, existing projects will have the ability to have policies set.

This allows GitLab.com to continue to have container_expiration_policies_enable_historic_entries set to false until we implement the performance enhancements to the container registry project. Once those are implemented, we can switch to true. This also allows self-managed instances to turn on container_expiration_policies_enable_historic_entries at their own risk knowing whether or not the cleanup may freeze up their background job processing. This is a middle solution to the long term solution of enabling throttling of job processing.

Permissions and Security

No updates regarding security.

Documentation

Application settings API will include the new option.

Availability & Testing

What does success look like, and how can we measure that?

  • Users can turn on and use expiration policies for existing projects with the new application setting set to true.
  • Issue #205577 (closed) captures the data instrumentation and measurement requirements.

Links / references

Edited by Tim Rizzi