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

[Ingress Addon] Fix bug which the networking.k8s.io/v1 ingress is always rejected #11189

Merged
merged 1 commit into from
Apr 25, 2021
Merged

[Ingress Addon] Fix bug which the networking.k8s.io/v1 ingress is always rejected #11189

merged 1 commit into from
Apr 25, 2021

Conversation

govargo
Copy link
Contributor

@govargo govargo commented Apr 24, 2021

What type of PR is this?

/kind bug
/addon ingress
/kind regression
/priority important-soon

What this PR does / why we need it:

This PR will fix the bug which the networking.k8s.io/v1 ingress is alwalys rejected.
As I described at #11121 (comment), upstream ingress-nginx(v0.44.0 and v0.45.0(latest)) doesn't allow networking.k8s.io/v1 ingress.
Ingress-nginx admission controller only support(validate) networking.k8s.io/v1beta1 ingress. networking.k8s.io/v1 ingress is not supported(validated).
But our ValidatingWebhookConfiguration manifest check both networking.k8s.io/v1beta1 and networking.k8s.io/v1.

- apiGroups:
- networking.k8s.io
apiVersions:
- v1beta1
- v1

I removed networking.k8s.io/v1 check from ValidatingWebhookConfiguration manifest.

And I add a integration test pattern to check if networking.k8s.io/v1 ingress works.

Which issue(s) this PR fixes:

Fix #11121

Does this PR introduce a user-facing change?

Yes. This PR allows to create networking.k8s.io/v1 ingress.

Before this PR

networking.k8s.io/v1 ingress is always rejected by Validating Webhook.

"failed to process webhook request" err="rejecting admission review because the request does not contain an Ingress resource but networking.k8s.io/v1, Kind=Ingress with name nginx-ingress in namespace default"

After this PR

networking.k8s.io/v1 ingress can be created.

ingress.networking.k8s.io/nginx-ingress created

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

NONE

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. kind/regression Categorizes issue or PR as related to a regression from a prior release. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 24, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @govargo. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 24, 2021
@govargo
Copy link
Contributor Author

govargo commented Apr 24, 2021

/assign @medyagh

@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 24, 2021
@govargo govargo changed the title [Ingress Addon] Add workaround for bug which the networking.k8s.io/v1 ingress is always rejected [Ingress Addon] Fix bug which the networking.k8s.io/v1 ingress is always rejected Apr 24, 2021
@medyagh
Copy link
Member

medyagh commented Apr 25, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 25, 2021
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11189) |
+----------------+----------+---------------------+
| minikube start | 50.7s    | 50.2s               |
| enable ingress | 38.9s    | 37.8s               |
+----------------+----------+---------------------+

Times for minikube start: 55.6s 47.9s 51.9s 47.3s 50.5s
Times for minikube (PR 11189) start: 49.9s 48.3s 51.1s 55.4s 46.5s

Times for minikube ingress: 43.3s 42.9s 35.3s 36.3s 36.8s
Times for minikube (PR 11189) ingress: 37.3s 36.3s 44.2s 36.3s 34.7s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11189) |
+----------------+----------+---------------------+
| minikube start | 22.2s    | 21.7s               |
| enable ingress | 33.2s    | 36.1s               |
+----------------+----------+---------------------+

Times for minikube ingress: 34.0s 33.0s 30.5s 31.0s 37.5s
Times for minikube (PR 11189) ingress: 37.5s 35.0s 36.0s 37.5s 34.5s

Times for minikube (PR 11189) start: 22.4s 22.0s 20.9s 21.8s 21.5s
Times for minikube start: 23.2s 22.1s 22.4s 22.2s 21.1s

docker driver with containerd runtime
error collecting results for docker driver: timing run 0 with minikube: timing cmd: [out/minikube addons enable ingress]: waiting for minikube: exit status 10

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: govargo, medyagh

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 Apr 25, 2021
@medyagh medyagh merged commit b31da8d into kubernetes:master Apr 25, 2021
@AllanAndrade
Copy link

Same issue with:

  • Ubuntu 22.04.2 LTS (Jammy Jellyfish)
  • Helm v3.12.2
  • Minikube v1.31.1
  • Kubectl:
    • Client Version: v1.27.3
    • Kustomize Version: v5.0.1
    • Server Version: v1.27.3

Log files:

[logs.txt](https://github.com/kubernetes/minikube/files/12174175/logs.txt)

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. kind/regression Categorizes issue or PR as related to a regression from a prior release. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
6 participants