Skip to content

Commit

Permalink
Merge pull request #223 from fmontorsi-equinix/patch-1
Browse files Browse the repository at this point in the history
Show in docs the ChartSpec.Timeout
  • Loading branch information
elenz97 authored Dec 10, 2024
2 parents 08a142e + bf69d23 commit 7b0ba54
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package helmclient
import (
"bytes"
"context"
"time"

"helm.sh/helm/v3/pkg/chartutil"

Expand Down Expand Up @@ -115,6 +116,7 @@ func ExampleHelmClient_InstallOrUpgradeChart() {
Namespace: "default",
UpgradeCRDs: true,
Wait: true,
Timeout: 32 * time.Second,
}

// Install a chart release.
Expand All @@ -132,6 +134,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 {
Expand All @@ -147,6 +150,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 {
Expand All @@ -162,6 +166,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 {
Expand All @@ -177,6 +182,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).
Expand Down Expand Up @@ -213,6 +219,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).
Expand All @@ -237,6 +244,7 @@ func ExampleHelmClient_LintChart() {
Namespace: "default",
UpgradeCRDs: true,
Wait: true,
Timeout: 32 * time.Second,
ValuesYaml: `deployments:
etcdOperator: true
backupOperator: false`,
Expand All @@ -254,6 +262,7 @@ func ExampleHelmClient_TemplateChart() {
Namespace: "default",
UpgradeCRDs: true,
Wait: true,
Timeout: 32 * time.Second,
ValuesYaml: `deployments:
etcdOperator: true
backupOperator: false`,
Expand Down Expand Up @@ -290,6 +299,7 @@ func ExampleHelmClient_UninstallRelease() {
ChartName: "stable/etcd-operator",
Namespace: "default",
Wait: true,
Timeout: 32 * time.Second,
DryRun: true,
KeepHistory: true,
}
Expand Down Expand Up @@ -337,6 +347,7 @@ func ExampleHelmClient_RollbackRelease() {
Namespace: "default",
UpgradeCRDs: true,
Wait: true,
Timeout: 32 * time.Second,
}

// Rollback to the previous version of the release.
Expand Down

0 comments on commit 7b0ba54

Please sign in to comment.