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

dnsprovider: Add upsert #39957

Merged
merged 1 commit into from
Feb 7, 2017

Conversation

justinsb
Copy link
Member

Although Google Cloud DNS requires strict add & remove calls, most
dnsproviders actually support upsert, and an add & remove is much more
expensive (primarily because of the need to fetch the pre-image).

Add support for 'upsert' operations, which don't require the pre-image,
and simply overwrite the existing record. This is much cheaper on
Amazon Route53, for example.

NONE

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 16, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. labels Jan 16, 2017
@justinsb
Copy link
Member Author

Issue #39674 - this is actually a better fix than #39085 for "blind writes", because if the zone is big enough we can't efficiently list all the records, and if we are updating enough records we can't list them individually also.

@ghost
Copy link

ghost commented Jan 17, 2017

@justinsb I think that you mean #39805 , and not #39085 ?

@justinsb
Copy link
Member Author

Quite right, I do quinton. Sorry to disparage the very worthy 39085 :-)

@@ -68,6 +68,10 @@ type ResourceRecordChangeset interface {
// Remove adds the removal of a ResourceRecordSet in the Zone to the changeset
// The supplied ResourceRecordSet must match one of the existing recordsets (obtained via List()) exactly.
Remove(ResourceRecordSet) ResourceRecordChangeset
// Upsert adds an "create or update" operation for the ResourceRecordSet in the Zone to the changeset
// Note: the implementation may translate this into Add & Remove operations. If you have the pre-image,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Remove and then Add?

@ghost
Copy link

ghost commented Jan 25, 2017

/lgtm
/approve

@justinsb, my apologies for the delay on this one.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 25, 2017
@ghost ghost added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 25, 2017
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 25, 2017
Although Google Cloud DNS requires strict add & remove calls, most
dnsproviders actually support upsert, and an add & remove is much more
expensive (primarily because of the need to fetch the pre-image).

Add support for 'upsert' operations, which don't require the pre-image,
and simply overwrite the existing record.  This is much cheaper on
Amazon Route53, for example.
@k8s-github-robot k8s-github-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 29, 2017
@justinsb
Copy link
Member Author

Rebased and fixed the comment per your suggestion @quinton-hoole - thanks!

@ghost
Copy link

ghost commented Jan 29, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 29, 2017
@ghost
Copy link

ghost commented Jan 29, 2017

The integration test failure seems to be completely unrelated to this PR.

@ghost
Copy link

ghost commented Jan 30, 2017

@k8s-bot test this issue #39908

@k8s-github-robot k8s-github-robot assigned nikhiljindal and unassigned ghost Jan 30, 2017
@apelisse apelisse assigned ghost Jan 31, 2017
@nikhiljindal
Copy link
Contributor

/lgtm
/approve

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

The following people have approved this PR: justinsb, nikhiljindal

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit b2ea780 into kubernetes:master Feb 7, 2017
mtaufen pushed a commit to mtaufen/kubernetes that referenced this pull request Feb 7, 2017
Automatic merge from submit-queue

dnsprovider: Add upsert

Although Google Cloud DNS requires strict add & remove calls, most
dnsproviders actually support upsert, and an add & remove is much more
expensive (primarily because of the need to fetch the pre-image).

Add support for 'upsert' operations, which don't require the pre-image,
and simply overwrite the existing record.  This is much cheaper on
Amazon Route53, for example.

```release-note
NONE
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants