-
Notifications
You must be signed in to change notification settings - Fork 240
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
[Bug] Unique host and path ingress policy is blocking updates #1163
Comments
Hi @Fauli - we have Chainsaw tests covering this policy https://github.com/kyverno/policies/tree/main/other/unique-ingress-host-and-path/.chainsaw-test. I tried locally using 1.12.5 and was not able to replicate the issue, I installed the policy, and created the following ingress: apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: goodingress01
spec:
rules:
- host: bar
http:
paths:
- backend:
service:
name: demo-svc
port:
number: 8080
path: /foo
pathType: Prefix And updated the path /foo to /bar, and it went through:
Please share detailed resource manifests so we can reproduce the issue. |
Hello @realshuting Thanks for the quick reply! My exact steps for re-creation are:
For the last step, you can also just use this command and get the same result: Let me know if you have any further questions regarding the recreation steps. |
Still not able to reproduce it -
I'm running 1.12.5. |
Hello @realshuting |
Hello @realshuting I updated to /kyverno/kyverno:v1.12.5 and ran the tests again: $ k annotate ingress goodingress01 test=ok
Error from server: admission webhook "validate.kyverno.svc-fail" denied the request:
resource Ingress/fauli/goodingress01 was blocked due to the following policies
unique-ingress-host-and-path:
check-host-path-combo: 'validation failure: The Ingress host and path combination
must be unique across the cluster.' Still facing the same issue. I guess your test works because you only run the policy in audit, and not enforce to actually prevent the creation of a second ingress with an already existing combination of host and path? |
Nice catch @Fauli - let me try it again. |
I can confirm the issue exists in 1.12.5 but not 1.13.0-beta.1:
You can expect the fix in 1.13.0 GA release. |
Hello @realshuting Thanks for the update! |
We are on 1.13.0-rc.1 and trying to get kyverno/kyverno#3837 in. We will cut rc.2 once it's completed and hopefully GA comes after that. |
Kyverno Version
1.12
Kubernetes Version
1.29
Kubernetes Platform
AKS
Description
I'm refering to #833
I'm using v1.12.3, and am still facing this issue. Not sure if it was ever resolved?
My policy is the stadard one from the documentation:
https://kyverno.io/policies/other/unique-ingress-host-and-path/unique-ingress-host-and-path/
Upon editing an existing ingress, I face:
Do you know if this has ever been fixed and tested?
Steps to reproduce
Expected behavior
Save works, ingress is only colloding with itself, so should be fine.
Screenshots
No response
Kyverno logs
No response
Slack discussion
No response
Troubleshooting
The text was updated successfully, but these errors were encountered: