Skip to content
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

Support rendering default templates relying on helpers #28

Open
gberche-orange opened this issue Dec 21, 2020 · 0 comments
Open

Support rendering default templates relying on helpers #28

gberche-orange opened this issue Dec 21, 2020 · 0 comments

Comments

@gberche-orange
Copy link

Is your feature request related to a problem? Please describe.

As a hcunit user

  • in order to unit tests helm charts generated by the helm create command which include a dependency to _helpers.tpl template helper
  • I need hcunit to support specifying a template helper path

Observed behavior

at <include "my-chart.fullname" .>: error calling include: template: no template "my-chart.fullname" associated with template "gotpl"

where fullname is defined in the _helpers.tpl template helper

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "p-mysql.fullname" -}}
{{- if .Values.fullnameOverride }}
[...]

Describe the solution you'd like

I'd like to be able to render templates in unit tests for debugging purposes, without having access to a full-fledge kubernetes instance (e.g. as part of circle ci unit tests where a KIND is not yet available)

Describe alternatives you've considered

I've worked around the issue using helm install my-render-test --dry-run --debug ./my-chart/ --values ./my-chart/values.yaml on an environment with access to a K8S server

@gberche-orange gberche-orange changed the title Support rendering default templates relying on helper Support rendering default templates relying on helpers Dec 21, 2020
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

No branches or pull requests

1 participant