diff --git a/bitnami/mean/Chart.yaml b/bitnami/mean/Chart.yaml index 65ff66977..184f32c7b 100644 --- a/bitnami/mean/Chart.yaml +++ b/bitnami/mean/Chart.yaml @@ -1,5 +1,5 @@ name: mean -version: 4.2.0 +version: 4.2.1 appVersion: 3.6.4 description: MEAN is a free and open-source JavaScript software stack for building dynamic web sites and web applications. The MEAN stack is MongoDB, Express.js, Angular, and Node.js. Because all components of the MEAN stack support programs written in JavaScript, MEAN applications can be written in one language for both server-side and client-side execution environments. keywords: diff --git a/bitnami/mean/README.md b/bitnami/mean/README.md index e891c3483..b46ed2852 100644 --- a/bitnami/mean/README.md +++ b/bitnami/mean/README.md @@ -53,14 +53,14 @@ The following table lists the configurable parameters of the MEAN chart and thei |-----------------------------------------|-----------------------------------------------------------|-----------------------------------------------------------| | `global.imageRegistry` | Global Docker image registry | `nil` | | `image.registry` | NodeJS image registry | `docker.io` | -| `image.repository` | NodeJS Image name | `bitnami/node` | -| `image.tag` | NodeJS Image tag | `{VERSION}` | +| `image.repository` | NodeJS image name | `bitnami/node` | +| `image.tag` | NodeJS image tag | `{VERSION}` | | `image.pullPolicy` | NodeJS image pull policy | `IfNotPresent` | | `image.pullSecrets` | Specify image pull secrets | `nil` (does not add image pull secrets to deployed pods) | -| `gitImage.registry` | Git image registry | `docker.io` | -| `gitImage.repository` | Git Image name | `alpine/git` | -| `gitImage.tag` | Git Image tag | `latest` | -| `gitImage.pullPolicy` | Git image pull policy | IfNotPresent` | +| `git.registry` | Git image registry | `docker.io` | +| `git.repository` | Git image name | `bitnami/git` | +| `git.tag` | Git image tag | `latest` | +| `git.pullPolicy` | Git image pull policy | IfNotPresent` | | `repository` | Repo of the application | `https://github.com/bitnami/sample-mean.git` | | `revision` | Revision to checkout | `master` | | `replicas` | Number of replicas for the application | `1` | diff --git a/bitnami/mean/templates/_helpers.tpl b/bitnami/mean/templates/_helpers.tpl index 5bd43abb5..464a3d75e 100644 --- a/bitnami/mean/templates/_helpers.tpl +++ b/bitnami/mean/templates/_helpers.tpl @@ -63,3 +63,26 @@ 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 Git image name +*/}} +{{- define "git.image" -}} +{{- $registryName := .Values.git.registry -}} +{{- $repositoryName := .Values.git.repository -}} +{{- $tag := .Values.git.tag | toString -}} +{{/* +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 -}} diff --git a/bitnami/mean/templates/deployment.yaml b/bitnami/mean/templates/deployment.yaml index 9475cb40d..811680ddb 100644 --- a/bitnami/mean/templates/deployment.yaml +++ b/bitnami/mean/templates/deployment.yaml @@ -28,8 +28,8 @@ spec: {{- end }} initContainers: - name: git-clone-repository - image: "{{ .Values.gitImage.registry }}/{{ .Values.gitImage.repository }}:{{ .Values.gitImage.tag }}" - imagePullPolicy: {{ .Values.gitImage.pullPolicy | quote }} + image: "{{ template "git.image" . }}" + imagePullPolicy: {{ .Values.git.pullPolicy | quote }} command: [ '/bin/sh', '-c' , 'git clone {{ .Values.repository }} /app && cd /app && git checkout {{ .Values.revision }}'] volumeMounts: - name: app diff --git a/bitnami/mean/values.yaml b/bitnami/mean/values.yaml index 102e709d2..1feb04a67 100644 --- a/bitnami/mean/values.yaml +++ b/bitnami/mean/values.yaml @@ -23,9 +23,9 @@ image: # pullSecrets: # - myRegistrKeySecretName -gitImage: +git: registry: docker.io - repository: alpine/git + repository: bitnami/git tag: latest pullPolicy: IfNotPresent diff --git a/bitnami/node/Chart.yaml b/bitnami/node/Chart.yaml index b531de3c0..32fcf8d33 100644 --- a/bitnami/node/Chart.yaml +++ b/bitnami/node/Chart.yaml @@ -1,5 +1,5 @@ name: node -version: 6.2.0 +version: 6.2.1 appVersion: 10.7.0 description: Event-driven I/O server-side JavaScript environment based on V8 keywords: diff --git a/bitnami/node/README.md b/bitnami/node/README.md index 3cd42ab11..e243eb871 100644 --- a/bitnami/node/README.md +++ b/bitnami/node/README.md @@ -53,15 +53,14 @@ The following table lists the configurable parameters of the Node chart and thei |-----------------------------------------|-----------------------------------------------------------|-----------------------------------------------------------| | `global.imageRegistry` | Global Docker image registry | `nil` | | `image.registry` | NodeJS image registry | `docker.io` | -| `image.repository` | NodeJS Image name | `bitnami/node` | -| `image.tag` | NodeJS Image tag | `{VERSION}` | +| `image.repository` | NodeJS image name | `bitnami/node` | +| `image.tag` | NodeJS image tag | `{VERSION}` | | `image.pullPolicy` | NodeJS image pull policy | `IfNotPresent` | | `image.pullSecrets` | Specify image pull secrets | `nil` (does not add image pull secrets to deployed pods) | -| `gitImage.registry` | Git image registry | `docker.io` | -| `gitImage.repository` | Git Image name | `alpine/git` | -| `gitImage.tag` | Git Image tag | `latest` | -| `gitImage.pullPolicy` | Git image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` | -| `gitImage` | Image used for initContainers | `alpine/git` | +| `git.registry` | Git image registry | `docker.io` | +| `git.repository` | Git image name | `bitnami/git` | +| `git.tag` | Git image tag | `latest` | +| `git.pullPolicy` | Git image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` | | `repository` | Repo of the application | `https://github.com/bitnami/sample-mean.git` | | `revision` | Revision to checkout | `master` | | `replicas` | Number of replicas for the application | `1` | diff --git a/bitnami/node/templates/_helpers.tpl b/bitnami/node/templates/_helpers.tpl index 7009fe091..15927885f 100644 --- a/bitnami/node/templates/_helpers.tpl +++ b/bitnami/node/templates/_helpers.tpl @@ -63,3 +63,26 @@ 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 git image name +*/}} +{{- define "git.image" -}} +{{- $registryName := .Values.git.registry -}} +{{- $repositoryName := .Values.git.repository -}} +{{- $tag := .Values.git.tag | toString -}} +{{/* +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 -}} diff --git a/bitnami/node/templates/deployment.yaml b/bitnami/node/templates/deployment.yaml index a3d95404c..02d619bf6 100644 --- a/bitnami/node/templates/deployment.yaml +++ b/bitnami/node/templates/deployment.yaml @@ -29,8 +29,8 @@ spec: {{- end }} initContainers: - name: git-clone-repository - image: "{{ .Values.gitImage.registry }}/{{ .Values.gitImage.repository }}:{{ .Values.gitImage.tag }}" - imagePullPolicy: {{ .Values.gitImage.pullPolicy | quote }} + image: "{{ template "git.image" . }}" + imagePullPolicy: {{ .Values.git.pullPolicy | quote }} command: [ '/bin/sh', '-c' , 'git clone {{ .Values.repository }} /app && cd /app && git checkout {{ .Values.revision }}'] volumeMounts: - name: app diff --git a/bitnami/node/values.yaml b/bitnami/node/values.yaml index 2b155e946..493b6c10d 100644 --- a/bitnami/node/values.yaml +++ b/bitnami/node/values.yaml @@ -23,9 +23,9 @@ image: # pullSecrets: # - myRegistrKeySecretName -gitImage: +git: registry: docker.io - repository: alpine/git + repository: bitnami/git tag: latest pullPolicy: IfNotPresent