Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ovh: improve cache invalidation on errors + dry-run mode + relative CNAME handling + optimization #5143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rbeuque74
Copy link
Contributor

Hello 👋

Description

Major rewriting of the OVHcloud provider:

  • better DNS record update process: previously, updated record were performing a delete+create operation, now it perform an update operation
  • dry-run has been implemented
  • better cache invalidation on errors: we now perform a more optimized cache invalidation, without refreshing the DNS zone to avoid inconsistent zone push
  • relative CNAME handling: previous implementation handled only absolut CNAME target, we now allow to use relative one (optional to avoid breaking changes for exisitng users)
  • maintainers update: as part of the OVHcloud API core team, I will maintain the provider part :)

Checklist

  • Unit tests updated
  • End user documentation updated

@k8s-ci-robot k8s-ci-robot requested a review from mloiseleur March 5, 2025 00:20
@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 raffo for approval. For more information see the Code Review Process.

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

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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 5, 2025
@k8s-ci-robot k8s-ci-robot requested a review from szuecs March 5, 2025 00:20
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 5, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @rbeuque74. 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.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 5, 2025
@mloiseleur
Copy link
Contributor

Hello @rbeuque74,

We have started the process to move providers out of tree, with a webhook system. See #4347 and webhook provider doc

Since you seem to work for OVH, wdyt about creating a webhook provider for OVH ?

As you can see, there are already many webhook providers.

@rbeuque74
Copy link
Contributor Author

Hello @mloiseleur

That seem a great idea that we can put in our backlog.
What is the suggested workflow for existing users that will have to migrate ?

Also, since #4932, changes regarding cache invalidation cause users that have multiple instances of external-dns to harmer the OVHcloud DNS API.
I would like to have this merge prior the webhook migration.

Thanks
Romain

@ivankatliarchuk
Copy link
Contributor

The pull request seems like doing more then just cache invalidation. Am I understand the changes correctly?

@rbeuque74
Copy link
Contributor Author

Yes indeed, I took the opportunity to refactor a bit how things were working in the ovh provider engine.
UpdateOld and UpdateNew changes were always triggering deletion of the records and re-creation of the records associated to the endpoint, while sometime it just needed to add a new record, or just update an existing one.
This will prevent the item deleted error while applying the changes.

Also, we improved the cache regarding already fetched records between Records and ApplyChanges to prevent unnecessary fetching.

@ivankatliarchuk
Copy link
Contributor

I'll try to review code as soon as I could. Could you also provide a set of manual test steps using manifests and kubectl commands? This will help in understanding and verifying the implementation for areas touched? example #5085 (comment)

@ivankatliarchuk
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 5, 2025
@rbeuque74
Copy link
Contributor Author

/retest

…tive CNAME handling + optimization

Signed-off-by: Romain Beuque <[email protected]>
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants