Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show in docs the ChartSpec.Timeout #223

Merged
merged 4 commits into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading