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 a bug with Canary becoming main server #3521

Merged
merged 1 commit into from
Dec 6, 2018

Conversation

wayt
Copy link
Contributor

@wayt wayt commented Dec 5, 2018

What this PR does / why we need it:

A canary Ingress should never become a catch-all server if no other Ingress is a catch-all.

This PR prevent canary Ingress from becoming a catch-all server, or a server with a domain name if no regular Ingress is present.

Which issue this PR fixes

Special notes for your reviewer:

Cc @ElvinEfendi @clandry94

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 5, 2018
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 5, 2018
@wayt
Copy link
Contributor Author

wayt commented Dec 5, 2018

/assign @ElvinEfendi

@wayt wayt force-pushed the fix-canary-server branch from 9b0a7f4 to d9f0733 Compare December 5, 2018 16:32
@wayt wayt force-pushed the fix-canary-server branch from d9f0733 to 1c732d6 Compare December 5, 2018 21:53
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 5, 2018
@ElvinEfendi
Copy link
Member

What do you think of filtering out canary ingresses right at the beginning of the function at https://github.com/kubernetes/ingress-nginx/pull/3521/files#diff-86ac9ff9d75a0c5005c116e766a6127dR885? That way we would not have to care about continueing in different loops inside the function.

@wayt
Copy link
Contributor Author

wayt commented Dec 6, 2018

@ElvinEfendi that would work too, but I find it less obvious for developers and debugging.
The current implementation gives us a log about why it doesn't use an Ingress to generate a server.

@wayt wayt force-pushed the fix-canary-server branch 3 times, most recently from fcab315 to ce6f541 Compare December 6, 2018 15:59
@wayt wayt force-pushed the fix-canary-server branch from ce6f541 to af460f7 Compare December 6, 2018 16:04
@ElvinEfendi
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 6, 2018
@ElvinEfendi
Copy link
Member

/hold

will wait for @clandry94 to 👍 first

for me LGTM

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 6, 2018
@ElvinEfendi
Copy link
Member

/hold

will wait for @clandry94 to 👍 first

for me LGTM

1 similar comment
@ElvinEfendi
Copy link
Member

/hold

will wait for @clandry94 to 👍 first

for me LGTM

@ElvinEfendi
Copy link
Member

/hold

Copy link

@clandry94 clandry94 left a comment

Choose a reason for hiding this comment

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

Looks good 👍 these new unit tests give me a lot more confidence too

@ElvinEfendi
Copy link
Member

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 6, 2018
@ElvinEfendi
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ElvinEfendi, wayt

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 Dec 6, 2018
@k8s-ci-robot k8s-ci-robot merged commit 58057a2 into kubernetes:master Dec 6, 2018
@ElvinEfendi ElvinEfendi deleted the fix-canary-server branch December 6, 2018 16:54
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/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.

4 participants