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

WIP: Sync ClusterDeployment Unreachable condition to managedcluster for UI/Console to leverage. #452

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Copy link

openshift-ci bot commented Jan 4, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xuezhaojun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Jan 4, 2025
@xuezhaojun
Copy link
Contributor Author

/assign @qiujian16
/assign @elgnay

Request for the review to confirm the direction of this solution is right.

@xuezhaojun xuezhaojun force-pushed the add-admin-kubeconfig-condition branch from 806e034 to a35eccc Compare January 4, 2025 10:23
Copy link

sonarqubecloud bot commented Jan 4, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
26.1% Coverage on New Code (required ≥ 70%)

See analysis details on SonarQube Cloud

Copy link

openshift-ci bot commented Jan 4, 2025

@xuezhaojun: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/sonar-pre-submit a35eccc link true /test sonar-pre-submit

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

@elgnay
Copy link
Contributor

elgnay commented Jan 6, 2025

I have two comments in general:

  • Perhaps the ocm-controller is a better component to run this new controller;
  • Unreachable condition from Hive might include information beyond our expectation. What we expected is to have a condition to indicate if the admin-kubeconfig of the managed cluster is invalid or not.

@xuezhaojun
Copy link
Contributor Author

xuezhaojun commented Jan 6, 2025

I have two comments in general:

  • Perhaps the ocm-controller is a better component to run this new controller;
  • Unreachable condition from Hive might include information beyond our expectation. What we expected is to have a condition to indicate if the admin-kubeconfig of the managed cluster is invalid or not.

Thanks for the review!


I checked the ocm-controller's controllers, it doesn't have a specific controller that handles the clusterdeployment resource.

The most close one is under the /clusterset folder:

Comparing with the import-controller, the path of the controller only has a the /clusterdeployment:

That's why I believe import-controller is more relate to this feature.


Because the CA update happens on the agent side, so to check the valid of the admin-kubeconfig secret, we need to implement the polling strategy on the hub side.

In hive, they use a DelayingReconciler to check valid status every 1000 seconds.

And hive also ensure the performance at scale by using the MaxConcurrentReconciles and some hard code retry logic e.g. maxUnreachableDuration

If we want to do the same valid check, we need to introduce these complixities to our repo and consider the performance issue as well.

So to me, I prefer, for the first step, we only do syncing the condition to managed cluster to let console have something to display. If customer like the feature and use it a lot, then we put effort to enhance it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants