Skip to content

Commit dd68887

Browse files
committed
Get message from truely ready conditions only
1 parent b0f4908 commit dd68887

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

api/v1alpha1/helmchart_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func HelmChartNotReady(chart HelmChart, reason, message string) HelmChart {
114114

115115
func HelmChartReadyMessage(chart HelmChart) string {
116116
for _, condition := range chart.Status.Conditions {
117-
if condition.Type == ReadyCondition {
117+
if condition.Type == ReadyCondition && condition.Status == corev1.ConditionTrue {
118118
return condition.Message
119119
}
120120
}

api/v1alpha1/helmrepository_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func HelmRepositoryNotReady(repository HelmRepository, reason, message string) H
100100

101101
func HelmRepositoryReadyMessage(repository HelmRepository) string {
102102
for _, condition := range repository.Status.Conditions {
103-
if condition.Type == ReadyCondition {
103+
if condition.Type == ReadyCondition && condition.Status == corev1.ConditionTrue {
104104
return condition.Message
105105
}
106106
}

0 commit comments

Comments
 (0)