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

Pretty printing for AntreaAgentInfo and AntreaControllerInfo #2572

Conversation

antoninbas
Copy link
Contributor

@antoninbas antoninbas commented Aug 10, 2021

We define "Additional printer columns" for these CRDs, so that more
valuable information is shown to the user when displaying them with
kubectl.

abas-a01:antrea abas$ kubectl get antreacontrollerinfo
NAME                HEALTHY   LAST HEARTBEAT
antrea-controller   True      35s
abas-a01:antrea abas$ kubectl get antreacontrollerinfo -o wide
NAME                HEALTHY   LAST HEARTBEAT   VERSION               CONNECTED AGENTS   NODE                NUM NETWORK POLICIES
antrea-controller   True      38s              v1.3.0-dev-74d371de   2                  k8s-node-worker-1   1
abas-a01:antrea abas$ kubectl get antreaagentinfo
NAME                     HEALTHY   LAST HEARTBEAT
k8s-node-control-plane   True      43s
k8s-node-worker-1        True      44s
abas-a01:antrea abas$ kubectl get antreaagentinfo -o wide
NAME                     HEALTHY   LAST HEARTBEAT   VERSION               NODE                     NUM PODS   SUBNETS
k8s-node-control-plane   True      45s              v1.3.0-dev-74d371de   k8s-node-control-plane              ["10.10.0.0/24"]
k8s-node-worker-1        True      46s              v1.3.0-dev-74d371de   k8s-node-worker-1        8          ["10.10.1.0/24"]
abas-a01:antrea abas$

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

We define "Additional printer columns" for these CRDs, so that more
valuable information is shown to the user when displaying them with
kubectl.

Signed-off-by: Antonin Bas <abas@vmware.com>
@antoninbas antoninbas added this to the Antrea v1.3 release milestone Aug 10, 2021
@codecov-commenter
Copy link

codecov-commenter commented Aug 10, 2021

Codecov Report

Merging #2572 (9b2ac08) into main (fe4457f) will increase coverage by 4.92%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2572      +/-   ##
==========================================
+ Coverage   60.09%   65.02%   +4.92%     
==========================================
  Files         281      281              
  Lines       22243    25506    +3263     
==========================================
+ Hits        13366    16584    +3218     
+ Misses       7467     7381      -86     
- Partials     1410     1541     +131     
Flag Coverage Δ
e2e-tests 55.85% <ø> (?)
kind-e2e-tests 47.09% <ø> (+0.18%) ⬆️
unit-tests 42.50% <ø> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
pkg/controller/egress/ipallocator/allocator.go 67.82% <0.00%> (-15.16%) ⬇️
pkg/controller/networkpolicy/endpoint_querier.go 77.64% <0.00%> (-13.79%) ⬇️
pkg/apis/controlplane/v1beta1/conversion.go 72.44% <0.00%> (-11.89%) ⬇️
pkg/legacyapis/core/v1alpha2/register.go 69.23% <0.00%> (-10.77%) ⬇️
pkg/controller/egress/controller.go 76.76% <0.00%> (-10.44%) ⬇️
pkg/apis/stats/register.go 71.42% <0.00%> (-10.39%) ⬇️
pkg/legacyapis/stats/register.go 71.42% <0.00%> (-10.39%) ⬇️
pkg/ovs/openflow/ofctrl_meter.go 33.84% <0.00%> (-10.16%) ⬇️
pkg/legacyapis/security/v1alpha1/register.go 73.33% <0.00%> (-10.00%) ⬇️
pkg/agent/config/traffic_encap_mode.go 91.30% <0.00%> (-8.70%) ⬇️
... and 265 more

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, nice improvement

@tnqn
Copy link
Member

tnqn commented Aug 11, 2021

/test-all

@antoninbas antoninbas merged commit f679865 into antrea-io:main Aug 11, 2021
@antoninbas antoninbas deleted the pretty-printing-for-AntreaAgentInfo-and-AntreaControllerInfo branch August 11, 2021 18:53
annakhm pushed a commit to annakhm/antrea that referenced this pull request Aug 16, 2021
…io#2572)

We define "Additional printer columns" for these CRDs, so that more
valuable information is shown to the user when displaying them with
kubectl.

Signed-off-by: Antonin Bas <abas@vmware.com>
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