Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions api_reference/master.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ include::modules/api-tag-restoreTag.adoc[leveloffset=+2]
include::modules/api-tag-changeTag.adoc[leveloffset=+2]
include::modules/api-tag-deleteFullTag.adoc[leveloffset=+2]
include::modules/api-tag-listRepoTags.adoc[leveloffset=+2]
include::modules/api-tag-getTagPullStatistics.adoc[leveloffset=+2]
include::modules/api-manifest-getManifestPullStatistics.adoc[leveloffset=+2]

//done
include::modules/api-team.adoc[leveloffset=+1]
include::modules/api-team-getOrganizationTeamPermissions.adoc[leveloffset=+2]
Expand Down
1 change: 1 addition & 0 deletions config_quay/master.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ include::modules/config-fields-build-logs.adoc[leveloffset=+3]

//tag management
include::modules/tag-image-mgmt-configuration-overview.adoc[leveloffset=+2]
include::modules/config-fields-image-activity.adoc[leveloffset=+3]
include::modules/config-fields-tag-expiration.adoc[leveloffset=+3]
include::modules/config-fields-mirroring.adoc[leveloffset=+3]
include::modules/config-fields-modelcache.adoc[leveloffset=+3]
Expand Down
Binary file removed images/august-receipt.png
Binary file not shown.
Binary file added images/image-pull-stats.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions modules/api-manifest-getManifestPullStatistics.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
:_mod-docs-content-type: REFERENCE

= getManifestPullStatistics
Get pull statistics for a specific manifest.

[discrete]
== GET /api/v1/repository/{repository}/manifest/{manifestref}/pull_statistics


**Authorizations: **oauth2_implicit (**repo:read**)


[discrete]
== Path parameters

[options="header", width=100%, cols=".^2a,.^3a,.^9a,.^4a"]
|===
|Type|Name|Description|Schema
|path|**manifestref** +
_required_|The digest of the manifest|string
|path|**repository** +
_required_|The full path of the repository. e.g. namespace/name|string
|===


[discrete]
== Responses

[options="header", width=100%, cols=".^2a,.^14a,.^4a"]
|===
|HTTP Code|Description|Schema
|200|Successful invocation|
|400|Bad Request|<<_apierror,ApiError>>
|401|Session required|<<_apierror,ApiError>>
|403|Unauthorized access|<<_apierror,ApiError>>
|404|Not found|<<_apierror,ApiError>>
|===

[discrete]
== Example command

[source,terminal]
----
curl -X GET \
"https://<quay-server.example.com>/api/v1/repository/<organization>/<repository>/manifest/sha256:<manifest>/pull_statistics" \
-H "Authorization: <bearer_token>" \
-H "Accept: application/json"
----
42 changes: 42 additions & 0 deletions modules/api-tag-getTagPullStatistics.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
:_mod-docs-content-type: REFERENCE

= getTagPullStatistics
Get pull statistics for a specific tag.

[discrete]
== GET /api/v1/repository/{repository}/tag/{tag}/pull_statistics

**Authorizations: **oauth2_implicit (**repo:read**)

[discrete]
== Path parameters

[options="header", width=100%, cols=".^2a,.^3a,.^9a,.^4a"]
|===
|Type|Name|Description|Schema
|path|**repository** +
_required_|The full path of the repository. e.g. namespace/name|string
|path|**tag** +
_required_|The name of the tag|string
|===

[discrete]
== Responses

[options="header", width=100%, cols=".^2a,.^14a,.^4a"]
|===
|HTTP Code|Description|Schema
|200|Successful invocation|
|400|Bad Request|&lt;&lt;_apierror,ApiError&gt;&gt;
|401|Session required|&lt;&lt;_apierror,ApiError&gt;&gt;
|403|Unauthorized access|&lt;&lt;_apierror,ApiError&gt;&gt;
|404|Not found|&lt;&lt;_apierror,ApiError&gt;&gt;
|===

[discrete]
== Example command

[source,terminal]
----
$ curl -X GET "https://<quay-server.example.com>/api/v1/repository/<organization>/<repository>/tag/<tag>/pull_statistics" -H "Authorization: <bearer_token>" -H "Accept: application/json"
----
36 changes: 36 additions & 0 deletions modules/config-fields-image-activity.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
:_mod-docs-content-type: REFERENCE
[id="config-fields-image-activity-tracking"]
= Image activity tracking configuration fields

The following configuration options are available to track image activities. When enabled, clear visibility into how often and when image tags are pulled are provided in the UI.

.Image activity configuration fields
[cols="3a,1a,2a",options="header"]
|===
| Field | Type | Description
|*FEATURE_IMAGE_PULL_STATS* |Boolean | Whether to track and display image pull statistics. +
+
**Default:** False

|*REDIS_FLUSH_INTERVAL_SECONDS* |Integer | Interval, in seconds, at which the Redis flush worker clears old data. Shorter intervals keep data fresher and help prevent Redis from bloating, while longer intervals reduce flush frequency. +
+
**Default:** 300 (5 minutes)

|*PULL_METRICS_REDIS* |Object | Connection settings for the Redis database used to store image pull metrics. The `host` field specifies the Redis server hostname, and the optional `db` field identifies the Redis database index to use. +
+
**Default:** {"host": "<redis_password>", "password": "<redis_password>", "port": "<port>" "db": 1}
|===

.Image activity tracking example YAML
[source,yaml]
----
# ...
FEATURE_IMAGE_PULL_STATS: true
REDIS_FLUSH_INTERVAL_SECONDS: 30
PULL_METRICS_REDIS:
host: <redis_host>
password: <redis_password>
port: 6379
db: 1
# ...
----
53 changes: 49 additions & 4 deletions modules/managing-namespace-auto-pruning-policies.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,55 @@

All auto-pruning policies, with the exception of a registry-wide auto pruning policy, are created using the {productname} v2 UI or by using the API. This can be done after you have configured your {productname} `config.yaml` file to enable the auto-pruning feature and the v2 UI.

[NOTE]
====
This feature is not available when using the {productname} legacy UI.
====
[id="enabling-image-pull-activity-tracking"]
== Enabling image pull activity tracking

{productname} administrators can enable image pull activity tracking, which provides clear visibility into how often and when image tags are pulled, giving users valuable insight into image usage and popularity across repositories. The following procedure shows you how to enable this feature.

.Procedure

. In your {productname} `config.yaml` file, set `FEATURE_IMAGE_PULL_STATS: true`. For example:
+
[source,yaml]
----
# ...
FEATURE_IMAGE_PULL_STATS: true
REDIS_FLUSH_INTERVAL_SECONDS: 30
PULL_METRICS_REDIS:
host: <redis_host>
password: <redis_password>
port: 6379
db: 1
# ...
----
+
* `FEATURE_IMAGE_PULL_STATS` enables image pull tracking activity.
* `REDIS_FLUSH_INTERVAL_SECONDS` defines the the time, in seconds, at which the Redis flush worker clears old data. Shorter intervals keep data fresher and help prevent Redis from bloating, while longer intervals reduce flush frequency.
* `PULL_METRICS_REDIS` Specifies the connection settings for the Redis database used to store image pull metrics.

. Restart your {productname} deployment.

.Verification

. Push an image to your registry by entering the following command. Following this step, you can use your browser to see the tagged image in your repository.
+
[source,terminal]
----
$ podman push <quay-server.example.com>/<organization>/<image>:<tag>
----

. Pull the image from your {productname} registry by entering the following command:
+
[source,terminal]
----
$ podman pull <quay-server.example.com>/<organization>/<image>:<tag>
----

. On the {productname} UI, navigate to *Repositories*, and then click the name of your repository.

. Click *Tags*. The *Last Pulled* and *Pull Count* categories show you information about when the image was last pull, and how many time it has been pulled, respectively. For example:
+
image:image-pull-stats.png[Image pull statistics]

[id="configuring-namespace-auto-prune-feature"]
== Configuring the {productname} auto-pruning feature
Expand Down
12 changes: 8 additions & 4 deletions modules/new-api-endpoints-316.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@

The following API endpoints were added in {productname} 3.16.

[id="example-api"]
== Example
[id="image-pull-statistics-api"]
== Image pull statistics API endpoints

New tag API parameters, `getTagPullStatistics` and `getManifestPullStatistics`, have been added to the {productname} API. With these fields, users can return image pull statistics for tags and manifests. Statistics include the last date that the tag or manifest was pulled, and how many times the tag or manifest has been pulled.

|===
| Name | Description | Schema
|*Name* |Description | Schema
|*getTagPullStatistics* |Retrieve pull statistics for a specific repository tag. | object

|*getManifestPullStatistics* |Retrieve pull statistics for a specific manifest digest in a repository. | object

|===

See the. . .
See link:https://docs.redhat.com/en/documentation/red_hat_quay/3/html/red_hat_quay_api_reference/tag[Chapter 22. tag] for more information, including example commands.
10 changes: 8 additions & 2 deletions modules/new-features-and-enhancements-316.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,11 @@

The following updates have been made to {productname}.

[id="316-placeholder-feature"]
== 316 placeholder feature
[id="image-pull-activity-tracking"]
== Image pull activity tracking

Previously, determining whether an image tag was safe to delete was difficult because usage data was not easily accessible. Although pull events were recorded in audit logs, analyzing that information was often inefficient or impractical.

With this release, {productname} introduces image pull activity tracking in the v2 UI. This feature provides clear visibility into how often and when image tags are pulled, giving users valuable insight into image usage and popularity across repositories. It can be enabled by setting `FEATURE_IMAGE_PULL_STATS: true` in your `config.yaml` file.

For more information, see link:https://docs.redhat.com/en/documentation/red_hat_quay/3.16/html-single/manage_red_hat_quay/index#managing-namespace-auto-pruning-policies[Managing auto-pruning policies using the {productname} UI].
35 changes: 18 additions & 17 deletions modules/new-quay-config-fields-316.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,27 @@
[id="new-quay-config-fields-316"]
= {productname} configuration fields updates and changes

The following configuration fields have been added to {productname} 3.15.
The following configuration fields have been added to {productname} 3.16.

[id="example-config-field"]
== example config field 1
[id="image-pull-statistics-api-endpoints"]
== Image pull statistics API endpoints

The following configuration options have been added to track image activities. When enabled, clear visibility into how often and when image tags are pulled are provided in the UI.

.example configuration field
|===
| Field | Type | Description
|Name |Type | Description. +
+
**Default:** `False`
.Image activity configuration fields
[cols="3a,1a,2a",options="header"]
|===
| Field | Type | Description
|*FEATURE_IMAGE_PULL_STATS* |Boolean | Whether to track and display image pull statistics. +
+
**Default:** False

|*REDIS_FLUSH_INTERVAL_SECONDS* |Integer | Interval, in seconds, at which the Redis flush worker clears old data. Shorter intervals keep data fresher and help prevent Redis from bloating, while longer intervals reduce flush frequency. +
+
**Default:** 300 (5 minutes)

. example YAML
[source,yaml]
----
# ...
example: true
# ...
----
|*PULL_METRICS_REDIS* |Object | Connection settings for the Redis database used to store image pull metrics. The `host` field specifies the Redis server hostname, and the optional `db` field identifies the Redis database index to use. +
+
**Default:** {"host": "<redis_password>", "password": "<redis_password>", "port": "<port>" "db": 1}

For more information, see. . .
|===
4 changes: 2 additions & 2 deletions modules/proc_deploy_quay_poc_use.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ docker.io/library/busybox latest 22667f53682a 14 hours ago 1.45
$ sudo podman tag docker.io/library/busybox quay-server.example.com/quayadmin/busybox:test
----

. Push the image to your registry. Following this step, you can use your browser to see the tagged image in your repository.
. Push the image to your registry by entering the following command. Following this step, you can use your browser to see the tagged image in your repository.
+
[source,terminal]
----
Expand Down Expand Up @@ -107,7 +107,7 @@ Example output
Untagged: quay-server.example.com/quayadmin/busybox:test
----

. Pull the image again, this time from your {productname} registry:
. Pull the image from your {productname} registry by entering the following command:
+
[source,terminal]
----
Expand Down