-
Notifications
You must be signed in to change notification settings - Fork 336
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
Policy generated wrong rules #12482
Comments
An easy way to reproduce it, we can use the unit test
And create a
|
It's actually by design, that the order of items in type: MeshTrafficPermission
mesh: default
name: mtp-mix
spec:
targetRef:
kind: Mesh
from:
- targetRef:
kind: Mesh
default:
action: Allow
- targetRef:
kind: MeshSubset
tags:
k8s.kuma.io/service-name: nginx-service-1
default:
action: Deny |
From the doc, isn't that the MeshSubset has higher priority than Mesh? |
If we can use new design to replace it, that would be good. |
It applies to the order that's used when multiple policies are merged, i.e. if you'd have |
Close it as it's designed |
What happened?
Kuma Version
2.9.2
What happened?
When I went through the BuildRules function, I found the generated rules might be wrong.
How to reproduce?
2.9.2
mTLS
nginx-1
andnginx-2
can requesthttpbin-1_kuma-demo_svc_8000.mesh
Additional Context
I tried to debug the
BuildRules
function and found the aboveMeshTrafficPermission
policy would generate the following rules:Actually, I think the first Subset
{Key: k8s.kuma.io/service-name, Not: false, Value: nginx-service-1 }
should own the actionDeny
right?The text was updated successfully, but these errors were encountered: