mirror of
https://github.com/helm/helm.git
synced 2026-05-28 04:35:48 -04:00
fix(helm): add trimSuffix to helper functions
This commit is contained in:
parent
aec6c50708
commit
c38fb120bf
3 changed files with 6 additions and 6 deletions
|
|
@ -2,7 +2,7 @@
|
|||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{define "name"}}{{default "nginx" .Values.nameOverride | trunc 24 }}{{end}}
|
||||
{{define "name"}}{{default "nginx" .Values.nameOverride | trunc 24 | trimSuffix "-" }}{{end}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
|
|
@ -12,5 +12,5 @@ We truncate at 24 chars because some Kubernetes name fields are limited to this
|
|||
*/}}
|
||||
{{define "fullname"}}
|
||||
{{- $name := default "nginx" .Values.nameOverride -}}
|
||||
{{printf "%s-%s" .Release.Name $name | trunc 24 -}}
|
||||
{{printf "%s-%s" .Release.Name $name | trunc 24 | trimSuffix "-" -}}
|
||||
{{end}}
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ const defaultHelpers = `{{/* vim: set filetype=mustache: */}}
|
|||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 24 -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 24 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
|
|
@ -171,7 +171,7 @@ We truncate at 24 chars because some Kubernetes name fields are limited to this
|
|||
*/}}
|
||||
{{- define "fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 24 -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 24 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
`
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{define "name"}}{{default "nginx" .Values.nameOverride | trunc 24 }}{{end}}
|
||||
{{define "name"}}{{default "nginx" .Values.nameOverride | trunc 24 | trimSuffix "-" }}{{end}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
|
|
@ -12,5 +12,5 @@ We truncate at 24 chars because some Kubernetes name fields are limited to this
|
|||
*/}}
|
||||
{{define "fullname"}}
|
||||
{{- $name := default "nginx" .Values.nameOverride -}}
|
||||
{{printf "%s-%s" .Release.Name $name | trunc 24 -}}
|
||||
{{printf "%s-%s" .Release.Name $name | trunc 24 | trimSuffix "-" -}}
|
||||
{{end}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue