-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Handle migration to the new TXT format: use ForceUpdate strategy #3635
Handle migration to the new TXT format: use ForceUpdate strategy #3635
Conversation
Welcome @mcharriere! |
/ok-to-test |
@mcharriere thanks makes sense and simplified it 😊 |
@szuecs thank you for the quick review 😄. the pr is not merging because it's missing the lgtm label. could you check that? thanks again! |
@mcharriere if I understand this correctly, using this feature brings us an ability to manually clear up all |
hi @phajduk. no, that's not correct. it still needs the at least 1 TXT record to be present in the registry (either the old format or the new one). This PR doesn't change the behavior, it only uses a different strategy. |
The model here is slightly wrong, leading to test cases for situations that will never occur. The new field will only ever be set on current Endpoints. Sources will not set it in the candidates. The new bit means "something about how this Endpoint is currently stored in the provider/registry is inconsistent". The only thing that has to happen is for the planner's We do not need tests for having ForceUpdate set in the candidates. Instead of being a new field, this could go into ProviderSpecific. |
That's the point of having a ForceUpdate, so the planner can queue endpoints for changes, independently of their real state. That's useful to solve registry inconsistencies as you said, but that's just one use case.
I don't think that's the appropriate place for it, because it's definitively not provider specific and on the other hand we don't need to keep track of the forced update. The main reason behind this PR is to simplify the migration process. Currently upgrading from 0.11 to a newer version when working with AWS in a dual zone setup (public+private). I want also to create a follow up PR based on this one to remove the old format DNS record to finalize the migration. |
Once you remove So I would say this definitely belongs in ProviderSpecific. ProviderSpecific (and PropertyValuesEqual) already provide the necessary mechanisms to cause the planner to send an update; there is no need for a new field. Separately from this, there is no need to have tests where ForceUpdate is set in candidates. There isn't a use case for that. |
This change tries to remove part of the logic added in 50f196c. The forceUpdate strategy relies on existing code of the planner to migrate TXT records to the new format, being the main goal to avoid conflicts during apply. Signed-off-by: Matias Charriere <matias@giantswarm.io>
the entire logic of missing endpoints was removed from the controller taking leverage on the planner Signed-off-by: Matias Charriere <matias@giantswarm.io>
Signed-off-by: Matias Charriere <matias@giantswarm.io>
Signed-off-by: Matias Charriere <matias@giantswarm.io>
Signed-off-by: Matias Charriere <matias@giantswarm.io>
Signed-off-by: Matias Charriere <matias@giantswarm.io>
b79feb4
to
df5e9ae
Compare
hi there. as per @johngmyers suggestion, I reimplemented the PR using a ProviderSpecific property to force the update of the records. This is a bit cleaner than before, as it removes any logic inside the planner and it's located only on the TXT registry. Thank you @johngmyers for your patience :) @szuecs @johngmyers I'd appreciate another review. thank you! |
/approve cancel |
/approve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better, thanks!
The one comment is non-blocking. I'm separately removing all special-case logic from PropertyValuesEqual
and it'd be simpler if we don't add in something I'll just remove later. Cancel the hold if you disagree.
/lgtm
/hold to give author chance to address non-blocking comment
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: johngmyers, mcharriere, szuecs The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Matias Charriere <matias@giantswarm.io>
/lgtm |
Description
This PR changes the way that missing records are handled from a specific logic to a force update strategy.
The idea basically is that instead of having a dedicated plan and a especial logic inside the planner to handle missing TXT records, external-dns can force the update of the records avoiding conflicts.
The base for this PR was introduced in #2811 and #2913
Fixes #3217
Checklist