-
Notifications
You must be signed in to change notification settings - Fork 106
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
--policies=* does not appear to be working #55
Comments
Yes with |
Yup I had done that @ashutosh-narkar, I could only get it to pick up poliies when using --policies=a,b,c and being explicit with namespaces. |
@ashutosh-narkar could I be missing anything else here? have tried various things and had no luck with --policies=* it is working only if I use --policies with an explicit namespace. |
You can remove |
No luck @ashutosh-narkar, no combination of quotes gets it working using --policies=* but as soon as I change it to --policies=test being the namespace my policy is in it loads it fine. |
Ok @stefansedich , I will try this out too. |
I'm seeing similar behavior but it seems to be inconsistent. One thing I noticed that I could kind of consistently reproduce but didn't make sense is that if I launch with I couldn't reproduce this behavior consistently, but I seemed to be able to reproduce it very often. I was applying changes and checking the objects in quick succession, so it's possible there some race condition that made the behavior inconsistent. I tested on both 0.10 and 0.11, on Kubernetes (k3s) 1.15. I can try running more tests later if I have time. |
Thanks @patoarvizu for helping to reproduce the issue. Sorry about the delay in looking into this. I'll try to reproduce this myself tomorrow. |
I could reproduce the issue and the implementation for the |
When kube-mgmt was started with the "--policies=*" option, it would set the array of namespaces with an emtpy string as its only element. This would break the logic of how namespaces are matched thereby not annotating configmaps containing policy and hence policies would not be loaded. Fixes: open-policy-agent#55 Signed-off-by: Ashutosh Narkar <[email protected]>
PR: #64. As mentioned in the PR commit, the Also it would be recommended to use the |
When kube-mgmt was started with the "--policies=*" option, it would set the array of namespaces with an emtpy string as its only element. This would break the logic of how namespaces are matched thereby not annotating configmaps containing policy and hence policies would not be loaded. Fixes: #55 Signed-off-by: Ashutosh Narkar <[email protected]>
Given the following deployment:
And given the following configmap:
kube-mgmt does not appear to be loading the configmap at all, if I were to set
--policies=test
with an explicit namespace it will load the configmaps fine.I was under the impression that
--policies=*
will load from any namespace?The text was updated successfully, but these errors were encountered: