mirror of
https://github.com/helm/helm.git
synced 2026-05-21 17:41:50 -04:00
Merge 1bbfadd74a into fcdf3854b0
This commit is contained in:
commit
b65d5aed84
6 changed files with 18 additions and 0 deletions
|
|
@ -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"
|
||||
release "helm.sh/helm/v4/pkg/release/v1"
|
||||
)
|
||||
|
||||
|
|
@ -344,6 +345,8 @@ func runInstall(args []string, client *action.Install, valueOpts *values.Options
|
|||
cancel()
|
||||
}()
|
||||
|
||||
printWaitMessage(out, client.WaitStrategy, client.Timeout)
|
||||
|
||||
ri, err := client.RunWithContext(ctx, chartRequested, vals)
|
||||
rel, rerr := releaserToV1Release(ri)
|
||||
if rerr != nil {
|
||||
|
|
@ -365,6 +368,13 @@ func checkIfInstallable(ch chart.Accessor) error {
|
|||
return fmt.Errorf("%s charts are not installable", meta["Type"])
|
||||
}
|
||||
|
||||
func printWaitMessage(out io.Writer, strategy kube.WaitStrategy, timeout time.Duration) {
|
||||
if strategy == kube.HookOnlyStrategy {
|
||||
return
|
||||
}
|
||||
fmt.Fprintf(out, "Waiting for resources to become ready (timeout: %s)\n", timeout)
|
||||
}
|
||||
|
||||
// Provide dynamic auto-completion for the install and template commands
|
||||
func compInstall(args []string, toComplete string, client *action.Install) ([]string, cobra.ShellCompDirective) {
|
||||
requiredArgs := 1
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
Waiting for resources to become ready (timeout: 5m0s)
|
||||
NAME: apollo
|
||||
LAST DEPLOYED: Fri Sep 2 22:04:05 1977
|
||||
NAMESPACE: default
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
Waiting for resources to become ready (timeout: 5m0s)
|
||||
NAME: apollo
|
||||
LAST DEPLOYED: Fri Sep 2 22:04:05 1977
|
||||
NAMESPACE: default
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
Waiting for resources to become ready (timeout: 5m0s)
|
||||
Release "crazy-bunny" has been upgraded. Happy Helming!
|
||||
NAME: crazy-bunny
|
||||
LAST DEPLOYED: Fri Sep 2 22:04:05 1977
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
Waiting for resources to become ready (timeout: 5m0s)
|
||||
Release "crazy-bunny" has been upgraded. Happy Helming!
|
||||
NAME: crazy-bunny
|
||||
LAST DEPLOYED: Fri Sep 2 22:04:05 1977
|
||||
|
|
|
|||
|
|
@ -250,6 +250,10 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
|
|||
cancel()
|
||||
}()
|
||||
|
||||
if outfmt == output.Table {
|
||||
printWaitMessage(out, client.WaitStrategy, client.Timeout)
|
||||
}
|
||||
|
||||
rel, err := client.RunWithContext(ctx, args[0], ch, vals)
|
||||
if err != nil {
|
||||
return fmt.Errorf("UPGRADE FAILED: %w", err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue