mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/external-dns] Update helper functions to follow best practice (#12607)
* [stable/external-dns] Update helper functions to follow best practice The recommended helper function created by `helm create` now avoids the double naming situation when the release name contains chart name. It also adds `fullnameOverride` value, so the fullname could be overridden. This commit updates `external-dns` chart to work the same way. Signed-off-by: Mikhail Zholobov <legal90@gmail.com> * [stable/external-dns] Bump chart version Signed-off-by: Mikhail Zholobov <legal90@gmail.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
8bd37cf62e
commit
779ebe271a
@@ -3,7 +3,7 @@ description: |
|
||||
Configure external DNS servers (AWS Route53, Google CloudDNS and others)
|
||||
for Kubernetes Ingresses and Services
|
||||
name: external-dns
|
||||
version: 1.7.0
|
||||
version: 1.7.1
|
||||
appVersion: 0.5.9
|
||||
home: https://github.com/kubernetes-incubator/external-dns
|
||||
sources:
|
||||
|
||||
@@ -9,13 +9,18 @@ Expand the name of the chart.
|
||||
{{/*
|
||||
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 "external-dns.fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if ne $name .Release.Name -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s" $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -43,4 +48,4 @@ role_arn = {{ .Values.aws.roleArn }}
|
||||
{{- end }}
|
||||
region = {{ .Values.aws.region }}
|
||||
source_profile = default
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user