Skip to content

Commit

Permalink
Notifications - PR notes, take1
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Prinz Setter <[email protected]>
  • Loading branch information
alphaprinz committed Nov 14, 2024
1 parent 7309d19 commit 3515d7e
Show file tree
Hide file tree
Showing 7 changed files with 2,396 additions and 37 deletions.
39 changes: 34 additions & 5 deletions deploy/crds/noobaa.io_noobaas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,40 @@ spec:
- guaranteed - much more reliable but need to provide a storage class that supports RWX PVs
type: string
type: object
bucketNotifications:
description: BucketNotifications (optional) controls bucket notification
options
properties:
connections:
description: |-
Connections - A list of secrets' names that are used by the notifications configrations
(in the TopicArn field).
items:
description: |-
SecretReference represents a Secret Reference. It has enough information to retrieve secret
in any namespace
properties:
name:
description: name is unique within a namespace to reference
a secret resource.
type: string
namespace:
description: namespace defines the space within which the
secret name must be unique.
type: string
type: object
x-kubernetes-map-type: atomic
type: array
enabled:
description: Enabled - whether bucket notifications is enabled
type: boolean
pvc:
description: |-
PVC (optional) specifies the name of the Persistent Volume Claim (PVC) to be used
for holding pending notifications files.
For ODF - If not provided, the default CepthFS storage class will be used to create the PVC.
type: string
type: object
cleanupPolicy:
description: CleanupPolicy (optional) Indicates user's policy for
deletion
Expand Down Expand Up @@ -1706,11 +1740,6 @@ spec:
update the admin account with new BackingStore/NamespaceStore in order to delete the DefaultBackingStore/DefaultNamespaceStore
nullable: true
type: boolean
notificationsPVC:
description: |-
NotificationsPVC (optional) specifies the name of the Persistent Volume Claim (PVC) to be used
for notifications persistent files.
type: string
pvPoolDefaultStorageClass:
description: |-
PVPoolDefaultStorageClass (optional) overrides the default cluster StorageClass for the pv-pool volumes.
Expand Down
21 changes: 18 additions & 3 deletions pkg/apis/noobaa/v1alpha1/noobaa_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,9 @@ type NooBaaSpec struct {
// +optional
BucketLogging BucketLoggingSpec `json:"bucketLogging,omitempty"`

// NotificationsPVC (optional) specifies the name of the Persistent Volume Claim (PVC) to be used
// for notifications persistent files.
// BucketNotifications (optional) controls bucket notification options
// +optional
NotificationsPVC *string `json:"notificationsPVC,omitempty"`
BucketNotifications BucketNotificationsSpec `json:"bucketNotifications,omitempty"`
}

// AutoscalerSpec defines different actoscaling spec such as autoscaler type and prometheus namespace
Expand Down Expand Up @@ -263,6 +262,22 @@ type BucketLoggingSpec struct {
BucketLoggingPVC *string `json:"bucketLoggingPVC,omitempty"`
}

//BucketNotificationsSpec controls bucket notification configuration
type BucketNotificationsSpec struct {
// Enabled - whether bucket notifications is enabled
Enabled bool `json:"enabled,omitempty"`

//PVC (optional) specifies the name of the Persistent Volume Claim (PVC) to be used
//for holding pending notifications files.
//For ODF - If not provided, the default CepthFS storage class will be used to create the PVC.
// +optional
PVC *string `json:"pvc,omitempty"`

//Connections - A list of secrets' names that are used by the notifications configrations
//(in the TopicArn field).
Connections []corev1.SecretReference `json:"connections,omitempty"`
}

// LoadBalancerSourceSubnetSpec defines the subnets that will be allowed to access the NooBaa services
type LoadBalancerSourceSubnetSpec struct {
// S3 is a list of subnets that will be allowed to access the Noobaa S3 service
Expand Down
32 changes: 27 additions & 5 deletions pkg/apis/noobaa/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3515d7e

Please sign in to comment.