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

Adds support for IgnoreNotFound option #204

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -962,4 +962,5 @@ func mergeUninstallReleaseOptions(chartSpec *ChartSpec, uninstallReleaseOptions
uninstallReleaseOptions.Description = chartSpec.Description
uninstallReleaseOptions.KeepHistory = chartSpec.KeepHistory
uninstallReleaseOptions.Wait = chartSpec.Wait
uninstallReleaseOptions.IgnoreNotFound = chartSpec.IgnoreNotFound
}
13 changes: 7 additions & 6 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,13 @@ func ExampleHelmClient_UpdateChartRepos() {
func ExampleHelmClient_UninstallRelease() {
// Define the released chart to be installed.
chartSpec := ChartSpec{
ReleaseName: "etcd-operator",
ChartName: "stable/etcd-operator",
Namespace: "default",
Wait: true,
DryRun: true,
KeepHistory: true,
ReleaseName: "etcd-operator",
ChartName: "stable/etcd-operator",
Namespace: "default",
Wait: true,
DryRun: true,
KeepHistory: true,
IgnoreNotFound: true,
}

// Uninstall the chart release.
Expand Down
3 changes: 3 additions & 0 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,7 @@ type ChartSpec struct {
// Labels specifies a set of labels to be applied to the release
// +optional
Labels map[string]string `json:"labels,omitempty"`
// IgnoreNotFound indicates whether to ignore a missing release during uninstall
// +optional
IgnoreNotFound bool `json:"ignoreNotFound,omitempty"`
}