From 39757e9cc8d2d0c94096180b1ee886e84d5a4455 Mon Sep 17 00:00:00 2001 From: Jim Crossley Date: Mon, 11 Nov 2019 18:42:40 -0500 Subject: [PATCH] We need to fail the install if any transforms error Otherwise, the operator will keep retrying indefinitely, but the status of the KS CR will continue to show Ready. Also removing redundant updateStatus call since we're already calling it in the reconcile loop. --- pkg/reconciler/knativeserving/knativeserving_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/reconciler/knativeserving/knativeserving_controller.go b/pkg/reconciler/knativeserving/knativeserving_controller.go index f870046c..bfe992f1 100644 --- a/pkg/reconciler/knativeserving/knativeserving_controller.go +++ b/pkg/reconciler/knativeserving/knativeserving_controller.go @@ -120,6 +120,7 @@ func (r *Reconciler) reconcile(ctx context.Context, ks *servingv1alpha1.KnativeS manifest, err := r.transform(ks) if err != nil { + ks.Status.MarkInstallFailed(err.Error()) return err } @@ -181,7 +182,6 @@ func (r *Reconciler) install(manifest *mf.Manifest, instance *servingv1alpha1.Kn // Check for all deployments available func (r *Reconciler) checkDeployments(manifest *mf.Manifest, instance *servingv1alpha1.KnativeServing) error { r.Logger.Debug("Checking deployments") - defer r.updateStatus(instance) available := func(d *appsv1.Deployment) bool { for _, c := range d.Status.Conditions { if c.Type == appsv1.DeploymentAvailable && c.Status == corev1.ConditionTrue {