diff options
author | Casey Bodley <cbodley@users.noreply.github.com> | 2020-01-16 17:04:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-16 17:04:19 +0100 |
commit | 290da6b57c3abb8a2aee328fd6c6172e69889b70 (patch) | |
tree | 41bb8238475d652b38809ae927261c7ec465f585 /doc/radosgw | |
parent | Merge pull request #32596 from linuxbox2/wip-rgwfile-pfront (diff) | |
parent | rgw/pubsub: notification filtering by object tags (diff) | |
download | ceph-290da6b57c3abb8a2aee328fd6c6172e69889b70.tar.xz ceph-290da6b57c3abb8a2aee328fd6c6172e69889b70.zip |
Merge pull request #31878 from yuvalif/wip-yuval-tag-filter
rgw/pubsub: notification filtering by object tags
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'doc/radosgw')
-rw-r--r-- | doc/radosgw/notifications.rst | 6 | ||||
-rw-r--r-- | doc/radosgw/pubsub-module.rst | 5 | ||||
-rw-r--r-- | doc/radosgw/s3-notification-compatibility.rst | 2 | ||||
-rw-r--r-- | doc/radosgw/s3/bucketops.rst | 33 |
4 files changed, 36 insertions, 10 deletions
diff --git a/doc/radosgw/notifications.rst b/doc/radosgw/notifications.rst index 43bcced787c..ced68e0d935 100644 --- a/doc/radosgw/notifications.rst +++ b/doc/radosgw/notifications.rst @@ -18,7 +18,7 @@ user can only manage its own topics, and can only associate them with buckets it In order to send notifications for events for a specific bucket, a notification entity needs to be created. A notification can be created on a subset of event types, or for all event types (default). The notification may also filter out events based on prefix/suffix and/or regular expression matching of the keys. As well as, -on the metadata attributes attached to the object. +on the metadata attributes attached to the object, or the object tags. There can be multiple notifications for any specific topic, and the same topic could be used for multiple notifications. REST API has been defined to provide configuration and control interfaces for the bucket notification @@ -283,7 +283,8 @@ pushed or pulled using the pubsub sync module. "eTag":"", "versionId":"", "sequencer": "", - "metadata":[] + "metadata":[], + "tags":[] } }, "eventId":"", @@ -308,6 +309,7 @@ pushed or pulled using the pubsub sync module. - s3.object.version: object version in case of versioned bucket - s3.object.sequencer: monotonically increasing identifier of the change per object (hexadecimal format) - s3.object.metadata: any metadata set on the object sent as: ``x-amz-meta-`` (an extension to the S3 notification API) +- s3.object.tags: any tags set on the objcet (an extension to the S3 notification API) - s3.eventId: unique ID of the event, that could be used for acking (an extension to the S3 notification API) .. _PubSub Module : ../pubsub-module diff --git a/doc/radosgw/pubsub-module.rst b/doc/radosgw/pubsub-module.rst index a727ad72bcc..eb4158bab52 100644 --- a/doc/radosgw/pubsub-module.rst +++ b/doc/radosgw/pubsub-module.rst @@ -270,6 +270,7 @@ Detailed under: `Bucket Operations`_. the associated subscription will not be deleted automatically (any events of the deleted bucket could still be access), and will have to be deleted explicitly with the subscription deletion API - Filtering based on metadata (which is an extension to S3) is not supported, and such rules will be ignored + - Filtering based on tags (which is an extension to S3) is not supported, and such rules will be ignored Non S3-Compliant Notifications @@ -496,7 +497,8 @@ the events will have an S3-compatible record format (JSON): "eTag":"", "versionId":"", "sequencer":"", - "metadata":[] + "metadata":[], + "tags":[] } }, "eventId":"", @@ -520,6 +522,7 @@ the events will have an S3-compatible record format (JSON): - s3.object.version: object version in case of versioned bucket - s3.object.sequencer: monotonically increasing identifier of the change per object (hexadecimal format) - s3.object.metadata: not supported (an extension to the S3 notification API) +- s3.object.tags: not supported (an extension to the S3 notification API) - s3.eventId: unique ID of the event, that could be used for acking (an extension to the S3 notification API) In case that the subscription was not created via a non S3-compatible notification, diff --git a/doc/radosgw/s3-notification-compatibility.rst b/doc/radosgw/s3-notification-compatibility.rst index 6cc6ac0283f..ffbceca64d4 100644 --- a/doc/radosgw/s3-notification-compatibility.rst +++ b/doc/radosgw/s3-notification-compatibility.rst @@ -49,6 +49,8 @@ Ceph's bucket notification API has the following extensions: - Filtering based on metadata attributes attached to the object + - Filtering based on object tags + - Filtering overlapping is allowed, so that same event could be sent as different notification diff --git a/doc/radosgw/s3/bucketops.rst b/doc/radosgw/s3/bucketops.rst index d520e379b37..378eb5f044a 100644 --- a/doc/radosgw/s3/bucketops.rst +++ b/doc/radosgw/s3/bucketops.rst @@ -514,7 +514,13 @@ Parameters are XML encoded in the body of the request, in the following format: <Name></Name> <Value></Value> </FilterRule> - </s3Metadata> + </S3Metadata> + <S3Tags> + <FilterRule> + <Name></Name> + <Value></Value> + </FilterRule> + </S3Tags> </Filter> </TopicConfiguration> </NotificationConfiguration> @@ -533,15 +539,19 @@ Parameters are XML encoded in the body of the request, in the following format: | ``Event`` | String | List of supported events see: `S3 Notification Compatibility`_. Multiple ``Event`` | No | | | | entities can be used. If omitted, all events are handled | | +-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+ -| ``Filter`` | Container | Holding ``S3Key`` and ``S3Metadata`` entities | No | +| ``Filter`` | Container | Holding ``S3Key``, ``S3Metadata`` and ``S3Tags`` entities | No | +-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+ | ``S3Key`` | Container | Holding a list of ``FilterRule`` entities, for filtering based on object key. | No | | | | At most, 3 entities may be in the list, with ``Name`` be ``prefix``, ``suffix`` or | | | | | ``regex``. All filter rules in the list must match for the filter to match. | | +-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+ | ``S3Metadata`` | Container | Holding a list of ``FilterRule`` entities, for filtering based on object metadata. | No | -| | | All filter rules in the list must match the ones defined on the object. The object, | | -| | | have other metadata entitied not listed in the filter. | | +| | | All filter rules in the list must match the metadata defined on the object. However, | | +| | | the object still match if it has other metadata entries not listed in the filter. | | ++-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+ +| ``S3Tags`` | Container | Holding a list of ``FilterRule`` entities, for filtering based on object tags. | No | +| | | All filter rules in the list must match the tags defined on the object. However, | | +| | | the object still match it it has other tags not listed in the filter. | | +-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+ | ``S3Key.FilterRule`` | Container | Holding ``Name`` and ``Value`` entities. ``Name`` would be: ``prefix``, ``suffix`` | Yes | | | | or ``regex``. The ``Value`` would hold the key prefix, key suffix or a regular | | @@ -549,7 +559,10 @@ Parameters are XML encoded in the body of the request, in the following format: +-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+ | ``S3Metadata.FilterRule`` | Container | Holding ``Name`` and ``Value`` entities. ``Name`` would be the name of the metadata | Yes | | | | attribute (e.g. ``x-amz-meta-xxx``). The ``Value`` would be the expected value for | | -| | | this attribute | | +| | | this attribute. | | ++-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+ +| ``S3Tags.FilterRule`` | Container | Holding ``Name`` and ``Value`` entities. ``Name`` would be the tag key, | Yes | +| | | and ``Value`` would be the tag value. | | +-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+ @@ -652,7 +665,13 @@ Response is XML encoded in the body of the request, in the following format: <Name></Name> <Value></Value> </FilterRule> - </s3Metadata> + </S3Metadata> + <S3Tags> + <FilterRule> + <Name></Name> + <Value></Value> + </FilterRule> + </S3Tags> </Filter> </TopicConfiguration> </NotificationConfiguration> @@ -684,4 +703,4 @@ HTTP Response | ``404`` | NoSuchKey | The notification does not exist (if provided) | +---------------+-----------------------+----------------------------------------------------------+ -.. _S3 Notification Compatibility: ../s3-notification-compatibility +.. _S3 Notification Compatibility: ../../s3-notification-compatibility |