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

Allow setting Cloudflare proxying on a per-ingress basis #650

Merged
merged 5 commits into from
Jan 28, 2019
Merged

Allow setting Cloudflare proxying on a per-ingress basis #650

merged 5 commits into from
Jan 28, 2019

Conversation

eswets
Copy link
Contributor

@eswets eswets commented Jul 27, 2018

The problem

Cloudflare offers the functionality to proxy all traffic through their servers. Currently, this feature can only be enabled globally, causing it to apply for all created records.

The solution

Using annotations, we can override the globally specified proxying option:

external-dns.alpha.kubernetes.io/cloudflare-proxied: "true"

This closes #370

Attribution

This PR was co-created with @amolenaar

@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please sign in with your organization's credentials at https://identity.linuxfoundation.org/projects/cncf to be authorized.
  • If you have done the above and are still having issues with the CLA being reported as unsigned, please email the CNCF helpdesk: [email protected]

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/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 27, 2018
@eswets
Copy link
Contributor Author

eswets commented Jul 27, 2018

CLA should now be signed by both of us.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jul 27, 2018
@njuettner njuettner self-assigned this Aug 6, 2018
@njuettner
Copy link
Member

/LGTM

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 15, 2018
@@ -107,6 +107,9 @@ func (t Targets) IsLess(o Targets) bool {
return false
}

// ProviderSpecific is a

Choose a reason for hiding this comment

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

Comment is incomplete. Can you please fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 16, 2018
@@ -107,6 +107,9 @@ func (t Targets) IsLess(o Targets) bool {
return false
}

// ProviderSpecific holds configuration which is specific to individual DNS providers
type ProviderSpecific map[string]string

Choose a reason for hiding this comment

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

Please reconsider using list of k-v values as per kubernetes api conventions. please refer to this comment for more information #657 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll take a look when I'm back from holidays (end of September)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated the type and updated the CRD docs. Could you take a look specifically if the changes to these docs are correct?

@njuettner
Copy link
Member

@shashidharatd Do you mind having a look again? 🙂

@eswets
Copy link
Contributor Author

eswets commented Nov 12, 2018

@shashidharatd Any chance you could take a look? 🙏

Copy link

@shashidharatd shashidharatd left a comment

Choose a reason for hiding this comment

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

@eswets, apologies, somehow i missed earlier notifications.
except the following comment, this lgtm. Also please do re-organize the commits to exclude commits like fixed comments etc.. Thanks!

// ProviderSpecificProperty holds the name and value of a configuration which is specific to individual DNS providers
type ProviderSpecificProperty struct {
Name string
Value string

Choose a reason for hiding this comment

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

missing json tags

@njuettner
Copy link
Member

@eswets sorry again for taking so long to merge this PR, do you mind rebase from the master again to solve the conflicting files?

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 16, 2018
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 16, 2018
@eswets
Copy link
Contributor Author

eswets commented Nov 16, 2018

That should be all!

@unix-way
Copy link

unix-way commented Dec 18, 2018

A change to an existing external-dns.alpha.kubernetes.io/cloudflare-proxied annotation does not cause a DNS record update, though it successfully triggers the generation of a new endpoint with the set provider-specific property. So the only two ways to toggle the proxy-mode after changing the annotation are to recreate a record or to do it manually. Was it done intentionally?

@materemias
Copy link

Is there anything left to be done with this, or only a lgtm is missing?

@eswets
Copy link
Contributor Author

eswets commented Jan 2, 2019

I'll take a look at the feedback from @unix-way tonight, as this behaviour is not intended. Having said that, I would like to have this merged to prevent having to fix all merge conflicts again.

@freddd
Copy link

freddd commented Jan 10, 2019

@eswets we are looking forward to this being merged as we recently started migrating some stuff to cloudflare. Did you find any blockers or is it ready to be merged? We really appreciate you taking the time to create the PR 👍

@wingZero21
Copy link

Hi,

We are also looking at using Cloudflare in the future for this so it would be great if this could be pulled in to give us the option to specify the proxy is on where required.

Cheers

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 11, 2019
@eswets
Copy link
Contributor Author

eswets commented Jan 11, 2019

I've pushed a fix for supporting updates to the external-dns.alpha.kubernetes.io/cloudflare-proxied annotation. I also did an end-to-end test with CloudFlare, and all works as expected now. So nothing is blocking a merge now as far as i can see.

@materemias
Copy link

@njuettner can this be merged?

@njuettner
Copy link
Member

/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 28, 2019
@njuettner
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: njuettner

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 28, 2019
@k8s-ci-robot k8s-ci-robot merged commit 49afe00 into kubernetes-sigs:master Jan 28, 2019
lou-lan pushed a commit to lou-lan/external-dns that referenced this pull request May 11, 2022
* Add favicon to docs

* Use svg

* Add relURL
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. 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.

Ability to set cloudflare-proxied by annotation
8 participants