don't pre/post process if skipstatusupdate (#1625)

This commit is contained in:
Weston Haught 2020-08-15 08:51:06 -07:00 committed by GitHub
parent 0e023a2069
commit 2eaf40292b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -421,7 +421,9 @@ func (r *reconcilerImpl) Reconcile(ctx {{.contextContext|raw}}, key string) erro
return {{.fmtErrorf|raw}}("failed to set finalizers: %w", err)
}
{{if .isKRShaped}}
reconciler.PreProcessReconcile(ctx, resource)
if !r.skipStatusUpdates {
reconciler.PreProcessReconcile(ctx, resource)
}
{{end}}
// Reconcile this copy of the resource and then write back any status
@ -429,7 +431,9 @@ func (r *reconcilerImpl) Reconcile(ctx {{.contextContext|raw}}, key string) erro
reconcileEvent = do(ctx, resource)
{{if .isKRShaped}}
reconciler.PostProcessReconcile(ctx, resource, original)
if !r.skipStatusUpdates {
reconciler.PostProcessReconcile(ctx, resource, original)
}
{{end}}
case {{.doFinalizeKind|raw}}: