Persist RT state volumes in Helm CronJobs - #100
Merged
Conversation
Co-authored-by: firefart <105281+firefart@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix code based on review comment in PR #96
Persist RT state volumes in Helm CronJobs
Aug 27, 2026
firefart
marked this pull request as ready for review
August 27, 2026 07:36
firefart
added a commit
that referenced
this pull request
Aug 27, 2026
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: firefart <105281+firefart@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
CronJobs inherit readOnlyRootFilesystem: true by default but still lack the Deployment’s writable /tmp (and Mason cache) mounts, which can cause job failures.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the Helm CronJob template so scheduled RT maintenance jobs run with the same persistent runtime directories as the main RT deployment, preventing loss of GPG, S/MIME, shredder, and cron state between runs.
Changes:
- Added CronJob
volumeMountsfor RT runtime state directories (gpg,smime,RT-Shredder,/cron). - Added CronJob
volumesthat reuse the chart’s PVCs when enabled, withemptyDirfallbacks to match the deployment behavior.
File summaries
| File | Description |
|---|---|
helm/templates/jobs.yaml |
Extends CronJob pods with RT state volume mounts and PVC/emptyDir volume definitions to align with the RT deployment’s runtime directories. |
Review details
Suppressed comments (1)
helm/templates/jobs.yaml:118
- The CronJob adds mounts for RT state PVCs, but it still lacks the
tmpandmason-datavolumes that the main deployment relies on whenreadOnlyRootFilesystem: trueis enabled. Defining these volumes here keeps CronJobs consistent with the Deployment and prevents write attempts to the read-only image filesystem.
- name: rt-cron
{{- if $.Values.pvc.cron.enabled }}
persistentVolumeClaim:
claimName: {{ include "request-tracker.fullname" $ }}-cron
{{- else }}
emptyDir: {}
{{- end }}
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+71
to
75
| - {name: rt-shredder, mountPath: /opt/rt/var/data/RT-Shredder, readOnly: false} | ||
| - {name: rt-cron, mountPath: /cron, readOnly: false} | ||
| {{- with $.Values.rt.volumeMounts }} | ||
| {{- toYaml . | nindent 16 }} | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Helm CronJob pods were missing the RT deployment’s persistent runtime directories, causing maintenance jobs to lose or fail to access GPG, S/MIME, shredder, and cron state.
/opt/rt/var/data/gpg/opt/rt/var/data/smime/opt/rt/var/data/RT-Shredder/cronemptyDirfallbacks matching the RT deployment.