Skip to content

Update cleanup policy parameters

David Fernandez requested to merge 238190-sane-defaults into master

🎩 Context

Cleanup policies for container images is a pretty complex piece of background job logic that take care of removing unwanted tags on container repositories from the Container Registry.

The background execution of cleanup policies have been heavily refactored during the last 12 months. This refactoring has been done behind a feature flag. The refactoring is now humming smoothly on gitlab.com.

Time to remove the feature flag to deliver the refactoring to self-managed instances. The rollout issue is here: #238190 (closed)

Before doing that, we need to update default values and documentation around cleanup policies background execution parameters.

That's exactly what this MR does.

🔬 What does this MR do and why?

  • Update the default value of container_registry_expiration_policies_worker_capacity in the Application Settings from 0 to 4. This defines how many concurrent jobs we can have for the policies execution.
  • If container_registry_expiration_policies_worker_capacity is set to 0, we update it to the default value: 4.
  • Update the documentation to recommend 200 for container_registry_cleanup_tags_service_max_list_size.
  • Update the documentation to present all the default values.

📸 Screenshots or screen recordings

n / a

📐 How to set up and validate locally

  1. Checkout this MR branch
  2. In a rails console, check: ApplicationSetting.first.container_registry_expiration_policies_worker_capacity value.
  3. Run the migration
  4. In a rails console, check: ApplicationSetting.first.container_registry_expiration_policies_worker_capacity value.
  • If in (2.) you had 0, (4.) will be 4.
  • If in (2.) you had something else than 0, (4.) will be the same value.

🚦 MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #238190 (closed)

Edited by David Fernandez

Merge request reports