Skip to content

Persist RT state volumes in Helm CronJobs - #100

Merged
firefart merged 3 commits into
devfrom
copilot/fix-code-for-review-comment-96
Aug 27, 2026
Merged

Persist RT state volumes in Helm CronJobs#100
firefart merged 3 commits into
devfrom
copilot/fix-code-for-review-comment-96

Conversation

Copilot AI commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

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.

  • CronJob mounts
    • Added mounts for /opt/rt/var/data/gpg
    • Added mounts for /opt/rt/var/data/smime
    • Added mounts for /opt/rt/var/data/RT-Shredder
    • Added mount for /cron
  • Volume definitions
    • Reused the chart’s configured PVCs, with emptyDir fallbacks matching the RT deployment.
- {name: rt-gpg, mountPath: /opt/rt/var/data/gpg, readOnly: false}
- {name: rt-smime, mountPath: /opt/rt/var/data/smime, readOnly: true}
- {name: rt-shredder, mountPath: /opt/rt/var/data/RT-Shredder, readOnly: false}
- {name: rt-cron, mountPath: /cron, readOnly: false}

Copilot AI and others added 2 commits August 27, 2026 07:34
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
Copilot AI requested a review from firefart August 27, 2026 07:35
@firefart
firefart marked this pull request as ready for review August 27, 2026 07:36
Copilot AI lite review requested due to automatic review settings August 27, 2026 07:36
@firefart
firefart merged commit 4412a3a into dev Aug 27, 2026
5 checks passed
@firefart
firefart deleted the copilot/fix-code-for-review-comment-96 branch 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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 volumeMounts for RT runtime state directories (gpg, smime, RT-Shredder, /cron).
  • Added CronJob volumes that reuse the chart’s PVCs when enabled, with emptyDir fallbacks 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 tmp and mason-data volumes that the main deployment relies on when readOnlyRootFilesystem: true is 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 thread helm/templates/jobs.yaml
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 }}
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.

3 participants