refactor(endpoint): export ProviderSpecificAlias and consolidate usage#6342
refactor(endpoint): export ProviderSpecificAlias and consolidate usage#6342u-kai wants to merge 1 commit intokubernetes-sigs:masterfrom
Conversation
Signed-off-by: u-kai <76635578+u-kai@users.noreply.github.com>
| // RecordTypeNAPTR is a RecordType enum value | ||
| RecordTypeNAPTR = "NAPTR" | ||
|
|
||
| // TODO: review source/annotations package to consolidate alias key definitions; |
There was a problem hiding this comment.
AliasKey and ProviderSpecificAlias are related in that the annotation value set via AliasKey
is eventually converted into a ProviderSpecific property named ProviderSpecificAlias by the
source/annotations package.
However, they are separate definitions serving different purposes — one is a Kubernetes annotation key with a full prefix, the other is an internal property name — so keeping them as independent constants is the right approach.
The original TODO has been removed accordingly.
Pull Request Test Coverage Report for Build 23925973436Details
💛 - Coveralls |
|
/approve |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What does it do ?
Export
providerSpecificAliasasProviderSpecificAliasin the endpoint package and replace allhardcoded "alias" string literals and duplicated local definitions across the codebase with
the single exported constant.
Motivation
The "alias" key was defined in multiple places (endpoint/endpoint.go, provider/aws/aws.go) and
used as a raw string literal in many others (registry/txt/registry.go, provider/pdns/pdns.go, source/wrappers/post_processor.go, etc.).
By exporting a single constant, all consumers reference one source of truth, and the TODO comment requesting this consolidation is resolved.
More