open-cluster-management-io / registration

hub / spoke registration controllers
Apache License 2.0
42 stars 58 forks source link

update serverURL and CABundle if ManagedCluster is created before reg… #270

Closed ivan-cai closed 2 years ago

ivan-cai commented 2 years ago

…istration-agent running

Sometimes, ManagedCluster is created before deploy klusterlet, we want registration-agent can also update serverURL and CABundle from Klusterlet CR while it is running.

cluster-gateway will use serverURL and CABundle in ManagedCluster if ClusterEndpointType is Const not ClusterProxy.

Signed-off-by: ivan-cai caijing.cai@alibaba-inc.com

ivan-cai commented 2 years ago

@qiujian16 plz review.

ivan-cai commented 2 years ago

@qiujian16 I have refactored the codes, and merged serverUrl. I have also ingored the Unauthorized error. Plz review again, thx!

openshift-ci[bot] commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ivan-cai, qiujian16

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: - ~~[OWNERS](https://github.com/open-cluster-management-io/registration/blob/main/OWNERS)~~ [qiujian16] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment