Skip to content

Commit

Permalink
lable releases when installing/upgrading charts (#196)
Browse files Browse the repository at this point in the history
* lable releases when installing/upgrading charts

* add getter methods for settings & providers

* switch to uber/gomock

* run codegen

* add json tags

---------

Co-authored-by: Yulin Li <yulili@microsoft.com>
Co-authored-by: Eike David Lenz <e.lenz@mittwald.de>
  • Loading branch information
3 people committed Apr 8, 2024
1 parent df8bbb1 commit 6cb8534
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,7 @@ func mergeInstallOptions(chartSpec *ChartSpec, installOptions *action.Install) {
installOptions.DryRunOption = chartSpec.DryRunOption
installOptions.SubNotes = chartSpec.SubNotes
installOptions.WaitForJobs = chartSpec.WaitForJobs
installOptions.Labels = chartSpec.Labels
}

// mergeUpgradeOptions merges values of the provided chart to helm upgrade options used by the client.
Expand All @@ -950,6 +951,7 @@ func mergeUpgradeOptions(chartSpec *ChartSpec, upgradeOptions *action.Upgrade) {
upgradeOptions.DryRunOption = chartSpec.DryRunOption
upgradeOptions.SubNotes = chartSpec.SubNotes
upgradeOptions.WaitForJobs = chartSpec.WaitForJobs
upgradeOptions.Labels = chartSpec.Labels
}

// mergeUninstallReleaseOptions merges values of the provided chart to helm uninstall options used by the client.
Expand Down
3 changes: 3 additions & 0 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,7 @@ type ChartSpec struct {
// KeepHistory indicates whether to retain or purge the release history during uninstall
// +optional
KeepHistory bool `json:"keepHistory,omitempty"`
// Labels specifies a set of labels to be applied to the release
// +optional
Labels map[string]string `json:"labels,omitempty"`
}
7 changes: 7 additions & 0 deletions zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6cb8534

Please sign in to comment.