Standardize component.name & component.fullname functions

Signed-off-by: juan131 <juan@bitnami.com>
This commit is contained in:
juan131
2019-07-10 11:59:36 +02:00
parent 54123018c8
commit 775948eb27
139 changed files with 732 additions and 269 deletions

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: consul
version: 4.2.13
version: 4.2.14
appVersion: 1.5.2
description: Highly available and distributed service discovery and key-value store designed with support for the modern data center to make distributed systems and configuration easy.
home: https://www.consul.io/

View File

@@ -58,6 +58,8 @@ The following tables lists the configurable parameters of the HashiCorp Consul c
| `image.tag` | HashiCorp Consul image tag | `{TAG_NAME}` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `nameOverride` | String to partially override consul.fullname template with a string (will prepend the release name) | `nil` |
| `fullnameOverride` | String to fully override consul.fullname template with a string | `nil` |
| `replicas` | Number of replicas | `3` |
| `port` | HashiCorp Consul http listening port | `8500` |
| `service.rpcPort` | HashiCorp Consul rpc listening port | `8400` |

View File

@@ -11,9 +11,17 @@ 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).
*/}}
{{- define "consul.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $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 -}}
{{/*
Create chart name and version as used by the chart label.

View File

@@ -26,6 +26,14 @@ image:
# pullSecrets:
# - myRegistryKeySecretName
## String to partially override consul.fullname template (will maintain the release name)
##
# nameOverride:
## String to fully override consul.fullname template
##
# fullnameOverride:
## Consul replicas
replicas: 3

View File

@@ -26,6 +26,14 @@ image:
# pullSecrets:
# - myRegistryKeySecretName
## String to partially override consul.fullname template (will maintain the release name)
##
# nameOverride:
## String to fully override consul.fullname template
##
# fullnameOverride:
## Consul replicas
replicas: 3