Skip to content

fix: publish service outputs after the jobs that write them - #40

Merged
kylan11 merged 1 commit into
mainfrom
fix/outputs-first-write
Nov 10, 2026
Merged

kylan11 merged 1 commit into
mainfrom
fix/outputs-first-write

Conversation

@kylan11

@kylan11 kylan11 commented Nov 10, 2026

Copy link
Copy Markdown
Member

Problem

The outputs PushSecret is not ready until every declared key has been written to the outputs Secret (External Secrets fails the whole push on the first missing key). It was applied with the inputs, ahead of the after-ready job that writes the keys. Any readiness wait in between therefore never ended:

  • Helm 4 waits on custom resources through kstatus, so a first install, or an upgrade that adds an output key, hung until the timeout.
  • Argo CD waits for the health of the earlier wave before running the Sync hook.

Change

service 0.6.5 applies the PushSecret after the service's jobs:

  • Helm: a post-install,post-upgrade hook at weight 20 (jobs use 10–19).
  • Argo: sync wave 20 of the service's slot, still an ordinary resource.

No values, names or remote keys change.

One behaviour difference under Helm: hook resources are not removed by helm uninstall, so the PushSecret stays behind. Its deletionPolicy is None, so nothing remote is touched. Documented in the chart README.

Verification

  • make check passes; new test covers hook weight and wave ordering in both engines.
  • On a real cluster with Helm 4.3.0 and External Secrets 2.2.0:
    • published 0.6.4, fresh install with --wait: times out on PushSecret ... not ready ... secret key first does not exist;
    • this chart, fresh install with --wait --wait-for-jobs: deployed in 9s, value published;
    • release created with 0.6.4, upgraded to this chart while adding a second output key: deployed, both values published;
    • repeat upgrade with no changes: deployed;
    • uninstall: everything removed except the PushSecret.

Argo mode was verified by rendering only, not on a cluster.

The outputs PushSecret is not ready until every declared key exists. Applied
with the inputs, it stalled a readiness wait (Helm 4, Argo health) ahead of the
after-ready job that writes the keys, so a first install or a new output key
never completed. It is now a post hook under Helm and a later wave under Argo.
@kylan11
kylan11 merged commit d0b6f19 into main Nov 10, 2026
2 checks passed
@kylan11
kylan11 deleted the fix/outputs-first-write branch November 10, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant