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

Support --sort-by flag for "antctl get networkpolicy" for Agent #2604

Conversation

antoninbas
Copy link
Contributor

Previous to this change, the flag was only supported in "Controller
mode". This was a bit confusing when running "antctl get networkpolicy"
from the Agent Pod, because 1) the option shows in the examples from the
help message, and 2) the documentation doesn't make it clear that this
flag only works in "Controller mode".

Rather than update the documentation and add complexity in the help
message, I am adding support for that flag in "Agent mode". There
doesn't seem to be any reason not to.

Signed-off-by: Antonin Bas abas@vmware.com

Previous to this change, the flag was only supported in "Controller
mode". This was a bit confusing when running "antctl get networkpolicy"
from the Agent Pod, because 1) the option shows in the examples from the
help message, and 2) the documentation doesn't make it clear that this
flag only works in "Controller mode".

Rather than update the documentation and add complexity in the help
message, I am adding support for that flag in "Agent mode". There
doesn't seem to be any reason not to.

Signed-off-by: Antonin Bas <abas@vmware.com>
@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2021

Codecov Report

Merging #2604 (d5ed336) into main (382f49e) will increase coverage by 18.35%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2604       +/-   ##
===========================================
+ Coverage   42.05%   60.40%   +18.35%     
===========================================
  Files         153      282      +129     
  Lines       18565    22412     +3847     
===========================================
+ Hits         7807    13538     +5731     
+ Misses      10060     7451     -2609     
- Partials      698     1423      +725     
Flag Coverage Δ
e2e-tests ∅ <ø> (?)
kind-e2e-tests 47.38% <ø> (?)
unit-tests 42.03% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/antctl/antctl.go 100.00% <ø> (ø)
pkg/antctl/command_definition.go 53.97% <100.00%> (+0.11%) ⬆️
pkg/apiserver/certificate/certificate.go 69.86% <0.00%> (-6.85%) ⬇️
pkg/apiserver/handlers/webhook/convert_crd.go 2.56% <0.00%> (ø)
pkg/apiserver/handlers/webhook/mutation_labels.go 24.71% <0.00%> (ø)
...formers/externalversions/ops/v1alpha1/interface.go 100.00% <0.00%> (ø)
...versions/security/v1alpha1/clusternetworkpolicy.go 64.28% <0.00%> (ø)
pkg/agent/interfacestore/types.go 72.72% <0.00%> (ø)
pkg/agent/nodeportlocal/util/parse_port.go 20.00% <0.00%> (ø)
...formers/externalversions/ops/v1alpha1/traceflow.go 64.28% <0.00%> (ø)
... and 231 more

Copy link
Contributor

@abhiraut abhiraut left a comment

Choose a reason for hiding this comment

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

thanks!

@antoninbas
Copy link
Contributor Author

/test-all

Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

LGTM

@antoninbas antoninbas merged commit 098089a into antrea-io:main Aug 18, 2021
@antoninbas antoninbas deleted the support-sort-by-flag-for-agented-antctl-get-networkpolicy branch August 18, 2021 16:38
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.

4 participants