Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(maxRetries): avoid chicken and egg problem when maxRetries is set to 0 for initial CR reconciles #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion charts/genoa/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ deployments:
image:
repository: coveros/genoa
pullPolicy: Always
tag: 0.6.0
tag: 0.6.1
imagePullSecrets: []
labels: {}
annotations: {}
Expand Down
2 changes: 1 addition & 1 deletion controllers/release_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down