From 5e61ccb2cbd3c8f733ad88ea047e47b226923f79 Mon Sep 17 00:00:00 2001 From: Francesco Montorsi <165799982+fmontorsi-equinix@users.noreply.github.com> Date: Mon, 18 Nov 2024 15:16:14 +0100 Subject: [PATCH 1/2] Show in docs the ChartSpec.Timeout --- client_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client_test.go b/client_test.go index 4c7fde7..40a301d 100644 --- a/client_test.go +++ b/client_test.go @@ -115,6 +115,7 @@ func ExampleHelmClient_InstallOrUpgradeChart() { Namespace: "default", UpgradeCRDs: true, Wait: true, + Timeout: 32 * time.Second, } // Install a chart release. @@ -132,6 +133,7 @@ func ExampleHelmClient_InstallOrUpgradeChart_useChartDirectory() { Namespace: "default", UpgradeCRDs: true, Wait: true, + Timeout: 32 * time.Second, } if _, err := helmClient.InstallOrUpgradeChart(context.Background(), &chartSpec, nil); err != nil { @@ -147,6 +149,7 @@ func ExampleHelmClient_InstallOrUpgradeChart_useLocalChartArchive() { Namespace: "default", UpgradeCRDs: true, Wait: true, + Timeout: 32 * time.Second, } if _, err := helmClient.InstallOrUpgradeChart(context.Background(), &chartSpec, nil); err != nil { @@ -162,6 +165,7 @@ func ExampleHelmClient_InstallOrUpgradeChart_useURL() { Namespace: "default", UpgradeCRDs: true, Wait: true, + Timeout: 32 * time.Second, } if _, err := helmClient.InstallOrUpgradeChart(context.Background(), &chartSpec, nil); err != nil { @@ -177,6 +181,7 @@ func ExampleHelmClient_InstallOrUpgradeChart_useDefaultRollBackStrategy() { Namespace: "default", UpgradeCRDs: true, Wait: true, + Timeout: 32 * time.Second, } // Use the default rollback strategy offer by HelmClient (revert to the previous version). @@ -213,6 +218,7 @@ func ExampleHelmClient_InstallOrUpgradeChart_useCustomRollBackStrategy() { Namespace: "default", UpgradeCRDs: true, Wait: true, + Timeout: 32 * time.Second, } // Use a custom rollback strategy (customRollBack needs to implement RollBack). @@ -237,6 +243,7 @@ func ExampleHelmClient_LintChart() { Namespace: "default", UpgradeCRDs: true, Wait: true, + Timeout: 32 * time.Second, ValuesYaml: `deployments: etcdOperator: true backupOperator: false`, @@ -254,6 +261,7 @@ func ExampleHelmClient_TemplateChart() { Namespace: "default", UpgradeCRDs: true, Wait: true, + Timeout: 32 * time.Second, ValuesYaml: `deployments: etcdOperator: true backupOperator: false`, @@ -290,6 +298,7 @@ func ExampleHelmClient_UninstallRelease() { ChartName: "stable/etcd-operator", Namespace: "default", Wait: true, + Timeout: 32 * time.Second, DryRun: true, KeepHistory: true, } @@ -337,6 +346,7 @@ func ExampleHelmClient_RollbackRelease() { Namespace: "default", UpgradeCRDs: true, Wait: true, + Timeout: 32 * time.Second, } // Rollback to the previous version of the release. From ff2969fa5928463f9540c5dc8c62325e99317898 Mon Sep 17 00:00:00 2001 From: Francesco Montorsi <165799982+fmontorsi-equinix@users.noreply.github.com> Date: Mon, 9 Dec 2024 15:31:08 +0100 Subject: [PATCH 2/2] Update client_test.go --- client_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/client_test.go b/client_test.go index 40a301d..c03219d 100644 --- a/client_test.go +++ b/client_test.go @@ -3,6 +3,7 @@ package helmclient import ( "bytes" "context" + "time" "helm.sh/helm/v3/pkg/chartutil"