2022-04-13 21:09:57 +00:00
= gitlab_ui_form_for @application_setting, url: ci_cd_admin_application_settings_path(anchor: 'js-registry-settings'), html: { class: 'fieldset-form' } do |f|
2022-07-01 12:08:08 +00:00
= form_errors(@application_setting, pajamas_alert: true)
2018-04-04 09:44:32 +00:00
%fieldset
2018-06-13 07:40:55 +00:00
.form-group
2021-04-09 15:09:10 +00:00
= f.label :container_registry_token_expire_delay, _('Authorization token duration (minutes)'), class: 'label-bold'
2021-01-31 18:09:51 +00:00
= f.number_field :container_registry_token_expire_delay, class: 'form-control gl-form-input'
2020-04-08 09:09:43 +00:00
.form-group
2022-04-13 21:09:57 +00:00
- label = _("Enable container expiration and retention policies for projects created earlier than GitLab 12.7.")
- label_link = link_to sprite_icon('question-o'), help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'cleanup-policy')
- help_text = _("Existing projects will be able to use expiration policies. Avoid enabling this if an external Container Registry is being used, as there is a performance risk if many images exist on one project.")
- help_link = link_to sprite_icon('question-o'), help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'use-with-external-container-registries')
= f.gitlab_ui_checkbox_component :container_expiration_policies_enable_historic_entries,
'%{label} %{label_link}'.html_safe % { label: label, label_link: label_link },
help_text: '%{help_text} %{help_link}'.html_safe % { help_text: help_text, help_link: help_link }
2020-09-02 09:10:23 +00:00
.form-group
= f.label :container_registry_delete_tags_service_timeout, _('Cleanup policy maximum processing time (seconds)'), class: 'label-bold'
2021-01-31 18:09:51 +00:00
= f.number_field :container_registry_delete_tags_service_timeout, min: 0, class: 'form-control gl-form-input'
2020-09-02 09:10:23 +00:00
.form-text.text-muted
= _("Tags are deleted until the timeout is reached. Any remaining tags are included the next time the policy runs. To remove the time limit, set it to 0.")
2021-02-01 15:08:56 +00:00
.form-group
= f.label :container_registry_expiration_policies_worker_capacity, _('Cleanup policy maximum workers running concurrently'), class: 'label-bold'
= f.number_field :container_registry_expiration_policies_worker_capacity, min: 0, class: 'form-control'
.form-text.text-muted
= _("Cleanup policies are executed by background workers. This setting defines the maximum number of workers that can run concurrently. Set it to 0 to remove all workers and not execute the cleanup policies.")
.form-group
= f.label :container_registry_cleanup_tags_service_max_list_size, _('Cleanup policy maximum number of tags to be deleted'), class: 'label-bold'
= f.number_field :container_registry_cleanup_tags_service_max_list_size, min: 0, class: 'form-control'
.form-text.text-muted
= _("The maximum number of tags that a single worker accepts for cleanup. If the number of tags goes above this limit, the list of tags to delete is truncated to this number. To remove this limit, set it to 0.")
2022-03-04 06:18:17 +00:00
.form-group
2022-04-13 21:09:57 +00:00
- help_text = _("When enabled, cleanup polices execute faster but put more load on Redis.")
- help_link = link_to sprite_icon('question-o'), help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'set-cleanup-limits-to-conserve-resources')
= f.gitlab_ui_checkbox_component :container_registry_expiration_policies_caching, _("Enable container expiration caching."),
help_text: '%{help_text} %{help_link}'.html_safe % { help_text: help_text, help_link: help_link }
2018-04-04 09:44:32 +00:00
2021-04-09 15:09:10 +00:00
= f.submit _('Save changes'), class: "gl-button btn btn-confirm"