-
Notifications
You must be signed in to change notification settings - Fork 370
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
Sort Options ANP/ACNP combine Policy TIER + Policy Priority inside TIER #1388
Comments
thanks for the report. kubectl output to sort policies based on tier and policy priority is not so trivial. Having said that, it is indeed a valuable ask and I will try to get back to you with a solution. |
one potential solution to this could be to add a new field |
@abhiraut PolicyPriority is a float. If we want to set something like "TierPriority.PolicyPriority" the |
does seem to work on strings on a dry run i did once |
|
maybe some sort of a float normalization using the two priorities. so that the field remains a float and sort on that |
@Dyanngg I believe we can close this issue? |
Yes somehow I did not point the original PR to close this. Thanks for the reminder. |
Describe the problem/challenge you have
With “kubectl get acnp” you can sort the policies either by name, tier or priority, but it is not possible to combine TIER Pirority + Policy Priority.
Also sorting by Tier will be done by the tier-name and not tier-priority.
Example:
kubectl get acnp --sort-by=.spec.priority
NAME TIER PRIORITY
PA1 application 10
PA2 application 20
PA3 application 30
PE1 emergency 50
PA3 application 100
PS1 SecurityOps 100
PS2 SecurityOps 101
PA4 application 110
PA5 application 130
As you can see the order is correct regarding priority, but I would like to see the order 1st emergency, 2nd SecurityOps, 3rd application and then priority in each tier.
Describe the solution you'd like
May it’s possible to combine the two values from TIER and Priority in one number.
Example how it can look like:
Tier emergency has prio 5
Policy in emergency has prio 100
Result in Priority can be 5:100
kubectl get acnp --sort-by=.spec.priority
NAME TIER PRIORITY
PE1 emergency 5:50
PS1 SecurityOps 50:100
PS2 SecurityOps 50:101
PA1 application 250:10
PA2 application 250:20
The text was updated successfully, but these errors were encountered: