-
Notifications
You must be signed in to change notification settings - Fork 917
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 metadataSufficient status to indicate wether cluster have get all api-resource #1804
Add metadataSufficient status to indicate wether cluster have get all api-resource #1804
Conversation
/retitle Add warn status of the member cluster when failed get all supported resources from server |
@duanmengkk: Re-titling can only be requested by trusted users, like repository collaborators. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @XiShanYongYe-Chang |
/cc @lonelyCZ |
/assign @RainbowMango |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/close |
@duanmengkk: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
It is #1829. But as we discussed at the meeting, we still need a condition to represent the metadata collection status. |
/reopen ok,i will do it later |
@duanmengkk: Reopened this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
I don't think so. |
+1, I think the ready condition should only represent the health check result |
/hold for e2e test |
/unhold |
… supported resources from server Signed-off-by: duanmeng <[email protected]>
@@ -47,6 +47,9 @@ const ( | |||
clusterNotReachableReason = "ClusterNotReachable" | |||
clusterNotReachableMsg = "cluster is not reachable" | |||
statusCollectionFailed = "StatusCollectionFailed" | |||
metadataSufficientMsg = "all APIs installed in the cluster have been obtained" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
metadata sufficient not only include APIs
, see the condition comments.
@@ -18,6 +18,7 @@ func AddHandlers(h printers.PrintHandler) { | |||
{Name: "Version", Type: "string", Description: "KubernetesVersion represents version of the member cluster."}, | |||
{Name: "Mode", Type: "string", Description: "SyncMode describes how a cluster sync resources from karmada control plane."}, | |||
{Name: "Ready", Type: "string", Description: "The aggregate readiness state of this cluster for accepting workloads."}, | |||
{Name: "MetadataSufficient", Type: "string", Description: "The status indicate that all APIs are obtained"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this used to format the output for kubectl get
?
Is there a test report?
// getAPIEnablements get the list of APIs installed in the member cluster | ||
func getAPIEnablements(clusterClient *util.ClusterClient) ([]clusterv1alpha1.APIEnablement, error) { | ||
// This can return an error *and* the results it was able to find. | ||
// If the length of api resources is not zero,we don't need to fail on the error. | ||
_, apiResourceList, err := clusterClient.KubeClient.Discovery().ServerGroupsAndResources() | ||
if err != nil { | ||
if len(apiResourceList) == 0 { | ||
klog.Errorf("unable to get any supported resources from server. Error: %v.", err) | ||
return nil, err | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you split a PR for the partially APIs? This is our key mission, and shouldn't be blocked by the optional new condition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you split a PR for the partially APIs?
I am not clearly about what you sayed.Do you mean this PR should not contain e2e test,just focus on the feature of metadataSufficient
status.Or is there a problem in line 385 and 386 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean this pr should not contain e2e test,just focus on the feature of
metadataSufficient
status
If my understand is right,I will split this PR in three:1. Add metadataSufficient status 2. Add output of metadataSufficient in kubectl get cluster
3.Add new e2e test for metadataSufficient status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you split a PR for the partially APIs? This is our key mission, and shouldn't be blocked by the optional new condition.
If you do not mind,Can you describe it in Chinese?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean the change for func getAPIEnablements
is what we urgently needed. We can do it in a separate PR.
For the MetadataSufficient
condition, I'm a little bit hesitant as it seems to lack enough benefits to users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I got it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A separate PR in #1968
/cc @RainbowMango
Signed-off-by: duanmeng [email protected]
What type of PR is this?
/kind bug
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #1673
Special notes for your reviewer:
Does this PR introduce a user-facing change?: