Closed Hong-Chang closed 3 years ago
I feel this can be simplified to use just pod_and_namespace APIs / functions that can handle both. Can you please look into it? That would be a lot less code to test/maintain.
pod/ namespace/ pod and namespace are 3 different rules and they are independent. Although we can forcely combine them together by adding some extra tags in one api, it will break single responsibility principle.
I just spoke to Hong and he explained why we need to have separate tables for pod, ns, and pod+ns. This looks good to me. Please get @clu2xlu / @phudtran to review, and merge if they don't have any issues. /lgtm
What does this PR do?
Why is it needed? After the pr, label-policy data are stored in xdp table for future retrieving.
How was this tested? I added unit tests and did manual e2e test. The label-policy data were generated from operator and eventually observed in xdp table.
Are there any user facing / API changes? No.
Closes #455 , close #456