diff --git a/pkg/application/helm/action/install.go b/pkg/application/helm/action/install.go index 1a9150040..440fd0098 100644 --- a/pkg/application/helm/action/install.go +++ b/pkg/application/helm/action/install.go @@ -111,11 +111,11 @@ func (c *Client) InstallWithLocal(ctx context.Context, options *InstallOptions, for _, rel := range rels { if rel.Info.Status == release.StatusDeployed { // release 记录已存在,状态为deployed,不再进行重复安装 - log.Infof("Release %s for %s is already exist. igonre it now.", options.ReleaseName, options.Namespace) + log.Infof("Release %s is already exist. igonre it now.", options.ReleaseName) return nil, nil } // release 记录已存在,状态为其他,删除重试 - log.Infof("install release %s for %s is already exist, status is %s. delete it now.", options.ReleaseName, options.Namespace, rel.Info.Status) + log.Infof("install release %s is already exist, status is %s. delete it now.", options.ReleaseName, rel.Info.Status) actionConfig.Releases.Delete(rel.Name, rel.Version) } } @@ -184,7 +184,7 @@ func (c *Client) InstallWithLocal(ctx context.Context, options *InstallOptions, } if chartRequested.Metadata.Deprecated { - log.Warnf("This chart %s/%s for %s is deprecated", options.ChartRepo, options.Chart, options.Namespace) + log.Warnf("This chart %s/%s is deprecated", options.ChartRepo, options.Chart) } if req := chartRequested.Metadata.Dependencies; req != nil { diff --git a/pkg/application/helm/action/upgrade.go b/pkg/application/helm/action/upgrade.go index 05cd39f42..b008ffeaf 100644 --- a/pkg/application/helm/action/upgrade.go +++ b/pkg/application/helm/action/upgrade.go @@ -80,7 +80,7 @@ func (c *Client) Upgrade(ctx context.Context, options *UpgradeOptions) (*release histClient.Max = 1 rels, err := histClient.Run(options.ReleaseName) if errors.Is(err, driver.ErrReleaseNotFound) { - log.Infof("Release %d for %s does not exist. Installing it now.", options.ReleaseName, options.Namespace) + log.Infof("Release %s does not exist. Installing it now.", options.ReleaseName) return c.Install(ctx, &InstallOptions{ DryRun: options.DryRun, DependencyUpdate: options.DependencyUpdate, @@ -100,7 +100,7 @@ func (c *Client) Upgrade(ctx context.Context, options *UpgradeOptions) (*release for _, rel := range rels { if rel.Info.Status == release.StatusPendingInstall || rel.Info.Status == release.StatusPendingUpgrade || rel.Info.Status == release.StatusPendingRollback { // if release is pending, delete it. - log.Infof("upgrade release %s for %s is already exist, status is %s. delete it now.", options.ReleaseName, options.Namespace, rel.Info.Status) + log.Infof("upgrade release %s is already exist, status is %s. delete it now.", options.ReleaseName, rel.Info.Status) actionConfig.Releases.Delete(rel.Name, rel.Version) } } @@ -171,19 +171,19 @@ func (c *Client) Upgrade(ctx context.Context, options *UpgradeOptions) (*release } if chartRequested.Metadata.Deprecated { - log.Warnf("This chart %s/%s for %s is deprecated", options.ChartRepo, options.Chart, options.Namespace) + log.Warnf("This chart %s/%s is deprecated", options.ChartRepo, options.Chart) } rel, err := client.RunWithContext(ctx, options.ReleaseName, chartRequested, options.Values) // if current release resource is deprecated, delete it. if err != nil { - log.Infof("upgrade %s for %s RunWithContext failed,err:%s.", options.ReleaseName, options.Namespace, err.Error()) + log.Infof("upgrade %s RunWithContext failed,err:%s.", options.ReleaseName, err.Error()) } if err != nil && strings.Contains(err.Error(), "unable to build kubernetes objects from current release manifest") { histClient := action.NewHistory(actionConfig) histClient.Max = 1 rels, err := histClient.Run(options.ReleaseName) if err != nil { - log.Infof("upgrade get release %s history for %s failed. err:%s.", options.ReleaseName, options.Namespace, err.Error()) + log.Infof("upgrade get release %s history failed. err:%s.", options.ReleaseName, err.Error()) return nil, err } if len(rels) == 0 { @@ -191,7 +191,7 @@ func (c *Client) Upgrade(ctx context.Context, options *UpgradeOptions) (*release } for _, rel := range rels { // if release is deprecated, delete it. - log.Infof("upgrade release %s resource for %s is deprecated. delete it now. rel name:%s, rel version:%d.", options.ReleaseName, options.Namespace, rel.Name, rel.Version) + log.Infof("upgrade release %s resource is deprecated. delete it now. rel name:%s, rel version:%d.", options.ReleaseName, rel.Name, rel.Version) actionConfig.Releases.Delete(rel.Name, rel.Version) } }