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

Helm rendering fails on metrics service even if i don't need it #759

Closed
2 tasks done
alecerf opened this issue Dec 8, 2022 · 1 comment · Fixed by #765
Closed
2 tasks done

Helm rendering fails on metrics service even if i don't need it #759

alecerf opened this issue Dec 8, 2022 · 1 comment · Fixed by #765
Labels
kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed.

Comments

@alecerf
Copy link
Contributor

alecerf commented Dec 8, 2022

Welcome!

  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What version of the Traefik's Helm Chart are you using?

20.7.0

What version of Traefik are you using?

v2.9.6

What did you do?

I don't have .Values.metrics.prometheus.service set in my values file (so it should be disabled by default)

I execute helm template --name-template=[name that contains more than 50 chars] .

What did you see instead?

Error: execution error at (ingress-traefik/charts/traefik/templates/service-metrics.yaml:7:6): ERROR: Cannot create a metrics service when name contains more than 50 characters

What is your environment & configuration?

I use the default Traefik values file + some override but not on for the metrics part.

Additional Information

If i move the

{{- if .Values.metrics.prometheus }}
{{- if .Values.metrics.prometheus.service }}
{{- if (and (.Values.metrics.prometheus.service).enabled (not .Values.hub.enabled)) -}}

before

{{- $fullname := include "traefik.fullname" . }}
{{- if ge (len $fullname) 50 }}
  {{- fail "ERROR: Cannot create a metrics service when name contains more than 50 characters" }}
{{- end }}

on https://github.com/traefik/traefik-helm-chart/blob/master/traefik/templates/service-metrics.yaml , then it works again.

@mloiseleur mloiseleur added kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. and removed status/0-needs-triage labels Dec 8, 2022
@mloiseleur
Copy link
Member

Thanks for your report, @alecerf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants