From 5dbd884de4acb1cd1962e40bcf77dcea10fe03f2 Mon Sep 17 00:00:00 2001 From: Miroslav Hadzhiev Date: Sat, 4 Jan 2020 17:54:56 +0200 Subject: [PATCH 1/2] Fixes for Helm packaging --- CHANGELOG.md | 6 ++++++ Chart.yaml | 4 ++-- templates/_helpers.tpl | 17 +++++++++++------ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8155aba4..2e52864f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ numbering uses [semantic versioning](http://semver.org). NOTE: The change log until version `v0.2.4` is auto-generated. +## [v1.6.5](https://github.com/Xtigyro/puppetserver-helm-chart/tree/v1.6.5) (2020-01-05) + +- Fixes for Helm packaging. + +[Full Changelog](https://github.com/Xtigyro/puppetserver-helm-chart/compare/v1.6.4...v1.6.5) + ## [v1.6.4](https://github.com/Xtigyro/puppetserver-helm-chart/tree/v1.6.4) (2020-01-04) - Corrections and additional info for use of Ingress resource. diff --git a/Chart.yaml b/Chart.yaml index df169d2d..80ea883c 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Puppet automates the delivery and operation of software. -name: puppetserver -version: 1.6.3 +name: puppetserver-helm-chart +version: 1.6.5 appVersion: 6.7.2 keywords: ["puppet", "puppetserver", "automation", "iac", "infrastructure", "cm", "ci", "cd"] home: https://puppet.com/ diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index ff64cd71..d2d700cc 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -4,23 +4,28 @@ Expand the name of the chart. */}} {{- define "puppetserver.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains .Release.Name $name -}} +{{- printf .Release.Name | trunc 34 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 34 | trimSuffix "-" -}} +{{- end -}} {{- end -}} {{/* 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). +We truncate at 52 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 "puppetserver.fullname" -}} {{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- .Values.fullnameOverride | trunc 52 | trimSuffix "-" -}} {{- else -}} {{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- if contains .Release.Name $name -}} +{{- printf .Release.Name | trunc 52 | trimSuffix "-" -}} {{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- printf "%s-%s" .Release.Name $name | trunc 52 | trimSuffix "-" -}} {{- end -}} {{- end -}} {{- end -}} From aba0bad3afc4be57a040dcad8aee0468e96e0929 Mon Sep 17 00:00:00 2001 From: Miroslav Hadzhiev Date: Sat, 4 Jan 2020 18:10:15 +0200 Subject: [PATCH 2/2] Update _helpers.tpl --- templates/_helpers.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index d2d700cc..b13e5118 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -5,7 +5,7 @@ Expand the name of the chart. */}} {{- define "puppetserver.name" -}} {{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains .Release.Name $name -}} +{{- if contains $name .Release.Name -}} {{- printf .Release.Name | trunc 34 | trimSuffix "-" -}} {{- else -}} {{- printf "%s-%s" .Release.Name $name | trunc 34 | trimSuffix "-" -}} @@ -22,7 +22,7 @@ If release name contains chart name it will be used as a full name. {{- .Values.fullnameOverride | trunc 52 | trimSuffix "-" -}} {{- else -}} {{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains .Release.Name $name -}} +{{- if contains $name .Release.Name -}} {{- printf .Release.Name | trunc 52 | trimSuffix "-" -}} {{- else -}} {{- printf "%s-%s" .Release.Name $name | trunc 52 | trimSuffix "-" -}}