-
Notifications
You must be signed in to change notification settings - Fork 332
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
fix(application): use other path as chart cache path #2317
fix(application): use other path as chart cache path #2317
Conversation
add upgradePolicy api
9d12ab9
to
c6534b9
Compare
@@ -63,7 +64,7 @@ func BuildChartPathBasicOptions(repo config.RepoConfiguration, appChart v1.Chart | |||
opt.Password = repo.AdminPassword | |||
} | |||
|
|||
opt.ChartRepo = appChart.TenantID + "/" + appChart.ChartGroupName | |||
opt.ChartRepo = appChart.TenantID + "/" + app.Spec.TargetCluster + "-" + app.Spec.TargetNamespace + "/" + appChart.ChartGroupName |
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.
这里使用 appChart.ChartName 是否更好。ChartGroupName 都是local
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.
后面解压缩的时候,会用chart的名字做为文件夹的名字的
@@ -50,12 +51,6 @@ func FullfillChartInfo(appChart application.Chart, cg registryv1.ChartGroup) (ap | |||
} | |||
|
|||
// BuildChartPathBasicOptions will judge chartgroup type and return well-structured ChartPathOptions | |||
func BuildChartPathBasicOptions(repo config.RepoConfiguration, appChart application.Chart) (opt helmaction.ChartPathOptions, err error) { | |||
var v1Chart = &v1.Chart{} |
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.
54部分需要去掉吗?
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.
去掉了,这部分就是为了构建后面的path,用不到了
@@ -339,22 +339,14 @@ func (rs *REST) getChart(ctx context.Context, app *application.App, cg *registry | |||
} | |||
|
|||
func (rs *REST) dryRun(ctx context.Context, app *application.App) (*release.Release, error) { | |||
chartGroup, err := rs.getChartGroup(ctx, app) |
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.
这部分不需要了吗?
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.
不要了,这部分转化就是为了构建后面的path,用不到了
Co-authored-by: xdonggao <xdonggao@tencent.com>
What type of PR is this?
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.: