Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 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
1 change: 1 addition & 0 deletions api/v1alpha1/pulsarnamespace_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ type PulsarNamespaceSpec struct {

// BacklogQuotaRetentionPolicy specifies the retention policy for messages when backlog quota is exceeded.
// Valid values are "producer_request_hold", "producer_exception", or "consumer_backlog_eviction".
// +kubebuilder:validation:Enum=producer_request_hold;producer_exception;consumer_backlog_eviction
// +optional
BacklogQuotaRetentionPolicy *string `json:"backlogQuotaRetentionPolicy,omitempty"`

Expand Down
7 changes: 7 additions & 0 deletions api/v1alpha1/pulsartopic_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,16 @@ type PulsarTopicSpec struct {

// BacklogQuotaRetentionPolicy specifies the retention policy for messages when backlog quota is exceeded.
// Valid values are "producer_request_hold", "producer_exception", or "consumer_backlog_eviction".
// +kubebuilder:validation:Enum=producer_request_hold;producer_exception;consumer_backlog_eviction
// +optional
BacklogQuotaRetentionPolicy *string `json:"backlogQuotaRetentionPolicy,omitempty"`

// BacklogQuotaType controls how the backlog quota is enforced.
// "destination_storage" limits backlog by size (in bytes), while "message_age" limits by time.
// +kubebuilder:validation:Enum=destination_storage;message_age
// +optional
BacklogQuotaType *string `json:"backlogQuotaType,omitempty"`

// SchemaInfo defines the schema for the topic, if any.
// +optional
SchemaInfo *SchemaInfo `json:"schemaInfo,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ spec:
description: |-
BacklogQuotaRetentionPolicy specifies the retention policy for messages when backlog quota is exceeded.
Valid values are "producer_request_hold", "producer_exception", or "consumer_backlog_eviction".
enum:
- producer_request_hold
- producer_exception
- consumer_backlog_eviction
type: string
backlogQuotaType:
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,18 @@ spec:
description: |-
BacklogQuotaRetentionPolicy specifies the retention policy for messages when backlog quota is exceeded.
Valid values are "producer_request_hold", "producer_exception", or "consumer_backlog_eviction".
enum:
- producer_request_hold
- producer_exception
- consumer_backlog_eviction
type: string
backlogQuotaType:
description: |-
BacklogQuotaType controls how the backlog quota is enforced.
"destination_storage" limits backlog by size (in bytes), while "message_age" limits by time.
enum:
- destination_storage
- message_age
type: string
compactionThreshold:
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ spec:
description: |-
BacklogQuotaRetentionPolicy specifies the retention policy for messages when backlog quota is exceeded.
Valid values are "producer_request_hold", "producer_exception", or "consumer_backlog_eviction".
enum:
- producer_request_hold
- producer_exception
- consumer_backlog_eviction
type: string
backlogQuotaType:
description: |-
Expand Down
12 changes: 12 additions & 0 deletions config/crd/bases/resource.streamnative.io_pulsartopics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,18 @@ spec:
description: |-
BacklogQuotaRetentionPolicy specifies the retention policy for messages when backlog quota is exceeded.
Valid values are "producer_request_hold", "producer_exception", or "consumer_backlog_eviction".
enum:
- producer_request_hold
- producer_exception
- consumer_backlog_eviction
type: string
backlogQuotaType:
description: |-
BacklogQuotaType controls how the backlog quota is enforced.
"destination_storage" limits backlog by size (in bytes), while "message_age" limits by time.
enum:
- destination_storage
- message_age
type: string
compactionThreshold:
description: |-
Expand Down
4 changes: 2 additions & 2 deletions config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ spec:
resources:
limits:
cpu: 500m
memory: 128Mi
memory: 512Mi
requests:
cpu: 5m
memory: 64Mi
memory: 128Mi
- name: manager
args:
- "--health-probe-bind-address=:8081"
Expand Down
4 changes: 2 additions & 2 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ spec:
resources:
limits:
cpu: 500m
memory: 128Mi
memory: 512Mi
requests:
cpu: 10m
memory: 64Mi
memory: 128Mi
serviceAccountName: controller-manager
terminationGracePeriodSeconds: 10
4 changes: 3 additions & 1 deletion docs/pulsar_namespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The `PulsarNamespace` resource defines a namespace in a Pulsar cluster. It allow
| `retentionSize` | Maximum size of backlog retained in the namespace. Should be set in conjunction with RetentionTime for effective retention policy. Use "-1" for infinite retention size. | No |
| `backlogQuotaLimitTime` | Time limit for message backlog. Messages older than this limit will be removed or handled according to the retention policy. | No |
| `backlogQuotaLimitSize` | Size limit for message backlog. When the limit is reached, older messages will be removed or handled according to the retention policy. | No |
| `backlogQuotaRetentionPolicy` | Retention policy for messages when backlog quota is exceeded. Options: "producer_request_hold", "producer_exception", or "consumer_backlog_eviction". | No |
| `backlogQuotaRetentionPolicy` | Retention policy for messages when backlog quota is exceeded. Options: "producer_request_hold", "producer_exception", or "consumer_backlog_eviction". **Required whenever backlogQuotaLimitTime or backlogQuotaLimitSize is set.** | Conditional |
| `backlogQuotaType` | Controls how the backlog quota is enforced. Options: "destination_storage" (limits backlog by size in bytes), "message_age" (limits by time). | No |
| `offloadThresholdTime` | Time limit for message offloading. Messages older than this limit will be offloaded to the tiered storage. | No |
| `offloadThresholdSize` | Size limit for message offloading. When the limit is reached, older messages will be offloaded to the tiered storage. | No |
Expand Down Expand Up @@ -450,6 +450,8 @@ spec:
name: test-pulsar-connection
backlogQuotaLimitSize: 1Gi
backlogQuotaLimitTime: 24h
backlogQuotaRetentionPolicy: producer_request_hold
# backlogQuotaType: destination_storage
bundles: 16
messageTTL: 1h

Expand Down
2 changes: 1 addition & 1 deletion docs/pulsar_topic.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The `PulsarTopic` resource defines a topic in a Pulsar cluster. It allows you to
| `retentionSize` | Maximum size of backlog retained in the topic. Should be set in conjunction with retentionTime for effective retention policy. Use "-1" for infinite retention size. | No |
| `backlogQuotaLimitTime` | Time limit for message backlog. Messages older than this limit will be removed or handled according to the retention policy. | No |
| `backlogQuotaLimitSize` | Size limit for message backlog. When the limit is reached, older messages will be removed or handled according to the retention policy. | No |
| `backlogQuotaRetentionPolicy` | Retention policy for messages when backlog quota is exceeded. Options: "producer_request_hold", "producer_exception", or "consumer_backlog_eviction". | No |
| `backlogQuotaRetentionPolicy` | Retention policy for messages when backlog quota is exceeded. Options: "producer_request_hold", "producer_exception", or "consumer_backlog_eviction". **Required whenever backlogQuotaLimitTime or backlogQuotaLimitSize is set.** | Conditional |
| `lifecyclePolicy` | Determines whether to keep or delete the Pulsar topic when the Kubernetes resource is deleted. Options: `CleanUpAfterDeletion`, `KeepAfterDeletion`. Default is `CleanUpAfterDeletion`. | No |
| `schemaInfo` | Schema information for the topic. See [schemaInfo](#schemainfo) for more details. | No |
| `geoReplicationRefs` | List of references to PulsarGeoReplication resources, used to enable geo-replication at the topic level. | No |
Expand Down
Loading