From dd688879eedeb0566ea341d7829c8a141b10a42c Mon Sep 17 00:00:00 2001 From: Hidde Beydals Date: Tue, 14 Apr 2020 11:33:47 +0200 Subject: [PATCH] Get message from truely ready conditions only --- api/v1alpha1/helmchart_types.go | 2 +- api/v1alpha1/helmrepository_types.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/v1alpha1/helmchart_types.go b/api/v1alpha1/helmchart_types.go index 48a2cf20..dafde6e2 100644 --- a/api/v1alpha1/helmchart_types.go +++ b/api/v1alpha1/helmchart_types.go @@ -114,7 +114,7 @@ func HelmChartNotReady(chart HelmChart, reason, message string) HelmChart { func HelmChartReadyMessage(chart HelmChart) string { for _, condition := range chart.Status.Conditions { - if condition.Type == ReadyCondition { + if condition.Type == ReadyCondition && condition.Status == corev1.ConditionTrue { return condition.Message } } diff --git a/api/v1alpha1/helmrepository_types.go b/api/v1alpha1/helmrepository_types.go index cd1eac32..1e18f8ec 100644 --- a/api/v1alpha1/helmrepository_types.go +++ b/api/v1alpha1/helmrepository_types.go @@ -100,7 +100,7 @@ func HelmRepositoryNotReady(repository HelmRepository, reason, message string) H func HelmRepositoryReadyMessage(repository HelmRepository) string { for _, condition := range repository.Status.Conditions { - if condition.Type == ReadyCondition { + if condition.Type == ReadyCondition && condition.Status == corev1.ConditionTrue { return condition.Message } }