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 columns of kubectl outputs for Multi-cluster types #3923

Merged
merged 1 commit into from
Jun 22, 2022

Conversation

jianjuns
Copy link
Contributor

Signed-off-by: Jianjun Shen shenj@vmware.com

@jianjuns jianjuns added the area/multi-cluster Issues or PRs related to multi cluster. label Jun 22, 2022
@jianjuns jianjuns requested a review from luolanzone June 22, 2022 00:53
@codecov-commenter
Copy link

codecov-commenter commented Jun 22, 2022

Codecov Report

Merging #3923 (5514464) into main (b2c245c) will decrease coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3923      +/-   ##
==========================================
- Coverage   64.16%   64.07%   -0.09%     
==========================================
  Files         293      293              
  Lines       43223    43223              
==========================================
- Hits        27735    27697      -38     
- Misses      13256    13294      +38     
  Partials     2232     2232              
Flag Coverage Δ
kind-e2e-tests 50.48% <ø> (-0.07%) ⬇️
unit-tests 44.57% <ø> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
pkg/clusteridentity/clusteridentity.go 60.55% <0.00%> (-11.01%) ⬇️
pkg/controller/externalippool/controller.go 83.03% <0.00%> (-8.04%) ⬇️
...agent/flowexporter/connections/deny_connections.go 80.45% <0.00%> (-3.45%) ⬇️
pkg/agent/route/route_linux.go 47.95% <0.00%> (-1.71%) ⬇️
pkg/agent/openflow/client.go 67.89% <0.00%> (-1.23%) ⬇️
...r/ipseccertificate/ipsec_certificate_controller.go 61.56% <0.00%> (-0.98%) ⬇️
...ntroller/networkpolicy/networkpolicy_controller.go 82.01% <0.00%> (-0.32%) ⬇️
pkg/agent/openflow/pipeline.go 73.40% <0.00%> (+0.32%) ⬆️
pkg/ovs/ovsctl/ofctl.go 41.78% <0.00%> (+0.68%) ⬆️
...kg/controller/networkpolicy/store/networkpolicy.go 79.16% <0.00%> (+2.08%) ⬆️
... and 3 more

@@ -31,14 +31,16 @@ const (

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@luolanzone : I think we should use "internal" and "external" to be consistent with Node IP types. Could we add "internal" / "external" and meanwhile keep supporting "private" / "public“?

Copy link
Contributor

Choose a reason for hiding this comment

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

sure, I will refine it to support both.

Copy link
Contributor

Choose a reason for hiding this comment

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

I just checked the code, I feel it would be better to include the change in this PR. I believe you just need to add two more const here: https://github.com/antrea-io/antrea/blob/main/multicluster/apis/multicluster/v1alpha1/multiclusterconfig_types.go#L27-L30.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to change the backend handling (decide which IP to use based on the option) right.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh, yes, you are right, you can leave it. I will update it later.

@jianjuns
Copy link
Contributor Author

jianjuns commented Jun 22, 2022

@luolanzone : I would also update the user guide to use the table format for "kubectl get" outputs. So, either I merge the PR first, and you create a new one to update the docs; or you apply the new yamls to your env, and give me the example outputs for me to update the docs together.

@@ -30,7 +30,9 @@ const (
// +genclient
//+kubebuilder:object:root=true

// ClusterClaim is the Schema for the clusterclaims API
// +kubebuilder:printcolumn:name="Value",type=string,JSONPath=`.value`,description="Value of the ClusterClaim"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=`.metadata.creationTimestamp`

looks like both `` and "" works, we may keep the format consistent.
There are a few other comments need to be updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, updated.

// ClusterSet is the Schema for the clustersets API.
// +kubebuilder:printcolumn:name="Leader Cluster Namespace",type=string,JSONPath=`.spec.namespace`,description="The leader cluster Namespace for the ClusterSet"
// +kubebuilder:printcolumn:name="Total Clusters",type=string,JSONPath=`.status.totalClusters`,description="Total number of clusters in the ClusterSet"
// +kubebuilder:printcolumn:name="Ready Clusters",type=string,JSONPath=`.status.readyClusters`,description="Number of ready clusters in the ClusterSet"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// +kubebuilder:printcolumn:name="Ready Clusters",type=string,JSONPath=`.status.readyClusters`,description="Number of ready clusters in the ClusterSet"
// +kubebuilder:printcolumn:name="Ready Member Clusters",type=string,JSONPath=`.status.readyClusters`,description="Number of ready member clusters in the ClusterSet"

Leader cluster is not included in the ready clusters, so better to add Member here. Otherwise user might be confused to see inconsistent data between totalClusters and readyClusters

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I feel we should change totalClusters to include only member clusters, as we support only a single leader cluster. What you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds reasonable, I can update totalClusters and GatewayIPPrecedence after you merge this.

@jianjuns
Copy link
Contributor Author

/test-multicluster-dataplane-e2e

Signed-off-by: Jianjun Shen <shenj@vmware.com>
@luolanzone
Copy link
Contributor

/test-multicluster-e2e

2 similar comments
@luolanzone
Copy link
Contributor

/test-multicluster-e2e

@luolanzone
Copy link
Contributor

/test-multicluster-e2e

@luolanzone
Copy link
Contributor

@luolanzone : I would also update the user guide to use the table format for "kubectl get" outputs. So, either I merge the PR first, and you create a new one to update the docs; or you apply the new yamls to your env, and give me the example outputs for me to update the docs together.

Sure, I think I can update docs when I refine totalClusters and GatewayIPPrecedence after you merge this PR, is this OK?

@jianjuns
Copy link
Contributor Author

Sure, I think I can update docs when I refine totalClusters and GatewayIPPrecedence after you merge this PR, is this OK?

Sounds good.

@jianjuns
Copy link
Contributor Author

/skip-all

Copy link
Contributor

@luolanzone luolanzone left a comment

Choose a reason for hiding this comment

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

LGTM

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

@jianjuns jianjuns merged commit f12f150 into antrea-io:main Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/multi-cluster Issues or PRs related to multi cluster.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants