From f3d852b477a87eabc83adbb8fcdbba038458c8d2 Mon Sep 17 00:00:00 2001 From: Greg Hill Date: Mon, 14 Oct 2019 10:46:37 +0100 Subject: [PATCH] revert burrow fullname (#17938) Signed-off-by: Gregory Hill --- stable/burrow/Chart.yaml | 2 +- stable/burrow/README.md | 6 +++--- stable/burrow/initialize.sh | 2 +- stable/burrow/templates/_helpers.tpl | 8 +++++++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/stable/burrow/Chart.yaml b/stable/burrow/Chart.yaml index 5565be3eda..bdb51d3749 100644 --- a/stable/burrow/Chart.yaml +++ b/stable/burrow/Chart.yaml @@ -1,5 +1,5 @@ name: burrow -version: 1.5.0 +version: 1.5.1 appVersion: 0.29.0 description: Burrow is a permissionable smart contract machine home: https://github.com/hyperledger/burrow diff --git a/stable/burrow/README.md b/stable/burrow/README.md index 5b40803210..ca332ed169 100644 --- a/stable/burrow/README.md +++ b/stable/burrow/README.md @@ -18,12 +18,12 @@ is installed. Two files will be generated, the first of note is `setup.yaml` whi ```bash curl -LO https://raw.githubusercontent.com/helm/charts/master/stable/burrow/initialize.sh -CHAIN_NODES=4 CHAIN_NAME="my-release" ./initialize.sh +CHAIN_NODES=4 CHAIN_NAME="my-release-burrow" ./initialize.sh kubectl apply --filename setup.yaml ``` -Please note that the variable `$CHAIN_NAME` should be the same as the helm release name specified below. Another file, `addresses.yaml` contains the the equivalent validator -addresses to set in the charts. +Please note that the variable `$CHAIN_NAME` should be the same as the helm release name specified below with the `-burrow` suffix. +Another file, `addresses.yaml` contains the the equivalent validator addresses to set in the charts. ### Deployment diff --git a/stable/burrow/initialize.sh b/stable/burrow/initialize.sh index 0932a51875..92c2d93eeb 100755 --- a/stable/burrow/initialize.sh +++ b/stable/burrow/initialize.sh @@ -13,7 +13,7 @@ then fi export CHAIN_NODES=${CHAIN_NODES:-4} -export CHAIN_NAME=${CHAIN_NAME:-"my-release"} +export CHAIN_NAME=${CHAIN_NAME:-"my-release-burrow"} if [ -z $CHAIN_OUTPUT_DIRECTORY ]; then export CHAIN_OUTPUT_DIRECTORY=`pwd` fi diff --git a/stable/burrow/templates/_helpers.tpl b/stable/burrow/templates/_helpers.tpl index 31217a1143..74a73a4c9e 100644 --- a/stable/burrow/templates/_helpers.tpl +++ b/stable/burrow/templates/_helpers.tpl @@ -9,12 +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 "burrow.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} -{{- printf "%s" .Release.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 -}}