mirror of
https://github.com/helm/helm.git
synced 2026-08-06 08:01:19 +00:00
Pass labels from secret/configmap to release object
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
This commit is contained in:
@@ -37,6 +37,8 @@ type Release struct {
|
||||
Version int `json:"version,omitempty"`
|
||||
// Namespace is the kubernetes namespace of the release.
|
||||
Namespace string `json:"namespace,omitempty"`
|
||||
// Labels of the release
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
}
|
||||
|
||||
// SetStatus is a helper for setting the status on a release.
|
||||
|
||||
@@ -106,6 +106,7 @@ func (cfgmaps *ConfigMaps) List(filter func(*rspb.Release) bool) ([]*rspb.Releas
|
||||
continue
|
||||
}
|
||||
if filter(rls) {
|
||||
rls.Labels = item.ObjectMeta.Labels
|
||||
results = append(results, rls)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,6 +98,7 @@ func (secrets *Secrets) List(filter func(*rspb.Release) bool) ([]*rspb.Release,
|
||||
continue
|
||||
}
|
||||
if filter(rls) {
|
||||
rls.Labels = item.ObjectMeta.Labels
|
||||
results = append(results, rls)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user