mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/nats] Add global registry option (#8462)
* [stable/nats] Add global registry option Signed-off-by: Carlos Rodriguez Hernandez <crhernandez@bitnami.com> * Fix trailing space Signed-off-by: Carlos Rodriguez Hernandez <crhernandez@bitnami.com>
This commit is contained in:
committed by
k8s-ci-robot
parent
ea454d88df
commit
95fd1381b1
@@ -1,5 +1,5 @@
|
||||
name: nats
|
||||
version: 1.0.3
|
||||
version: 1.1.0
|
||||
appVersion: 1.3.0
|
||||
description: An open-source, cloud-native messaging system
|
||||
keywords:
|
||||
|
||||
@@ -47,6 +47,7 @@ The following table lists the configurable parameters of the NATS chart and thei
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|--------------------------------------|----------------------------------------------------------------------------------------------|-----------------------------------|
|
||||
| `global.imageRegistry` | Global Docker image registry | `nil` |
|
||||
| `image.registry` | NATS image registry | `docker.io` |
|
||||
| `image.repository` | NATS Image name | `bitnami/nats` |
|
||||
| `image.tag` | NATS Image tag | `{VERSION}` |
|
||||
|
||||
@@ -21,11 +21,26 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper image name
|
||||
Return the proper Nats image name
|
||||
*/}}
|
||||
{{- define "nats.image" -}}
|
||||
{{- $registryName := .Values.image.registry -}}
|
||||
{{- $repositoryName := .Values.image.repository -}}
|
||||
{{- $tag := .Values.image.tag | toString -}}
|
||||
{{- printf "%s/%s:%s" .Values.image.registry .Values.image.repository $tag -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
|
||||
Also, we can't use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
## Global Docker image registry
|
||||
## Please, note that this will override the image registry for all the images, including dependencies, configured to use the global value
|
||||
##
|
||||
# global:
|
||||
# imageRegistry:
|
||||
|
||||
## Bitnami NATS image version
|
||||
## ref: https://hub.docker.com/r/bitnami/nats/tags/
|
||||
##
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
## Global Docker image registry
|
||||
## Please, note that this will override the image registry for all the images, including dependencies, configured to use the global value
|
||||
##
|
||||
# global:
|
||||
# imageRegistry:
|
||||
|
||||
## Bitnami NATS image version
|
||||
## ref: https://hub.docker.com/r/bitnami/nats/tags/
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user