Get message from truely ready conditions only

This commit is contained in:
Hidde Beydals 2020-04-14 11:33:47 +02:00
parent b0f4908af0
commit dd688879ee
2 changed files with 2 additions and 2 deletions

View File

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

View File

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