Skip to content
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

Endpoint Querier RuleIndex not showing expected index #5782

Closed
qiyueyao opened this issue Dec 9, 2023 · 0 comments · Fixed by #5783
Closed

Endpoint Querier RuleIndex not showing expected index #5782

qiyueyao opened this issue Dec 9, 2023 · 0 comments · Fixed by #5783
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@qiyueyao
Copy link
Contributor

qiyueyao commented Dec 9, 2023

Describe the bug
The current Endpoint Querier RuleIndex shows the index of the rule among all matched rules in the policy for
this endpoint, which is not super helpful for users to find the rule from the original policy.

To Reproduce
Apply

apiVersion: crd.antrea.io/v1alpha1
kind: NetworkPolicy
metadata:
  name: test-anp
  namespace: default
spec:
    priority: 5
    tier: securityops
    appliedTo:
      - podSelector:
          matchLabels:
            app: db
    ingress:
      - action: Allow
        from:
          - podSelector:
              matchLabels:
                app: foo
        name: AllowFromFoo
      - action: Allow
        from:
          - podSelector:
              matchLabels:
                app: bar
        name: AllowFromBar

Query antctl query endpoint -p bar-pod in Antrea controller

Expected
test-anp default 1

Actual behavior
test-anp default 0

Versions:
Since feature.

@qiyueyao qiyueyao added the kind/bug Categorizes issue or PR as related to a bug. label Dec 9, 2023
@qiyueyao qiyueyao self-assigned this Dec 9, 2023
qiyueyao added a commit to qiyueyao/antrea that referenced this issue Dec 9, 2023
The current endpoint querier rule index shows the index
of the rule among all matched rules in the policy for
this endpoint, which is not super useful for the users.
This change updates the rule index to show the rule index
among all rules in the policy.

Fixes antrea-io#5782

Signed-off-by: Qiyue Yao <yaoq@vmware.com>
qiyueyao added a commit to qiyueyao/antrea that referenced this issue Dec 11, 2023
The current endpoint querier rule index shows the index
of the rule among all matched rules in the policy for
this endpoint, which is not super useful for the users.
This change updates the rule index to show the rule index
among all rules in the policy.

Fixes antrea-io#5782

Signed-off-by: Qiyue Yao <yaoq@vmware.com>
qiyueyao added a commit to qiyueyao/antrea that referenced this issue Dec 11, 2023
The current endpoint querier rule index shows the index
of the rule among all matched rules in the policy for
this endpoint, which is not super useful for the users.
This change updates the rule index to show the rule index
among all rules in the policy.

Fixes antrea-io#5782

Signed-off-by: Qiyue Yao <yaoq@vmware.com>
tnqn pushed a commit that referenced this issue Dec 12, 2023
The current endpoint querier rule index shows the index
of the rule among all matched rules in the policy for
this endpoint, which is not super useful for the users.
This change updates the rule index to show the rule index
among all rules in the policy.

Fixes #5782

Signed-off-by: Qiyue Yao <yaoq@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant