Get message from truely ready conditions only
This commit is contained in:
parent
b0f4908af0
commit
dd688879ee
|
@ -114,7 +114,7 @@ func HelmChartNotReady(chart HelmChart, reason, message string) HelmChart {
|
||||||
|
|
||||||
func HelmChartReadyMessage(chart HelmChart) string {
|
func HelmChartReadyMessage(chart HelmChart) string {
|
||||||
for _, condition := range chart.Status.Conditions {
|
for _, condition := range chart.Status.Conditions {
|
||||||
if condition.Type == ReadyCondition {
|
if condition.Type == ReadyCondition && condition.Status == corev1.ConditionTrue {
|
||||||
return condition.Message
|
return condition.Message
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,7 +100,7 @@ func HelmRepositoryNotReady(repository HelmRepository, reason, message string) H
|
||||||
|
|
||||||
func HelmRepositoryReadyMessage(repository HelmRepository) string {
|
func HelmRepositoryReadyMessage(repository HelmRepository) string {
|
||||||
for _, condition := range repository.Status.Conditions {
|
for _, condition := range repository.Status.Conditions {
|
||||||
if condition.Type == ReadyCondition {
|
if condition.Type == ReadyCondition && condition.Status == corev1.ConditionTrue {
|
||||||
return condition.Message
|
return condition.Message
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue