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

feat(platform): update client go to 1.24 #2237

Merged
merged 2 commits into from
Mar 20, 2023

Conversation

leoryu
Copy link
Contributor

@leoryu leoryu commented Feb 23, 2023

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind api-change
/kind bug
/kind cleanup
/kind deprecation
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@leoryu leoryu force-pushed the update-client-go branch from 435860a to f8612be Compare March 14, 2023 06:46
@@ -395,7 +403,7 @@ func (c *Controller) syncAppFromRelease(ctx context.Context, cachedApp *cachedAp
rel, found := helmutil.Filter(rels, app.Spec.TargetNamespace, app.Spec.Name)
if !found {
// release not found, reinstall for reconcile
newStatus.Phase = applicationv1.AppPhaseInstalling
Copy link
Contributor Author

Choose a reason for hiding this comment

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

恢复原样

@@ -377,6 +382,9 @@ func (c *Controller) handlePhase(ctx context.Context, key string, cachedApp *cac
}

func (c *Controller) syncAppFromRelease(ctx context.Context, cachedApp *cachedApp, app *applicationv1.App) (*applicationv1.App, error) {
if app.Status.Phase == applicationv1.AppPhaseSucceeded && hasSynced(app) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

恢复原样

@@ -40,7 +41,12 @@ func NewClient(helmDriver string, restClientGetter *config.RESTClientGetter) *Cl

func (c *Client) buildActionConfig(namespace string) (*action.Configuration, error) {
actionConfig := new(action.Configuration)
if err := actionConfig.Init(c.restClientGetter, namespace, c.helmDriver, log.Debugf); err != nil {
err := actionConfig.Init(c.restClientGetter, namespace, c.helmDriver, log.Debugf)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@GaoXiaodong check

Copy link
Collaborator

Choose a reason for hiding this comment

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

必须给RegistryClient赋值,否则会调用helm方法的时候panic

Copy link
Collaborator

Choose a reason for hiding this comment

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

确认这里没问题

for _, rel := range rels {
if rel.Info.Status == release.StatusDeployed {
// release 记录已存在,状态为deployed,不再进行重复安装
log.Infof("Release %s is already exist. igonre it now.", options.ReleaseName)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

恢复原样

func (q *Type) isProcessing() bool {
q.cond.L.Lock()
defer q.cond.L.Unlock()
return q.processing.len() != 0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@leoryu leoryu force-pushed the update-client-go branch from 01b73e9 to 6e2c891 Compare March 16, 2023 09:07
chartPathBasicOptions, err := chartpath.BuildChartPathBasicOptions(repo, newApp.Spec.Chart)
if err != nil {
return nil, err
/* provide compatibility with online tke addon apps */
Copy link
Collaborator

Choose a reason for hiding this comment

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

107 到 123 之间对tke addon 的兼容不用合到master , @GaoXiaodong 再看下

Copy link
Collaborator

Choose a reason for hiding this comment

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

/* provide compatibility with online tke addon apps /
/
compatibility over, above code need to be deleted atfer the online addon apps are migrated */
这段注释中间的不要了,后面我们升级的时候刷下存量,辛苦 @leoryu 帮处理下

return nil, err
}
chartPathBasicOptions.ExistedFile = destfile
//* provide compatibility with online tke addon apps */
Copy link
Collaborator

Choose a reason for hiding this comment

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

//* provide compatibility with online tke addon apps /
//
compatibility over, above code need to be deleted atfer the online addon apps are migrated */
这两个注释间的也不要了,辛苦 @leoryu 帮处理下

@leoryu leoryu force-pushed the update-client-go branch from 6e2c891 to b86e928 Compare March 20, 2023 01:53
@leoryu leoryu merged commit 68317e3 into tkestack:master Mar 20, 2023
@leoryu leoryu deleted the update-client-go branch March 20, 2023 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants