|
|
|
|
@ -38,6 +38,7 @@ import (
|
|
|
|
|
"helm.sh/helm/v4/pkg/cmd/require"
|
|
|
|
|
"helm.sh/helm/v4/pkg/downloader"
|
|
|
|
|
"helm.sh/helm/v4/pkg/getter"
|
|
|
|
|
"helm.sh/helm/v4/pkg/kube"
|
|
|
|
|
ri "helm.sh/helm/v4/pkg/release"
|
|
|
|
|
"helm.sh/helm/v4/pkg/release/common"
|
|
|
|
|
"helm.sh/helm/v4/pkg/storage/driver"
|
|
|
|
|
@ -82,6 +83,18 @@ which can contain sensitive values. To hide Kubernetes Secrets use the
|
|
|
|
|
--hide-secret flag. Please carefully consider how and when these flags are used.
|
|
|
|
|
`
|
|
|
|
|
|
|
|
|
|
func configureUpgradeWaitProgress(client *action.Upgrade, out io.Writer, outfmt output.Format) {
|
|
|
|
|
if outfmt != output.Table || client.DryRunStrategy != action.DryRunNone {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if client.WaitStrategy == kube.HookOnlyStrategy && !client.RollbackOnFailure {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
client.WaitProgress = func(timeout time.Duration) {
|
|
|
|
|
printWaitMessage(out, outfmt, kube.StatusWatcherStrategy, false, action.DryRunNone, timeout)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
|
|
|
|
|
client := action.NewUpgrade(cfg)
|
|
|
|
|
client.WaitOptions = append(client.WaitOptions, defaultCLIWaitOptions()...)
|
|
|
|
|
@ -163,7 +176,7 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
|
|
|
|
|
instClient.Replace = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
printWaitMessage(out, outfmt, instClient.WaitStrategy, instClient.RollbackOnFailure, instClient.DryRunStrategy, instClient.Timeout)
|
|
|
|
|
configureWaitProgress(instClient, out, outfmt)
|
|
|
|
|
|
|
|
|
|
rel, err := runInstall(args, instClient, valueOpts, out)
|
|
|
|
|
if err != nil {
|
|
|
|
|
@ -259,7 +272,7 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
|
|
|
|
|
cancel()
|
|
|
|
|
}()
|
|
|
|
|
|
|
|
|
|
printWaitMessage(out, outfmt, client.WaitStrategy, client.RollbackOnFailure, client.DryRunStrategy, client.Timeout)
|
|
|
|
|
configureUpgradeWaitProgress(client, out, outfmt)
|
|
|
|
|
|
|
|
|
|
rel, err := client.RunWithContext(ctx, args[0], ch, vals)
|
|
|
|
|
if err != nil {
|
|
|
|
|
|