Change readiness check for HelmRelease
As the HelmRelease injects its own HelmChart, the first reconciliation will always trigger a `Ready==False` condition while it waits for the chart to become ready. Given this, we should only take this condition into account when the `status.LastAttemptedRevision` has been recorded, as this marks the fact that the chart is available and an action was attempted.
This commit is contained in:
@@ -138,7 +138,7 @@ func isHelmReleaseReady(ctx context.Context, kubeClient client.Client, name, nam
|
|||||||
if condition.Type == helmv2.ReadyCondition {
|
if condition.Type == helmv2.ReadyCondition {
|
||||||
if condition.Status == corev1.ConditionTrue {
|
if condition.Status == corev1.ConditionTrue {
|
||||||
return true, nil
|
return true, nil
|
||||||
} else if condition.Status == corev1.ConditionFalse {
|
} else if condition.Status == corev1.ConditionFalse && helmRelease.Status.LastAttemptedRevision != "" {
|
||||||
return false, fmt.Errorf(condition.Message)
|
return false, fmt.Errorf(condition.Message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user