Skip to content

Commit 53d1879

Browse files
committed
apply KEDA PAT secret on reconcile failure
1 parent eb7a03a commit 53d1879

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

  • src/runner-org-sync/cmd/runner-org-sync

src/runner-org-sync/cmd/runner-org-sync/main.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,18 +140,19 @@ func run() error {
140140
"configmap_changed", report.ConfigMapChanged,
141141
)
142142

143+
// Independent of the per-org reconcile — runs even when its outcome is
144+
// "partial" or fatal because the KEDA Secret has its own lifecycle.
145+
// Failure is non-fatal: logged + counted, but the CronJob exit code is
146+
// still driven by the org reconcile result so fatal reconcile errors stay
147+
// visible to Kubernetes.
148+
applyKedaSecret(ctx, store, cfg, kedaPAT, metrics, logger)
149+
143150
if runErr != nil {
144151
span.RecordError(runErr)
145152
span.SetStatus(codes.Error, runErr.Error())
146153
return runErr
147154
}
148155

149-
// Independent of the per-org reconcile — runs even when its outcome is
150-
// "partial" because the KEDA Secret has its own lifecycle. Failure is
151-
// non-fatal: logged + counted, but the CronJob still exits 0 so the
152-
// next tick retries.
153-
applyKedaSecret(ctx, store, cfg, kedaPAT, metrics, logger)
154-
155156
if report.Outcome == reconcile.OutcomePartial {
156157
// Continue-on-partial: still exit 0; metric + WARN log carries the signal.
157158
span.SetStatus(codes.Ok, "partial")

0 commit comments

Comments
 (0)