antrea icon indicating copy to clipboard operation
antrea copied to clipboard

[ExternalNode] Implement SupportbundleCollection status on Controller

Open wenyingd opened this issue 2 years ago • 1 comments

Manage support bundle collection status on Controller side.

  1. Aggregate the SupportBundleCollectionNodeStatus to updat to CRD status.
  2. Report CollectionFailure condition when any Node/ExternalNode reports a failure

Signed-off-by: wenyingd [email protected]

wenyingd avatar Sep 27 '22 11:09 wenyingd

Codecov Report

Merging #4249 (9e1da34) into main (6003cfa) will increase coverage by 0.57%. The diff coverage is 90.51%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4249      +/-   ##
==========================================
+ Coverage   64.53%   65.10%   +0.57%     
==========================================
  Files         397      398       +1     
  Lines       56239    56484     +245     
==========================================
+ Hits        36292    36775     +483     
+ Misses      17287    17051     -236     
+ Partials     2660     2658       -2     
Flag Coverage Δ
e2e-tests 38.76% <2.19%> (?)
integration-tests 34.60% <ø> (+0.04%) :arrow_up:
kind-e2e-tests 48.44% <2.56%> (+0.95%) :arrow_up:
unit-tests 48.97% <89.05%> (+0.24%) :arrow_up:
Impacted Files Coverage Δ
cmd/antrea-controller/controller.go 0.00% <0.00%> (ø)
...istry/controlplane/supportbundlecollection/rest.go 79.48% <ø> (ø)
...g/controller/supportbundlecollection/controller.go 81.99% <90.15%> (+6.06%) :arrow_up:
pkg/apiserver/apiserver.go 91.09% <100.00%> (+0.09%) :arrow_up:
...ntrolplane/supportbundlecollection/subresources.go 100.00% <100.00%> (ø)
pkg/agent/cniserver/ipam/ipam_service.go 76.40% <0.00%> (-12.36%) :arrow_down:
pkg/controller/networkpolicy/tier.go 50.00% <0.00%> (-5.00%) :arrow_down:
pkg/agent/interfacestore/interface_cache.go 97.36% <0.00%> (-2.64%) :arrow_down:
...gent/controller/networkpolicy/status_controller.go 79.16% <0.00%> (-2.50%) :arrow_down:
pkg/agent/openflow/multicluster.go 44.85% <0.00%> (-1.87%) :arrow_down:
... and 35 more

codecov[bot] avatar Sep 27 '22 11:09 codecov[bot]

/test-all

wenyingd avatar Nov 15 '22 06:11 wenyingd

@jianjuns @mengdie-song please let me know if you will take another look or if this looks good to you.

tnqn avatar Nov 15 '22 14:11 tnqn

I want to confirm a RBAC question. For now, it seems that controller only has update privilege for supportbundlecollections/status. Then if agent side calls UpdateStatus function, it should use create privilege?

Controller needs update privilege to update CR SupportBundleCollection status, and Agent needs create privilege on the internal resource supportbundlecollections/status

wenyingd avatar Nov 16 '22 03:11 wenyingd

I want to confirm a RBAC question. For now, it seems that controller only has update privilege for supportbundlecollections/status. Then if agent side calls UpdateStatus function, it should use create privilege?

Thanks for proposing it, the failure catches one issue in Controller apiserver in my code. Resolved in my latest change.

wenyingd avatar Nov 16 '22 08:11 wenyingd

@wenyingd I see controller.go is updated, any change in it I need to recheck?

No logic change happens in controller.go. The change is about the Field name ( SucceededNodes -> CollectedNodes ) in SupportBundleCollectionStatus, which was not matching the name defined in the CRD.

wenyingd avatar Nov 17 '22 01:11 wenyingd

/test-all

tnqn avatar Nov 17 '22 03:11 tnqn

/skip-conformance which failed on an irrelevant case (and was env issue)

tnqn avatar Nov 17 '22 10:11 tnqn