Pass labels from secret/configmap to release object

Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
pull/8532/head
Dmitry Chepurovskiy 4 years ago
parent edc7d8ea32
commit 99bd709530
No known key found for this signature in database
GPG Key ID: A9B6ED8F3D834514

@ -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)
}
}

Loading…
Cancel
Save