-
Notifications
You must be signed in to change notification settings - Fork 71
feat(chart): enable template rendering in extraVolumes and extraVolumeMounts #284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(chart): enable template rendering in extraVolumes and extraVolumeMounts #284
Conversation
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances Helm chart flexibility by enabling template rendering in volume configuration fields. Instead of using static YAML rendering with toYaml, the chart now uses common.tplvalues.render to allow dynamic template evaluation in extraVolumes and extraVolumeMounts.
Changes:
- Replace
toYamlwithcommon.tplvalues.renderforextraVolumesandextraVolumeMountsin deployment and migration job templates - Enable users to use Helm template expressions (e.g.,
{{ .Release.Namespace }}) in volume configurations - Maintain backward compatibility with existing static configurations
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| charts/openfga/templates/deployment.yaml | Updated extraVolumes and extraVolumeMounts (including migrate.extraVolumeMounts) to use template rendering |
| charts/openfga/templates/job.yaml | Updated migrate.extraVolumes and migrate.extraVolumeMounts to use template rendering |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
WalkthroughThe changes refactor Helm chart templates to delegate YAML rendering of volumes and volumeMounts to a shared template helper function ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
aaa18bf to
f5892d7
Compare
|
/easycla |
…eMounts
Replace toYaml with common.tplvalues.render for extraVolumes and
extraVolumeMounts fields to allow Helm template evaluation within
these values. This enables users to reference dynamic values like
{{ .Release.Namespace }} or {{ .Release.Name }} in volume configurations.
Changes:
- deployment.yaml: Updated extraVolumes, extraVolumeMounts, and migrate.extraVolumeMounts
- job.yaml: Updated migrate.extraVolumes and migrate.extraVolumeMounts
This maintains consistency with other template fields in the chart
that already use common.tplvalues.render (e.g., sidecars, probes).
f5892d7 to
f47b2f0
Compare
|
/easycla |
|
We are using this chart in https://github.com/maisaai. We would really appreciate it if you could approve the implementation. Thank you. |
Summary
This PR enables Helm template rendering in
extraVolumesandextraVolumeMountsfields by replacingtoYamlwithcommon.tplvalues.render. This allows users to reference dynamic values like{{ .Release.Namespace }}or{{ .Release.Name }}in volume configurations.Changes
extraVolumes,extraVolumeMounts, andmigrate.extraVolumeMountsto usecommon.tplvalues.rendermigrate.extraVolumesandmigrate.extraVolumeMountsto usecommon.tplvalues.renderMotivation
This change maintains consistency with other template fields in the chart that already use
common.tplvalues.render(e.g.,sidecars, probes). It provides users with more flexibility when configuring volumes, especially in multi-tenant or multi-namespace scenarios.Example Usage
After this change, users can now use templates in their values:
```yaml
extraVolumes:
configMap:
name: my-config-{{ .Release.Namespace }}
extraVolumeMounts:
mountPath: /etc/config/{{ .Release.Name }}
```
Testing
common.tplvalues.renderhelper from Bitnami common chart dependencyThe change is non-breaking as static values will continue to work as before, while now also supporting template evaluation.
Summary by CodeRabbit