Preheat Images
Before you can preheat images, a system administrator must first configure a P2P provider instance. See more about configuring P2P preheating in Harbor.
In Harbor the preheat action is policy driven, and is scoped to the project within which it’s created. This means when a project administrator creates a preheat policy under a specified project, that policy only applies to images managed under that project.
To preheat images, you need to create a preheat policy first.
Go to Projects and open your project from the project list.
Open the P2P Preheat tab and then click + NEW POLICY button to open the policy creation dialog.
For the Provider, select a pre-configured preheat provider instance as target from the dropdown list.
Input a suitable name and description(optional) for the policy to identify and describe your creating policy.
Set the repository filter(required) by following the doublestar pattern.
Set the tags filter(required) by following the same doublestar pattern.
Optionally, set the labels filter. Only images with matching labels will be put into the candidate list. Use comma
to split multiple labels, e.g.: label1
,label2
,labeln
and the relationship among multiple labels is AND.
Under certain conditions(deployment security is configured), more criteria may be visible in the policy.
Notary
server is installed and the Deployment Security configuration option Enable content trust is set,
Only signed images will also be available as a criteria for the preheating policy. This means that only images
with valid signatures will be preheated.For the policy trigger, there are multiple ways supported, choose the proper one based on your use case.
Hourly
,Daily
and Weekly
.*/15 0 * * *
, execute policy every 15 minutes at every midnightClick ADD button to save the policy.
Go to Projects and open your project from the project list.
Open the P2P Preheat tab, all the existing preheat policies are listed in the datagrid view.
Select the policy by checking the checkbox at front of the row, click ACTIONS to open the drop down menu.
Click Execute to start the execution of the selected policy immediately.
Click Disable/Enable to disable/enable the selected policy.
Click Edit to open the edit dialog and do modifications to the selected policy.
Click Delete to delete the selected policy.
Select the policy by clicking the radio button at the front of the row. If the policy has been executed before, the relevant executions will be listed in the execution data grid.
For each execution, you can find the following data:
Success
,Error
and Running
Manual
,Scheduled
and Event-based
Error
status, there will be a small info icon with tooltip that containing the error message next to it.
For the Success
status, if there are no images matching the filters and criteria defined in the policy, a small
info icon with tooltip which indicates that no images to preheat will be placed next to it.
Click the ID hyperlink to open the detailed page of the execution.
Besides the general info, you can also find a simple metrics grouped by the status of tasks:
All the related tasks of the execution are listed in the task data grid. You can find more detailed info of the task:
Type
will always be image
.