mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 13:55:21 +02:00
feat(helm): show manifest previews/changes when installing and upgrading a helm chart [r8s-405] (#898)
This commit is contained in:
parent
a4cff13531
commit
60bc04bc33
41 changed files with 763 additions and 157 deletions
|
@ -113,6 +113,10 @@ func (hspm *HelmSDKPackageManager) install(installOpts options.InstallOptions) (
|
|||
Str("namespace", installOpts.Namespace).
|
||||
Err(err).
|
||||
Msg("Failed to install helm chart for helm release installation")
|
||||
if installOpts.DryRun {
|
||||
// remove installation wording for dry run. The inner error has enough context.
|
||||
return nil, errors.Wrap(err, "dry-run failed")
|
||||
}
|
||||
return nil, errors.Wrap(err, "helm was not able to install the chart for helm release installation")
|
||||
}
|
||||
|
||||
|
@ -142,6 +146,7 @@ func initInstallClient(actionConfig *action.Configuration, installOpts options.I
|
|||
installClient.Wait = installOpts.Wait
|
||||
installClient.Timeout = installOpts.Timeout
|
||||
installClient.Version = installOpts.Version
|
||||
installClient.DryRun = installOpts.DryRun
|
||||
err := configureChartPathOptions(&installClient.ChartPathOptions, installOpts.Version, installOpts.Repo, installOpts.Registry)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to configure chart path options for helm release installation")
|
||||
|
|
|
@ -165,6 +165,7 @@ func initUpgradeClient(actionConfig *action.Configuration, upgradeOpts options.I
|
|||
upgradeClient.Atomic = upgradeOpts.Atomic
|
||||
upgradeClient.Wait = upgradeOpts.Wait
|
||||
upgradeClient.Version = upgradeOpts.Version
|
||||
upgradeClient.DryRun = upgradeOpts.DryRun
|
||||
err := configureChartPathOptions(&upgradeClient.ChartPathOptions, upgradeOpts.Version, upgradeOpts.Repo, upgradeOpts.Registry)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to configure chart path options for helm release upgrade")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue