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 nilpointer in admission and remove failing test #7255

Merged
merged 2 commits into from
Jun 21, 2021

Conversation

rikatz
Copy link
Contributor

@rikatz rikatz commented Jun 19, 2021

Signed-off-by: Ricardo Pchevuzinske Katz [email protected]

What this PR does / why we need it:

Admission webhook is used to validate conflicts between ingresses, but it fails to validate when a user tries to add a new ingress with no host and path /, as there's already in its structs a reference with Default Backend, that does not contain any ingress object inside location.Ingress (nil)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Which issue/s this PR fixes

Fixes #7198

How Has This Been Tested?

Created the controller, deployed multiple ingress specs.

Validated that:

  • When one tries to create an ingress with "/" of type Prefix or Exact it passes
  • When one tries to create an ingress of Prefix and later Exact (or vice versa) it passes, as both are not excludent and might represent different behaviors
  • Trying to create a conflict ingress of type Prefix or Exact of some already existing of the same type will fail

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 19, 2021
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 19, 2021
@rikatz
Copy link
Contributor Author

rikatz commented Jun 19, 2021

/kind bug
/priority critical-urgent
/assign @tao12345666333 @ElvinEfendi

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. labels Jun 19, 2021
@rikatz
Copy link
Contributor Author

rikatz commented Jun 19, 2021

/hold

@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 Jun 19, 2021
@rikatz rikatz closed this Jun 20, 2021
@rikatz rikatz reopened this Jun 20, 2021
…ckend ingress

Signed-off-by: Ricardo Pchevuzinske Katz <[email protected]>
@rikatz rikatz force-pushed the fix-nilpointer-admission branch from d46b7ce to 9aff9ba Compare June 20, 2021 23:44
@tao12345666333
Copy link
Member

/assign

I will follow up on this PR today or tomorrow.

Signed-off-by: Ricardo Pchevuzinske Katz <[email protected]>
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 21, 2021
@rikatz
Copy link
Contributor Author

rikatz commented Jun 21, 2021

/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 Jun 21, 2021
@rikatz rikatz changed the title Fix nilpointer in admission Fix nilpointer in admission and remove failing test Jun 21, 2021
@strongjz
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 Jun 21, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rikatz, strongjz

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

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/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't use ingress with only pathType: Exact
5 participants