Skip to content

feat(nextcloud): allow suspending the cron CronJob via values - #881

Merged
wrenix merged 3 commits into
nextcloud:mainfrom
marekjagielski:feat/cronjob-suspend
Sep 19, 2026
Merged

wrenix merged 3 commits into
nextcloud:mainfrom
marekjagielski:feat/cronjob-suspend

Conversation

@marekjagielski

@marekjagielski marekjagielski commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Description of the change

Renders spec.suspend on the cron CronJob unconditionally (defaulting to false), and exposes it as cronjob.cronjob.suspend.

Benefits

The template currently renders no spec.suspend at all, so the field has no desired value in the manifest. Anything that reconciles the chart's output — ArgoCD, Flux, helm diff — has nothing to compare against, and under server-side apply a kubectl patch ... suspend=true takes ownership of the field and survives every subsequent sync, while the release keeps reporting as in-sync.

That is not hypothetical. We had nextcloud-cron suspended by hand during a debugging session and left that way for days. ArgoCD reconciled that very object repeatedly across the period and left the suspension in place — correctly, since it did not own the field. In that window Nextcloud ran no file scans, no trashbin/version expiry, no notification delivery, no federated sync and no app-update checks, and nothing surfaced it. managedFields showed spec.suspend owned by kubectl-patch, never by argocd-controller.

Rendering the field always puts it back under the chart's ownership, so a manual patch is reverted on the next sync instead of silently persisting. It also makes suspending the job a first-class values option rather than something you reach around the chart to do.

Possible drawbacks

None that I can find. false is already the CronJob API default, so behaviour is unchanged for every existing release — the only difference is that a previously-omitted field now renders as an explicit false. For users who deliberately suspend the job out-of-band today, that manual patch will now be reverted on the next chart apply; setting cronjob.cronjob.suspend: true is the supported replacement, and arguably the point of the change.

Applicable issues

None open that I could find — happy to file one first if you'd prefer that order.

Additional information

Verified against charts/nextcloud:

  • helm lint . — 1 chart linted, 0 failed
  • helm template . with cronjob.enabled=true cronjob.type=cronjob → suspend: false
  • same with --set cronjob.cronjob.suspend=true → suspend: true
  • cronjob.type=sidecar renders no CronJob, unaffected
  • documented in values.yaml and the README values table
  • Chart.yaml bumped 9.2.6 → 9.3.0 (minor: adds a value, no breaking change)

Checklist

The CronJob template renders no `spec.suspend`, so the field has no
desired value in the manifest. Anything that reconciles the chart's
output — ArgoCD, Flux, `helm diff` — has nothing to compare against, and
a `kubectl patch ... suspend=true` therefore survives every subsequent
sync while the release keeps reporting as in-sync.

That is not hypothetical: we had `nextcloud-cron` suspended by hand
during a debugging session and left that way for 40 days. ArgoCD
reconciled the object repeatedly over that period and left the
suspension in place, because server-side apply correctly treats
`spec.suspend` as owned by the client that set it. No file scans, no
trashbin/version expiry, no notification delivery and no federated sync
ran in that window, and nothing surfaced it.

Render `suspend` unconditionally, defaulting to false, so the field is
always present and always owned by whatever applies the chart. This also
makes suspending the job a first-class values option rather than
something you have to reach around the chart to do.

Default behaviour is unchanged: `suspend: false` is the CronJob API
default, so existing releases render an explicit false where the field
was previously omitted.

Signed-off-by: Marek Jagielski <marek.jagielski@protonmail.com>
Comment thread charts/nextcloud/templates/cronjob.yaml Outdated
`values.yaml` already declares `cronjob.cronjob.suspend: false`, so the
`| default false` pipeline in the template held a second copy of the
same default that could never actually fire — Helm merges the chart
defaults under any user-supplied values before the template runs.

Drop it, matching the surrounding fields in the same block
(`successfulJobsHistoryLimit`, `failedJobsHistoryLimit`), which read
their values straight through.

Rendering is unchanged: `suspend: false` by default, `suspend: true`
with `--set cronjob.cronjob.suspend=true`.

Signed-off-by: Marek Jagielski <marek.jagielski@protonmail.com>
@marekjagielski

Copy link
Copy Markdown
Contributor Author

Friendly ping — the Lint and Test Charts run for a78e2d8 is sitting in action_required since 25 Aug and needs a maintainer to click Approve and run. The last commit only drops a redundant | default false from the template; rendering is unchanged. Happy to squash if that helps.

Signed-off-by: WrenIX <133280015+wrenix@users.noreply.github.com>
@wrenix
wrenix enabled auto-merge (squash) September 19, 2026 15:44
@wrenix
wrenix merged commit 7fb9bb9 into nextcloud:main Sep 19, 2026
12 checks passed
valeninki pushed a commit to valeninki/k8s that referenced this pull request Sep 28, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [nextcloud](https://nextcloud.com/) ([source](https://github.com/nextcloud/helm)) | minor | `9.2.6` -> `9.3.0` |

---

> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>nextcloud/helm (nextcloud)</summary>

### [`v9.3.0`](https://github.com/nextcloud/helm/releases/tag/nextcloud-9.3.0)

[Compare Source](nextcloud/helm@nextcloud-9.2.7...nextcloud-9.3.0)

A file sharing server that puts the control and security of your own data back into your hands.

#### What's Changed

- feat(nextcloud): allow suspending the cron CronJob via values by [@&#8203;marekjagielski](https://github.com/marekjagielski) in [#&#8203;881](nextcloud/helm#881)

#### New Contributors

- [@&#8203;marekjagielski](https://github.com/marekjagielski) made their first contribution in [#&#8203;881](nextcloud/helm#881)

**Full Changelog**: <nextcloud/helm@nextcloud-9.2.7...nextcloud-9.3.0>

### [`v9.2.7`](https://github.com/nextcloud/helm/releases/tag/nextcloud-9.2.7)

[Compare Source](nextcloud/helm@nextcloud-9.2.6...nextcloud-9.2.7)

A file sharing server that puts the control and security of your own data back into your hands.

#### What's Changed

- chore(deps): bump helm/kind-action from 1.14.0 to 1.15.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;882](nextcloud/helm#882)
- fix(nextcloud): update AppVersion to v34.0.4 by [@&#8203;promasu](https://github.com/promasu) in [#&#8203;884](nextcloud/helm#884)

**Full Changelog**: <nextcloud/helm@nextcloud-9.2.6...nextcloud-9.2.7>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNDAuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE0MC4xIiwidGFyZ2V0QnJhbmNoIjoiazBzIiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyIsImhvbGQtc3RvcmFnZS1hdWRpdCIsIm5leHRjbG91ZCJdfQ==-->

Reviewed-on: https://git.valentinus.dev/valeninki/k8s/pulls/8
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.

2 participants