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

fix tplValues.render helper name #15

Merged
merged 2 commits into from
Sep 18, 2023
Merged

Conversation

shippo-eric
Copy link

Error in question:

Error: template: nsq/charts/nsq/templates/servicemonitor.yaml:9:8: executing "nsq/charts/nsq/templates/servicemonitor.yaml" at <include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.labels "context" $)>: error calling include: template: no template "common.tplvalues.render" associated with template "gotpl"

This PR fixes a typo in the template. common.tplvalues.render is not defined in the chart, and it should read nsq.tplvalues.render

Also increment chart patch version

@mreiferson
Copy link
Member

I ran helm template locally, seems OK, but I suppose I need to actually set the values in these if blocks to trigger this. I'm gonna defer to @ploxiln who's reviewed these PRs in the past.

@mreiferson mreiferson added the bug Something isn't working label Sep 18, 2023
@@ -20,7 +20,7 @@ spec:
protocol: TCP
name: http-metrics
{{- if .Values.metrics.service.extraPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.service.extraPorts "context" $) | nindent 4 }}
{{- include "nsq.tplValues.render" (dict "value" .Values.metrics.service.extraPorts "context" $) | nindent 4 }}
Copy link
Member

Choose a reason for hiding this comment

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

Indeed, "common." is wrong, it should be "nsq."

But, are these references not case-sensitive? Because it's "tplvalues" with a lower-case "v" where it is currently defined (and everywhere it is already correctly referenced with "nsq.").

{{- define "nsq.tplvalues.render" -}}

livenessProbe: {{- include "nsq.tplvalues.render" (dict "value" (omit .Values.metrics.livenessProbe "enabled") "context" $) | nindent 10 }}

Copy link
Contributor

Choose a reason for hiding this comment

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

good catch, casing change is not intended

Copy link
Member

Choose a reason for hiding this comment

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

thanks!

@ploxiln ploxiln merged commit 8a57158 into nsqio:master Sep 18, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants