feat: add per-job extra volumes to hydra migration job - #879
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds ChangesHydra Helm chart: job-level extra volumes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hey there! |
|
Thanks! Will keep my eye out for the next release :) |
|
@Demonsthere curious when should I expect to see v0.62.2 release cut? Thanks! |
The hydra migration
Jobcurrently has no way to mount volumes independently of the long-runningdeployment. Thevolumes/volumeMountsblocks intemplates/job-migration.yamlare hardcoded to.Values.deployment.extraVolumesand.Values.deployment.extraVolumeMounts, so the only way to attach a volume to the short-lived migration pod is to also attach it to the server deployment.This is inconsistent with the rest of that same template, where
job.nodeSelector,job.extraEnv, andjob.resourcesalready override theirdeployment.*/automigration.*counterparts via aternaryfallback. This PR closes that gap by addingjob.extraVolumesandjob.extraVolumeMounts, following the identical fallback pattern:Backward compatible: both default to
[]. When unset, the job continues to fall back todeployment.extraVolumes/deployment.extraVolumeMounts, so existing releases render byte-for-byte identically. The change also converts the two blocks fromiftowithand fixes a mis-indented{{- end }}in the existingvolumeMountsblock.Related Issue or Design Document
No linked issue. This is a small consistency enhancement rather than a new feature: it extends the pre-existing
job.* → deployment.*override pattern intemplates/job-migration.yaml(already present fornodeSelector,extraEnv, andresources) to volumes. Happy to open a discussion first if maintainers prefer.Checklist
Further comments
Alternative considered: keeping the volumes coupled to
deployment.extraVolumes. Rejected because it forces unrelated volumes (e.g. a migration-only credential mount) onto the always-running server pod, and because every sibling setting in the same template already supports a per-job override — this just makes volumes consistent.The
hacks/values/hydra/default.yamlchange adds anemptyDir-backedjob.extraVolumes+job.extraVolumeMountsso the existing render/kubeconform CI exercises the new code path.Summary by CodeRabbit
New Features
extraVolumesandextraVolumeMountsconfiguration options for Hydra Helm chart. These settings take precedence over deployment-level volume configurations when specified.Documentation