Skip to content

refactor(registry): introduce factory with uniform New constructors#6277

Merged
k8s-ci-robot merged 9 commits intokubernetes-sigs:masterfrom
gofogo:feat-registry-factory-registry
Mar 16, 2026
Merged

refactor(registry): introduce factory with uniform New constructors#6277
k8s-ci-robot merged 9 commits intokubernetes-sigs:masterfrom
gofogo:feat-registry-factory-registry

Conversation

@ivankatliarchuk
Copy link
Copy Markdown
Member

@ivankatliarchuk ivankatliarchuk commented Mar 15, 2026

What does it do ?

  • registry/registry.go was doing two things — defining the interface and wiring up all sub-packages. Splitting it mirrors the existing provider/factory pattern: the interface lives alone (no sub-package imports, no cycles), each sub-package owns its New(cfg, p), and the factory handles selection. Adding named constants eliminates the scattered raw strings.

  • each sub-package exposes New(cfg, p) with the uniform signature, and the old verbose constructor becomes unexported newRegistry.

Motivation

Registry to mirror provider factory #6276
#6269 (comment)

More

  • Yes, this PR title follows Conventional Commits
  • Yes, I added unit tests
  • [] Yes, I updated end user documentation accordingly

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
@k8s-ci-robot k8s-ci-robot added the apis Issues or PRs related to API change label Mar 15, 2026
@k8s-ci-robot k8s-ci-robot added controller Issues or PRs related to the controller registry Issues or PRs related to a registry cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 15, 2026
@coveralls
Copy link
Copy Markdown

coveralls commented Mar 15, 2026

Pull Request Test Coverage Report for Build 23140224494

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 111 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.07%) to 78.12%

Files with Coverage Reduction New Missed Lines %
noop/noop.go 12 47.83%
awssd/registry.go 14 70.91%
txt/registry.go 21 91.43%
dynamodb/registry.go 64 83.57%
Totals Coverage Status
Change from base Build 23137617424: -0.07%
Covered Lines: 16570
Relevant Lines: 21211

💛 - Coveralls

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 15, 2026
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 15, 2026
Copy link
Copy Markdown
Collaborator

@mloiseleur mloiseleur left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 16, 2026
@ivankatliarchuk
Copy link
Copy Markdown
Member Author

/test pull-external-dns-unit-test

@ivankatliarchuk
Copy link
Copy Markdown
Member Author

/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ivankatliarchuk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 16, 2026
@k8s-ci-robot k8s-ci-robot merged commit 8906c3b into kubernetes-sigs:master Mar 16, 2026
18 checks passed
@ivankatliarchuk ivankatliarchuk deleted the feat-registry-factory-registry branch March 16, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apis Issues or PRs related to API change approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. controller Issues or PRs related to the controller lgtm "Looks good to me", indicates that a PR is ready to be merged. registry Issues or PRs related to a registry size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants