mirror of
https://github.com/helm/helm.git
synced 2026-08-08 09:01:25 +00:00
Added upgrade --install labels argument support
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net> Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
This commit is contained in:
committed by
Dmitry Chepurovskiy
parent
6ef79e432b
commit
6afad6bb61
@@ -117,6 +117,7 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
|
||||
instClient.SubNotes = client.SubNotes
|
||||
instClient.Description = client.Description
|
||||
instClient.DependencyUpdate = client.DependencyUpdate
|
||||
instClient.Labels = client.Labels
|
||||
|
||||
rel, err := runInstall(args, instClient, valueOpts, out)
|
||||
if err != nil {
|
||||
@@ -228,6 +229,7 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
|
||||
f.IntVar(&client.MaxHistory, "history-max", settings.MaxHistory, "limit the maximum number of revisions saved per release. Use 0 for no limit")
|
||||
f.BoolVar(&client.CleanupOnFail, "cleanup-on-fail", false, "allow deletion of new resources created in this upgrade when upgrade fails")
|
||||
f.BoolVar(&client.SubNotes, "render-subchart-notes", false, "if set, render subchart notes along with the parent")
|
||||
f.StringToStringVarP(&client.Labels, "labels", "l", nil, "Labels that would be added to relese metadata. Should be divided by comma. (Currently works only with configmap and secret storage drivers)")
|
||||
f.StringVar(&client.Description, "description", "", "add a custom description")
|
||||
f.BoolVar(&client.DependencyUpdate, "dependency-update", false, "update dependencies if they are missing before installing the chart")
|
||||
addChartPathOptionsFlags(f, &client.ChartPathOptions)
|
||||
|
||||
@@ -92,6 +92,7 @@ type Upgrade struct {
|
||||
SubNotes bool
|
||||
// Description is the description of this operation
|
||||
Description string
|
||||
Labels map[string]string
|
||||
// PostRender is an optional post-renderer
|
||||
//
|
||||
// If this is non-nil, then after templates are rendered, they will be sent to the
|
||||
@@ -251,6 +252,7 @@ func (u *Upgrade) prepareUpgrade(name string, chart *chart.Chart, vals map[strin
|
||||
Version: revision,
|
||||
Manifest: manifestDoc.String(),
|
||||
Hooks: hooks,
|
||||
Labels: u.Labels,
|
||||
}
|
||||
|
||||
if len(notesTxt) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user