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

Add command to show CiliumIdentity statistics #15

Merged
merged 2 commits into from
Nov 19, 2024
Merged

Add command to show CiliumIdentity statistics #15

merged 2 commits into from
Nov 19, 2024

Conversation

yokaze
Copy link
Contributor

@yokaze yokaze commented Nov 13, 2024

This PR adds the following two commands:

  • npv id summary: count CiliumIdentity by namespace
$ npv id summary
NAMESPACE          IDENTITY
default            1
kube-system        2
local-path-storage 1
test               12
  • npv id label: show cardinality and values of security-relevant labels in a namespace
$ npv id label -n test
LABEL                                   COUNT VALUES
k8s:group                               1     test
k8s:io.cilium.k8s.policy.serviceaccount 1     default
k8s:test                                12    l3-egress-explicit-deny-all,l3-egress-implicit-deny-all,l3-ingress-explicit-allow-all,l3-ingress-explicit-deny-all,l3-ingress-implicit-deny-all,l4-egress-explicit-deny-any,l4-egress-explicit-deny-tcp,l4-ingress-explicit-allow-any,l4-ingress-explicit-allow-tcp,l4-ingress-explicit-deny-any,l4-ingress-explicit-deny-udp,self

@yokaze yokaze requested a review from chez-shanpu November 13, 2024 06:06
cmd/npv/app/id_label.go Outdated Show resolved Hide resolved
cmd/npv/app/id_summary.go Outdated Show resolved Hide resolved
Signed-off-by: Daichi Sakaue <[email protected]>
@yokaze yokaze requested a review from chez-shanpu November 19, 2024 01:02
Copy link
Contributor

@chez-shanpu chez-shanpu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yokaze yokaze merged commit 98c7b0f into main Nov 19, 2024
1 check passed
@yokaze yokaze deleted the impl-id branch November 20, 2024 04:05
@yokaze yokaze self-assigned this Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants