-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
webhook admission controller error - no validation for extensions/v1beta1 or networking.k8s.io/v1 ingresses #7066
Comments
/remove-kind bug Can you help by providing following information ;
|
/triage needs-information |
Hello, I think I understand why this is not working.
meaning that we are sending each validation request for each apiGroup to the same endpoint: I split this ValidatingWebhookConfiguration into three separated instances, using the following configuration:
and it seems to work now. Could you please confirm this configuration ? Thanks and regards. |
Depends on version of kubernetes. Can you kindly close the issue.
Thanks,
; Long
…On Thu, 22 Apr, 2021, 7:33 PM arno-snop, ***@***.***> wrote:
Hello,
I think I understand why this is not working.
We are using the same (unique) ValidatingWebhookConfiguration for a long
time with the following configuration:
[...]
service:
name: ingress-private-validation-webhook
namespace: ingress-controllers
path: /extensions/v1beta1/ingress
port: 443
[...]
rules:
- apiGroups:
- networking.k8s.io
- extensions
apiVersions:
- '*'
operations:
- CREATE
- UPDATE
resources:
- ingresses
scope: '*'
meaning that we are sending each validation request for each apiGroup to
the same endpoint: /extensions/v1beta1/ingress.
I split this ValidatingWebhookConfiguration into three separated
instances, using the following configuration:
apiGroup Version endpoint
extensions v1beta1 /extensions/v1beta1/ingress
networking.k8s.io v1beta1 /networking/v1beta1/ingress
networking.k8s.io v1 /extensions/v1/ingress
and it seems to work now.
Could you please confirm this configuration ?
Thanks and regards.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7066 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGZVWXLM6LFFAEBMSMJEYDTKAUENANCNFSM43KBYW6A>
.
|
I understand that the list of apiGroup depends on kubernetes version, but on nginx controller side, can you please confirm that the service path to use are the ones above ? |
on k8s v1.21 I am seeing this /networking/v1beta1/ingresses . |
I'm using k8s 1.19, but here you are talking about k8s ingress api support, and i'm aware that in 1.22, only networking.k8s.io/v1 will be supported. What i need to understand is wath is the service path on ingress controller side to send admission request to (path configured in service part of ValidatingWebhookConfiguration object)?
|
Based on a live working cluster's resource, I can confirm these 2 ;
I also think the 1st one is good. They seem to be the api path. I guess you can look at the code or a developer should confirm. I think this is already documented. |
I think there is something that I not really understand here. When we first start to use the admission controller validating webhook on ingress-controller side, we follow this documentation (v0.25.1): The way to make it work was to
We still deploy current version (v0.41.2) using this procedure. So, if we don't deploy ValidatingWebhookConfiguration how k8s will target ingress-controller validating-webhook? |
That is 2 yrs old. |
@arno-snop EKS: 1.19
|
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
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. |
NGINX Ingress controller version:
v0.41.2
Kubernetes version (use
kubectl version
):Environment:
uname -a
): Linux lnx001617 3.10.0-1160.24.1.el7.x86_64 Basic structure #1 SMP Thu Apr 8 19:51:47 UTC 2021 x86_64 x86_64 x86_64 GNU/LinuxWhat happened:
Here my
ValidatingWebhookConfiguration
rules:Try to deploy diffrent ingresses api with the following incorrect annotation:
Webhook admission controller seems to validate configuration only for networking.k8s.io/v1beta1 ingress api version.
Deployment result ok (validation failure was expected here):
Admission controller result:
Deployment result ko (expected behavior):
Deployment result ok (validation failure was expected here):
# k apply -f networking_v1_ingress_invalid_annotations.yaml ingress.networking.k8s.io/networking-v1-ingress-invalid-annotations created
Admission controller result:
What you expected to happen:
At least
networking.k8s.io/v1beta1
andnetworking.k8s.io/v1
are supported by ingress admission controller webhook. Ideally, kubernetes n and n-1 versions valid ingresses should be supported by admission controller.How to reproduce it:
Deploy an v0.41.2 ingress controller with an ValidatingWebhookConfiguration rules targeting
networking.k8s.io/v1beta1
,networking.k8s.io/v1
andextensions/v1beta1
object and deploy the following ingresses:extensions/v1beta1 test ingress
networking.k8s.io/v1beta1 test ingress
networking.k8s.io/v1 test ingress
Anything else we need to know:
I notice there are issues related to this admission controller errors:
that should be included in v0.41.2 version but i still have the problems as decribed above.
/kind bug
The text was updated successfully, but these errors were encountered: