Skip to content

Conversation

@freeznet
Copy link
Member

@freeznet freeznet commented Dec 5, 2025

(If this PR fixes a github issue, please add Fixes #<xyz>.)

Fixes #

(or if this PR is one task of a github issue, please add Master Issue: #<xyz> to link to the master issue.)

Master Issue: #

Motivation

Explain here the context, and why you're making that change. What is the problem you're trying to solve.

Modifications

Describe the modifications you've done.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Documentation

Check the box below.

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

@freeznet freeznet self-assigned this Dec 5, 2025
@freeznet freeznet requested review from a team as code owners December 5, 2025 12:28
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

@freeznet:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@github-actions github-actions bot added the doc-info-missing This pr needs to mark a document option in description label Dec 5, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aligns namespace and topic policy operations by introducing explicit backlog quota type support and improving validation for backlog quota configurations. The changes add stricter validation requirements and enhance policy management capabilities for both namespaces and topics.

Key changes:

  • Adds BacklogQuotaType field to topic and namespace specs with enum validation (destination_storage, message_age)
  • Refactors backlog quota handling into a shared buildBacklogQuota function with improved validation
  • Adds support for managing persistence policies, inactive topic policies, subscription expiration time, and namespace properties in namespace reconciliation
  • Increases operator memory limits to accommodate enhanced policy management

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/utils/spec.go Updates test helper functions to explicitly set backlog quota retention policy and type
tests/operator/resources_test.go Adds comprehensive tests for subscription expiration time, backlog quota validation, and clearing various policies
pkg/connection/reconcile_topic.go Adds BacklogQuotaType parameter to topic creation and logging
pkg/admin/interface.go Adds BacklogQuotaType field to TopicParams struct
pkg/admin/impl.go Refactors backlog quota logic into shared buildBacklogQuota function, adds handlers for persistence policies, inactive topic policies, subscription expiration, and properties
docs/pulsar_topic.md Updates documentation to indicate backlogQuotaRetentionPolicy is conditional (required when limits are set)
docs/pulsar_namespace.md Updates documentation with conditional requirement and adds example with backlogQuotaRetentionPolicy
config/manager/manager.yaml Increases memory limits from 128Mi to 512Mi and requests from 64Mi to 128Mi
config/default/manager_auth_proxy_patch.yaml Increases memory limits and requests to match manager.yaml
config/crd/bases/resource.streamnative.io_pulsartopics.yaml Adds enum validations for backlogQuotaRetentionPolicy and backlogQuotaType fields
config/crd/bases/resource.streamnative.io_pulsarnamespaces.yaml Adds enum validations for backlogQuotaRetentionPolicy field
charts/pulsar-resources-operator/crds/resource.streamnative.io_pulsartopics.yaml Adds enum validations matching the base CRD
charts/pulsar-resources-operator/crds/resource.streamnative.io_pulsarnamespaces.yaml Adds enum validations matching the base CRD
api/v1alpha1/zz_generated.deepcopy.go Adds generated DeepCopy code for BacklogQuotaType field
api/v1alpha1/pulsartopic_types.go Adds BacklogQuotaType field with enum validation to PulsarTopicSpec
api/v1alpha1/pulsarnamespace_types.go Adds enum validation kubebuilder marker to BacklogQuotaRetentionPolicy field

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@freeznet freeznet merged commit 2980b26 into main Dec 11, 2025
10 checks passed
@freeznet freeznet deleted the freeznet/fix-subscriptionExpirationTime branch December 11, 2025 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-info-missing This pr needs to mark a document option in description

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants