1
0
mirror of synced 2026-02-07 03:05:56 +00:00

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:
Hidde Beydals
2020-09-01 11:15:53 +02:00
parent 2078d048a1
commit e751bdc8a9

View File

@@ -138,7 +138,7 @@ func isHelmReleaseReady(ctx context.Context, kubeClient client.Client, name, nam
if condition.Type == helmv2.ReadyCondition {
if condition.Status == corev1.ConditionTrue {
return true, nil
} else if condition.Status == corev1.ConditionFalse {
} else if condition.Status == corev1.ConditionFalse && helmRelease.Status.LastAttemptedRevision != "" {
return false, fmt.Errorf(condition.Message)
}
}