From 364bffa0c5f908cb88ca667adaf20428ec649af0 Mon Sep 17 00:00:00 2001 From: agill17 Date: Fri, 8 Jan 2021 21:16:46 -0500 Subject: [PATCH] fix the chicken and egg problem when maxRetries is set to 0 for initial CR reconciles --- Makefile | 2 +- charts/genoa/values.yaml | 2 +- controllers/release_controller.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e83283d..2d5315a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION ?= 0.6.0 +VERSION ?= 0.6.1 # Image URL to use all building/pushing image targets IMG ?= coveros/genoa:${VERSION} # Produce CRDs that work back to Kubernetes 1.11 (no version conversion) diff --git a/charts/genoa/values.yaml b/charts/genoa/values.yaml index 0c87390..5c85f31 100644 --- a/charts/genoa/values.yaml +++ b/charts/genoa/values.yaml @@ -9,7 +9,7 @@ deployments: image: repository: coveros/genoa pullPolicy: Always - tag: 0.6.0 + tag: 0.6.1 imagePullSecrets: [] labels: {} annotations: {} diff --git a/controllers/release_controller.go b/controllers/release_controller.go index 8e68c81..eba265e 100644 --- a/controllers/release_controller.go +++ b/controllers/release_controller.go @@ -136,7 +136,7 @@ func (r *ReleaseReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { } } - if cr.Status.FailureCount > cr.Spec.MaxRetries { + if (cr.Status.FailureCount >= cr.Spec.MaxRetries) && cr.Status.FailureCount != 0 { r.Log.Info(fmt.Sprintf("%v has reached max reconcile limit, please update spec.maxRetries if you want to retry", req.NamespacedName)) return ctrl.Result{}, nil }