diff --git a/stable/jasperreports/Chart.yaml b/stable/jasperreports/Chart.yaml index 7b642d1eb2..051f7f9da2 100644 --- a/stable/jasperreports/Chart.yaml +++ b/stable/jasperreports/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: jasperreports -version: 4.0.4 +version: 4.1.0 appVersion: 7.1.1 description: The JasperReports server can be used as a stand-alone or embedded reporting and BI server that offers web-based reporting, analytic tools and visualization, diff --git a/stable/jasperreports/README.md b/stable/jasperreports/README.md index 017eebffcd..eacbfd4a32 100644 --- a/stable/jasperreports/README.md +++ b/stable/jasperreports/README.md @@ -50,6 +50,7 @@ The following table lists the configurable parameters of the JasperReports chart | Parameter | Description | Default | |-------------------------------|----------------------------------------------|----------------------------------------------------------| | `global.imageRegistry` | Global Docker image registry | `nil` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | | `image.registry` | JasperReports image registry | `docker.io` | | `image.repository` | JasperReports Image name | `bitnami/jasperreports` | | `image.tag` | JasperReports Image tag | `{VERSION}` | diff --git a/stable/jasperreports/templates/_helpers.tpl b/stable/jasperreports/templates/_helpers.tpl index 8655db205b..ca05bc7fac 100644 --- a/stable/jasperreports/templates/_helpers.tpl +++ b/stable/jasperreports/templates/_helpers.tpl @@ -52,3 +52,32 @@ Also, we can't use a single if because lazy evaluation is not an option {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} {{- end -}} {{- end -}} + +{{/* +Return the proper Docker Image Registry Secret Names +*/}} +{{- define "jasperreports.imagePullSecrets" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +Also, we can not use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} +{{- if .Values.global.imagePullSecrets }} +imagePullSecrets: +{{- range .Values.global.imagePullSecrets }} + - name: {{ . }} +{{- end }} +{{- else if .Values.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- else if .Values.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- end -}} diff --git a/stable/jasperreports/templates/deployment.yaml b/stable/jasperreports/templates/deployment.yaml index ebac3190f6..938e42d27d 100644 --- a/stable/jasperreports/templates/deployment.yaml +++ b/stable/jasperreports/templates/deployment.yaml @@ -19,12 +19,7 @@ spec: chart: "{{ template "jasperreports.chart" . }}" release: {{ .Release.Name | quote }} spec: - {{- if .Values.image.pullSecrets }} - imagePullSecrets: - {{- range .Values.image.pullSecrets }} - - name: {{ . }} - {{- end}} - {{- end }} +{{- include "jasperreports.imagePullSecrets" . | indent 6 }} containers: - name: {{ template "jasperreports.fullname" . }} image: {{ template "jasperreports.image" . }} diff --git a/stable/jasperreports/values.yaml b/stable/jasperreports/values.yaml index c3b06ff573..c07af8b9e3 100644 --- a/stable/jasperreports/values.yaml +++ b/stable/jasperreports/values.yaml @@ -1,8 +1,11 @@ -## 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 Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets ## # global: -# imageRegistry: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName ## Bitnami JasperReports image version ## ref: https://hub.docker.com/r/bitnami/dokuwiki/tags/ @@ -21,7 +24,7 @@ image: ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ ## # pullSecrets: - # - myRegistrKeySecretName + # - myRegistryKeySecretName ## User of the application ## ref: https://github.com/bitnami/bitnami-docker-jasperreports#configuration