mirror of
https://github.com/fluxcd/flux2.git
synced 2026-05-05 01:28:52 +00:00
Adapt HelmRelease revision to API v2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
parent
b85d34644b
commit
472396728b
5 changed files with 13 additions and 9 deletions
|
|
@ -72,9 +72,16 @@ func init() {
|
|||
getCmd.AddCommand(getHelmReleaseCmd)
|
||||
}
|
||||
|
||||
func getHelmReleaseRevision(helmRelease helmv2.HelmRelease) string {
|
||||
if helmRelease.Status.History != nil && len(helmRelease.Status.History) > 0 {
|
||||
return helmRelease.Status.History[0].ChartVersion
|
||||
}
|
||||
return helmRelease.Status.LastAttemptedRevision
|
||||
}
|
||||
|
||||
func (a helmReleaseListAdapter) summariseItem(i int, includeNamespace bool, includeKind bool) []string {
|
||||
item := a.Items[i]
|
||||
revision := item.Status.LastAppliedRevision
|
||||
revision := getHelmReleaseRevision(item)
|
||||
status, msg := statusAndMessage(item.Status.Conditions)
|
||||
return append(nameColumns(&item, includeNamespace, includeKind),
|
||||
revision, cases.Title(language.English).String(strconv.FormatBool(item.Spec.Suspend)), status, msg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue