Skip to content

refactore(source): move SuitableType to endpiont package#6239

Open
ivankatliarchuk wants to merge 5 commits intokubernetes-sigs:masterfrom
gofogo:refactore-move-suitable-type
Open

refactore(source): move SuitableType to endpiont package#6239
ivankatliarchuk wants to merge 5 commits intokubernetes-sigs:masterfrom
gofogo:refactore-move-suitable-type

Conversation

@ivankatliarchuk
Copy link
Member

@ivankatliarchuk ivankatliarchuk commented Mar 1, 2026

What does it do ?

Move SuitableType away from source.

related: #6248

Motivation

  1. Reusability without import cycles — endpoint is a foundational package imported by source, plan, provider, controller, etc. By putting SuitableType there, any package that already imports endpoint can use it without importing source. Before the move, any non-source package needing this logic would have to duplicate it or create a cycle.
  2. Logical placement — SuitableType operates purely on DNS record type constants (RecordTypeA, RecordTypeAAAA, RecordTypeCNAME) that live in the endpoint package. Having the function that maps a target string to those constants sit next to the constants themselves is the natural home for it. Keeping it in source was an accident of where it was first needed, not where it belongs conceptually.

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
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign szuecs for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 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 1, 2026
@coveralls
Copy link

coveralls commented Mar 1, 2026

Pull Request Test Coverage Report for Build 22621694429

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 53 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.02%) to 79.15%

Files with Coverage Reduction New Missed Lines %
utils.go 1 98.44%
pihole/clientV6.go 21 92.45%
gateway.go 31 85.78%
Totals Coverage Status
Change from base Build 22540459008: -0.02%
Covered Lines: 16035
Relevant Lines: 20259

💛 - Coveralls

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
@k8s-ci-robot k8s-ci-robot added the provider Issues or PRs related to a provider label Mar 1, 2026
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. provider Issues or PRs related to a provider size/L Denotes a PR that changes 100-499 lines, ignoring generated files. source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants