Skip to content

Commit 60afb73

Browse files
authored
Merge pull request #1396 from norman-zon/suspension-event-log
Skip emitting events for suspended Kustomizations
2 parents 35fd6c1 + 2d89eb6 commit 60afb73

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/controller/kustomization_controller.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ func (r *KustomizationReconciler) Reconcile(ctx context.Context, req ctrl.Reques
189189
// Record Prometheus metrics.
190190
r.Metrics.RecordDuration(ctx, obj, reconcileStart)
191191

192+
// Do not proceed if the Kustomization is suspended
193+
if obj.Spec.Suspend {
194+
return
195+
}
196+
192197
// Log and emit success event.
193198
if conditions.IsReady(obj) {
194199
msg := fmt.Sprintf("Reconciliation finished in %s, next run in %s",

0 commit comments

Comments
 (0)