Open Dadeos-Menlo opened 1 week ago
Hi @Dadeos-Menlo. Thanks for your PR.
I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test
on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test
label.
I understand the commands that are listed here.
[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 Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
I've just discovered the existence of CRD Source, which appears to involve the crd source interrogating Kubernetes custom-resource objects of type DNSEndpoint.
Unfortunately, the DNSEndpoint
CRD exposes the providerSpecific properties, which is somewhat contrary to my previous assumptions that these represent "an internal implementation detail".
This design is very unfortunate and hopefully, given its "alpha" status, can still be addressed. A far better approach would be to have end-users apply annotations on the DNSEntrypoint
objects, in much the same way as end-users are expected to apply annotations to every other type of Kubernetes object that may be used as a source, and have the crdSource
call getProviderSpecificAnnotations(…) passing the annotations from the DNSEndpoint
object being considered.
I suggest that part of the confusion surrounding these provider-specific annotations/properties is that Endpoint.ProviderSpecific fulfils two distinct roles:
This commingling of responsibilities can easily result in unintended consequences; the most readily reproducible ones being that specifying an unsupported provider-specific property, such as suggested in the CRD source example (i.e. specifying a Cloudflare provider-specific property when using any provider other than Cloudflare) results in the DNS records generated being perpetually out-of-sync with the source object (i.e. the Endpoint
generated from the source contains the provider-specific property, the Endpoint
generated from the provider observing the pre-existing DNS record does not contain the provider-specific property, the system sees this as an inconsistency to be resolved and therefore deletes and recreates the DNS record ad infinitum).
/ok-to-test
This design is very unfortunate and hopefully, given its "alpha" status, can still be addressed. A far better approach would be to have end-users apply annotations on the
DNSEntrypoint
objects, in much the same way as end-users are expected to apply annotations to every other type of Kubernetes object that may be used as a source, and have thecrdSource
call getProviderSpecificAnnotations(…) passing the annotations from theDNSEndpoint
object being considered.
I think I agree with you: it would be more consistent to use annotations, maybe in a v1alpha2 version of the CRD.
For the webhook annotation, it was introduced because some webhook providers needs it. See for example mikrotik.
The logic seems better to me with this logic, thanks :+1: . Would you please re-add documentation on webhook and fix ci ? /retitle feat: configure arbitrary provider-specific properties via annotations
Description
Support for provider-specific annotations, that manifest as Endpoint.ProviderSpecific properties, is currently restricted to a subset of pre-defined providers. This functionality should be available to all providers, without requirement for special-case registration within the getProviderSpecificAnnotations(…) function.
The proposed changes include:
getProviderSpecificAnnotations(…)
function so as to treat all annotations prefixed withexternal-dns.alpha.kubernetes.io/
, but that are not otherwise recognised, as provider-specific propertiesNotes:
provider/property
orprovider-property
) is an internal implementation detail, and therefore the proposed renaming does not represent any backwards-incompatibility…/webhook-<custom-annotation>
is considered unwise - provider-specific properties are considered to be provider-specific, whereas the Webhook provider is considered to be a wrapper of providers, rather than a provider in and of itself (see: #4347)webhook-property
towebhook/property
has not been implemented - implementation would be trivial, but given the conclusion that provider-specific properties associated with a Webhook provider are nonsensical, such an implementation is not being initially proposedChecklist