Skip to content

Commit 0531548

Browse files
committed
feat: enable take ownership option in helm install optional config
1 parent a15af1f commit 0531548

3 files changed

Lines changed: 24 additions & 12 deletions

File tree

kubelink/grpc/applist.pb.go

Lines changed: 11 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

kubelink/grpc/applist.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ message UpgradeReleaseRequest {
344344
ChartContent chartContent = 4;
345345
bool RunInCtx = 5;
346346
string K8sVersion = 6;
347+
bool TakeOwnership = 7;
347348
}
348349

349350
message UpgradeReleaseResponse {

kubelink/pkg/service/helmApplicationService/helmAppService.go

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,11 +1303,12 @@ func (impl *HelmAppServiceImpl) InstallReleaseWithCustomChart(ctx context.Contex
13031303
impl.logger.Debugw("tar file write at", "referenceChartDir", referenceChartDir)
13041304
// Install release starts
13051305
chartSpec := &helmClient.ChartSpec{
1306-
ReleaseName: releaseIdentifier.ReleaseName,
1307-
Namespace: releaseIdentifier.ReleaseNamespace,
1308-
ValuesYaml: request.ValuesYaml,
1309-
ChartName: referenceChartDir,
1310-
KubeVersion: request.K8SVersion,
1306+
ReleaseName: releaseIdentifier.ReleaseName,
1307+
Namespace: releaseIdentifier.ReleaseNamespace,
1308+
ValuesYaml: request.ValuesYaml,
1309+
ChartName: referenceChartDir,
1310+
KubeVersion: request.K8SVersion,
1311+
TakeOwnership: request.TakeOwnership,
13111312
}
13121313

13131314
impl.logger.Debug("Installing release with chart info")
@@ -1365,11 +1366,12 @@ func (impl *HelmAppServiceImpl) UpgradeReleaseWithCustomChart(ctx context.Contex
13651366
impl.logger.Debugw("tar file write at", "referenceChartDir", referenceChartDir)
13661367
// Install release spec
13671368
installChartSpec := &helmClient.ChartSpec{
1368-
ReleaseName: releaseIdentifier.ReleaseName,
1369-
Namespace: releaseIdentifier.ReleaseNamespace,
1370-
ValuesYaml: request.ValuesYaml,
1371-
ChartName: referenceChartDir,
1372-
KubeVersion: request.K8SVersion,
1369+
ReleaseName: releaseIdentifier.ReleaseName,
1370+
Namespace: releaseIdentifier.ReleaseNamespace,
1371+
ValuesYaml: request.ValuesYaml,
1372+
ChartName: referenceChartDir,
1373+
KubeVersion: request.K8SVersion,
1374+
TakeOwnership: request.TakeOwnership,
13731375
}
13741376
// Update release spec
13751377
updateChartSpec := installChartSpec

0 commit comments

Comments
 (0)