[stable/nats] Standardize 'fullname' and 'name' macros (#15439)

Signed-off-by: juan131 <juan@bitnami.com>
This commit is contained in:
Juan Ariza Toledano
2019-07-11 06:46:55 -07:00
committed by Kubernetes Prow Robot
parent 08591fe2ac
commit f526decd27
5 changed files with 27 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: nats
version: 3.0.1
version: 3.0.2
appVersion: 2.0.0
description: An open-source, cloud-native messaging system
keywords:
+2
View File
@@ -54,6 +54,8 @@ The following table lists the configurable parameters of the NATS chart and thei
| `image.tag` | NATS 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 nats.fullname template with a string (will prepend the release name) | `nil` |
| `fullnameOverride` | String to fully override nats.fullname template with a string | `nil` |
| `auth.enabled` | Switch to enable/disable client authentication | `true` |
| `auth.user` | Client authentication user | `nats_cluster` |
| `auth.password` | Client authentication password | `random alhpanumeric string (10)` |
+8
View File
@@ -12,9 +12,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 "nats.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 -}}
{{- define "nats.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+8
View File
@@ -26,6 +26,14 @@ image:
# pullSecrets:
# - name: myRegistryKeySecretName
## String to partially override nats.fullname template (will maintain the release name)
##
# nameOverride:
## String to fully override nats.fullname template
##
# fullnameOverride:
## NATS replicas
replicaCount: 3
+8
View File
@@ -26,6 +26,14 @@ image:
# pullSecrets:
# - name: myRegistryKeySecretName
## String to partially override nats.fullname template (will maintain the release name)
##
# nameOverride:
## String to fully override nats.fullname template
##
# fullnameOverride:
## NATS replicas
replicaCount: 1