From 3b99e52cb8858d55f357131ad7cb98ae6ec91c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Francisco?= <40362916+jfrancisco0@users.noreply.github.com> Date: Fri, 31 Jan 2020 07:02:18 +0000 Subject: [PATCH] [stable/verdaccio] Add environment variables definition (#20223) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [stable/verdaccio] add extraEnvVars definition Allow extra environment variables to be defined and passed to the container Signed-off-by: João Francisco * [stable/verdaccio] Bump Chart version Signed-off-by: João Francisco --- stable/verdaccio/Chart.yaml | 2 +- stable/verdaccio/README.md | 1 + stable/verdaccio/templates/deployment.yaml | 4 ++++ stable/verdaccio/values.yaml | 10 ++++++++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/stable/verdaccio/Chart.yaml b/stable/verdaccio/Chart.yaml index aa3fa8ea1a..7579cd4354 100644 --- a/stable/verdaccio/Chart.yaml +++ b/stable/verdaccio/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: A lightweight private npm proxy registry (sinopia fork) name: verdaccio -version: 0.7.4 +version: 0.7.5 appVersion: 3.11.6 home: http://www.verdaccio.org icon: https://raw.githubusercontent.com/verdaccio/verdaccio/master/assets/bitmap/logo/logo-twitter.png diff --git a/stable/verdaccio/README.md b/stable/verdaccio/README.md index 584ecbf490..8b63b80bc3 100644 --- a/stable/verdaccio/README.md +++ b/stable/verdaccio/README.md @@ -77,6 +77,7 @@ and their default values. | `service.port` | Service port to expose | `4873` | | `service.nodePort` | Service port to expose | none | | `service.type` | Type of service to create | `ClusterIP` | +| `extraEnvVars` | Define environment variables to be passed to the container | `{}` Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, diff --git a/stable/verdaccio/templates/deployment.yaml b/stable/verdaccio/templates/deployment.yaml index 65e3053ba1..e0ff7f70f2 100644 --- a/stable/verdaccio/templates/deployment.yaml +++ b/stable/verdaccio/templates/deployment.yaml @@ -60,6 +60,10 @@ spec: - mountPath: /verdaccio/conf name: config readOnly: true + env: +{{- if .Values.extraEnvVars }} +{{ toYaml .Values.extraEnvVars | indent 12 }} +{{- end }} {{- if .Values.securityContext.enabled }} # Allow non-root user to access PersistentVolume securityContext: diff --git a/stable/verdaccio/values.yaml b/stable/verdaccio/values.yaml index 88fc97bfe1..a9e4aff505 100644 --- a/stable/verdaccio/values.yaml +++ b/stable/verdaccio/values.yaml @@ -48,6 +48,16 @@ ingress: # hosts: # - npm.blah.com +# Extra Environment Values - allows yaml definitions +extraEnvVars: +# - name: VALUE_FROM_SECRET +# valueFrom: +# secretKeyRef: +# name: secret_name +# key: secret_key +# - name: REGULAR_VAR +# value: ABC + configMap: | # This is the config file used for the docker images. # It allows all users to do anything, so don't use it on production systems.