Skip to content

Commit

Permalink
ceph: implement bucket notifications for object storage
Browse files Browse the repository at this point in the history
following the design from here:
https://github.com/rook/rook/blob/master/design/ceph/object/ceph-bucket-notification-crd.md

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
  • Loading branch information
yuvalif committed Jul 29, 2021
1 parent 6dcc601 commit 91dc0d2
Show file tree
Hide file tree
Showing 8 changed files with 1,310 additions and 0 deletions.
226 changes: 226 additions & 0 deletions cluster/charts/rook-ceph/templates/resources.yaml
Expand Up @@ -348,6 +348,232 @@ status:
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c
helm.sh/resource-policy: keep
creationTimestamp: null
name: cephbucketnotifications.ceph.rook.io
spec:
group: ceph.rook.io
names:
kind: CephBucketNotification
listKind: CephBucketNotificationList
plural: cephbucketnotifications
singular: cephbucketnotification
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: CephBucketNotification represents a Bucket Notifications
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: BucketNotificationSpec represent the spec of a Bucket Notification
properties:
events:
description: List of events that should trigger the notification
items:
type: string
type: array
filter:
description: Spec of notification filter
properties:
keyFilters:
description: Filters based on the object's key
items:
description: NotificationFilterRule represent a single rule in the Notification Filter spec
properties:
name:
description: Name of the filter - Prefix/Suffix/Regex in case of Key or the value if the metadata or tag in these cases
type: string
value:
description: Value to filter on
type: string
required:
- name
- value
type: object
type: array
metadataFilters:
description: Filters based on the object's metadata
items:
description: NotificationFilterRule represent a single rule in the Notification Filter spec
properties:
name:
description: Name of the filter - Prefix/Suffix/Regex in case of Key or the value if the metadata or tag in these cases
type: string
value:
description: Value to filter on
type: string
required:
- name
- value
type: object
type: array
tagFilters:
description: Filters based on the object's tags
items:
description: NotificationFilterRule represent a single rule in the Notification Filter spec
properties:
name:
description: Name of the filter - Prefix/Suffix/Regex in case of Key or the value if the metadata or tag in these cases
type: string
value:
description: Value to filter on
type: string
required:
- name
- value
type: object
type: array
type: object
topicARN:
description: The ARN of the topic associated with this notification
type: string
required:
- topicARN
type: object
status:
description: Status represents the status of an object
properties:
phase:
type: string
type: object
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
- spec
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c
helm.sh/resource-policy: keep
creationTimestamp: null
name: cephbuckettopics.ceph.rook.io
spec:
group: ceph.rook.io
names:
kind: CephBucketTopic
listKind: CephBucketTopicList
plural: cephbuckettopics
singular: cephbuckettopic
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: CephBucketTopic represents a Ceph Object Topic for Bucket Notifications
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: BucketTopicSpec represent the spec of a Bucket Topic
properties:
amqp:
description: Spec of AMQP endpoint
properties:
ackLevel:
description: The ack level required for this topic (none/broker/routeable)
type: string
caLocation:
description: This specified CA will be used, instead of the default one, to authenticate the broker
type: string
exchange:
description: Name of the exchange that is used to route messages based on topics
type: string
verifySSL:
description: Indicate whether the server certificate is validated by the client or not
type: boolean
required:
- exchange
type: object
endpoint:
description: The URI of an endpoint to push notification to
type: string
http:
description: Spec of HTTP endpoint
properties:
verifySSL:
description: Indicate whether the server certificate is validated by the client or not
type: boolean
type: object
kafka:
description: Spec of Kafka endpoint
properties:
ackLevel:
description: The ack level required for this topic (none/broker)
type: string
caLocation:
description: This specified CA will be used, instead of the default one, to authenticate the broker
type: string
useSSL:
description: Indicate whether to use SSL when communicating with the broker
type: boolean
verifySSL:
description: Indicate whether the server certificate is validated by the client or not
type: boolean
type: object
opaqueData:
description: Data which is sent in each event
type: string
persistent:
description: Indication whether notifications to this endpoint are persistent or not
type: boolean
required:
- endpoint
type: object
status:
description: Status represents the status of an object
properties:
phase:
type: string
type: object
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
- spec
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c
Expand Down

0 comments on commit 91dc0d2

Please sign in to comment.