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

Fix CNAME record when multiple router canonical name are defined in Route Status. #2400

Conversation

miheer
Copy link
Contributor

@miheer miheer commented Oct 25, 2021

Description

In OCP when you have multiple ingress controllers the route's status'es Ingress object get populated with multiple router canonical names. So in this case, the external dns tries to add multiple CNAME records for same host in the same hosted zone which is a violation of RFC 1912  and therefore is rejected by standards-compliant DNS services.

This feature adds a router field to the OCP Route Source so that a user can add an ingress controller name in flag --openshift-router-name which will be used to pick up the respective router canonical name from Route's Status Ingress Object.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 25, 2021
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 25, 2021
@miheer miheer force-pushed the add-router-field-for-ocpRouteSource branch from 9cd9420 to d4f7d08 Compare October 25, 2021 06:23
@miheer miheer changed the title WIP: Fix CNAME record when multiple router canonical name are defined in Route Status. Fix CNAME record when multiple router canonical name are defined in Route Status. Oct 25, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 25, 2021
@miheer miheer force-pushed the add-router-field-for-ocpRouteSource branch 3 times, most recently from 8734d6d to 719224f Compare October 26, 2021 08:08
@alebedev87
Copy link
Contributor

LGTM

@miheer
Copy link
Contributor Author

miheer commented Oct 26, 2021

@seanmalloy @Raffo PTAL. Thanks in advance!

@miheer miheer force-pushed the add-router-field-for-ocpRouteSource branch from 719224f to 6876a3f Compare October 26, 2021 14:11
@seanmalloy
Copy link
Member

/cc @vinny-sabatini

@miheer miheer force-pushed the add-router-field-for-ocpRouteSource branch 4 times, most recently from 194437b to 208995f Compare October 27, 2021 07:42
@seanmalloy
Copy link
Member

@miheer all the code change look good. Can you also update the docs here: https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/openshift.md

I believe once this PR merges external-dns will work on OCP v4.x routes, so that should be documented. Also would be good to add a section on this new CLI option --openshift-router-name.

@miheer miheer force-pushed the add-router-field-for-ocpRouteSource branch from 208995f to 4637ae7 Compare November 3, 2021 02:50
…Ingress object get populated with multiple router canonical names. So in this case, the external dns tries to add multiple CNAME records for same host in the same hosted zone which is a violation of RFC 1912  and therefore is rejected by standards-compliant DNS services.

This feature adds a router field to the OCP Route Source so that a user can add an ingress controller name in flag --ocp-router-name which will be used to pick up the respective routerCanonicalHostname from Route's Status Ingress Object.

Signed-off-by: Miheer Salunke <miheer.salunke@gmail.com>
@miheer miheer force-pushed the add-router-field-for-ocpRouteSource branch from 4637ae7 to ab8a620 Compare November 3, 2021 02:53
@miheer
Copy link
Contributor Author

miheer commented Nov 3, 2021

@seanmalloy PTAL . I have made the changes in the documentation.

@seanmalloy
Copy link
Member

/kind feature
/lgtm
/assign @Raffo @njuettner

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 3, 2021
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 3, 2021
@miheer
Copy link
Contributor Author

miheer commented Nov 4, 2021

@Raffo @njuettner PTAL. Your attention on this will be highly appreciated. Thanks in advance!

@miheer
Copy link
Contributor Author

miheer commented Nov 9, 2021

@Raffo @njuettner Can you please review ? This is a blocker for working of OCP major functionality. Your urgent attention on this will be highly appreciated.

Copy link
Member

@njuettner njuettner left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: miheer, njuettner, vinny-sabatini

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 Nov 19, 2021
@k8s-ci-robot k8s-ci-robot merged commit 9cf3d49 into kubernetes-sigs:master Nov 19, 2021
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants