diff --git a/stable/parse/Chart.yaml b/stable/parse/Chart.yaml index b056af05e5..d18d72ecd0 100644 --- a/stable/parse/Chart.yaml +++ b/stable/parse/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: parse -version: 6.0.3 +version: 6.1.0 appVersion: 3.1.3 description: Parse is a platform that enables users to add a scalable and powerful backend to launch a full-featured app for iOS, Android, JavaScript, Windows, Unity, and more. keywords: diff --git a/stable/parse/README.md b/stable/parse/README.md index 70868a9831..28de5da5f1 100644 --- a/stable/parse/README.md +++ b/stable/parse/README.md @@ -48,6 +48,7 @@ The following table lists the configurable parameters of the Parse chart and the | 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) | | `service.type` | Kubernetes Service type | `LoadBalancer` | | `service.port` | Service HTTP port (Dashboard) | `80` | | `service.loadBalancerIP` | `loadBalancerIP` for the Parse Service | `nil` | diff --git a/stable/parse/templates/_helpers.tpl b/stable/parse/templates/_helpers.tpl index cb32e1271e..9c3f8c139d 100644 --- a/stable/parse/templates/_helpers.tpl +++ b/stable/parse/templates/_helpers.tpl @@ -112,3 +112,38 @@ 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 "parse.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 or .Values.server.image.pullSecrets .Values.dashboard.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.server.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.dashboard.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- else if or .Values.server.image.pullSecrets .Values.dashboard.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.server.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.dashboard.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- end -}} diff --git a/stable/parse/templates/dashboard-deployment.yaml b/stable/parse/templates/dashboard-deployment.yaml index 37243cfd53..83305afd6d 100644 --- a/stable/parse/templates/dashboard-deployment.yaml +++ b/stable/parse/templates/dashboard-deployment.yaml @@ -29,12 +29,7 @@ spec: fsGroup: {{ .Values.dashboard.securityContext.fsGroup }} runAsUser: {{ .Values.dashboard.securityContext.runAsUser }} {{- end }} - {{- if .Values.dashboard.image.pullSecrets }} - imagePullSecrets: - {{- range .Values.dashboard.image.pullSecrets }} - - name: {{ . }} - {{- end}} - {{- end }} +{{- include "parse.imagePullSecrets" . | indent 6 }} containers: - name: {{ template "parse.fullname" . }} image: {{ template "parse.dashboard.image" . }} diff --git a/stable/parse/templates/server-deployment.yaml b/stable/parse/templates/server-deployment.yaml index 6bf5c21022..8448a51a29 100644 --- a/stable/parse/templates/server-deployment.yaml +++ b/stable/parse/templates/server-deployment.yaml @@ -28,12 +28,7 @@ spec: fsGroup: {{ .Values.server.securityContext.fsGroup }} runAsUser: {{ .Values.server.securityContext.runAsUser }} {{- end }} - {{- if .Values.server.image.pullSecrets }} - imagePullSecrets: - {{- range .Values.server.image.pullSecrets }} - - name: {{ . }} - {{- end}} - {{- end }} +{{- include "parse.imagePullSecrets" . | indent 6 }} containers: - name: {{ template "parse.fullname" . }} image: {{ template "parse.server.image" . }} diff --git a/stable/parse/values.yaml b/stable/parse/values.yaml index b95b04e0c0..f9dfd981d2 100644 --- a/stable/parse/values.yaml +++ b/stable/parse/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 ## Kubernetes serviceType for Parse Deployment ## ref: http://kubernetes.io/docs/user-guide/services/#publishing-services---service-types @@ -45,7 +48,7 @@ server: ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ ## # pullSecrets: - # - myRegistrKeySecretName + # - myRegistryKeySecretName ## Parse Server Pod Security Context ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ @@ -105,7 +108,7 @@ dashboard: ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ ## # pullSecrets: - # - myRegistrKeySecretName + # - myRegistryKeySecretName ## Parse Dashboard Pod Security Context ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/