diff --git a/client.go b/client.go index 8d7f3d0..020021b 100644 --- a/client.go +++ b/client.go @@ -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. @@ -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. diff --git a/types.go b/types.go index 430254d..b5999ff 100644 --- a/types.go +++ b/types.go @@ -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"` } diff --git a/zz_generated.deepcopy.go b/zz_generated.deepcopy.go index 313e29a..ed77902 100644 --- a/zz_generated.deepcopy.go +++ b/zz_generated.deepcopy.go @@ -10,6 +10,13 @@ import () func (in *ChartSpec) DeepCopyInto(out *ChartSpec) { *out = *in in.ValuesOptions.DeepCopyInto(&out.ValuesOptions) + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartSpec.