diff --git a/stable/parse/Chart.yaml b/stable/parse/Chart.yaml index a2f95e3acf..83f03ca29f 100644 --- a/stable/parse/Chart.yaml +++ b/stable/parse/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: parse -version: 10.1.3 +version: 10.2.0 appVersion: 3.9.0 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 840bcd373c..77a0645ae9 100644 --- a/stable/parse/README.md +++ b/stable/parse/README.md @@ -48,7 +48,7 @@ The command removes all the Kubernetes components associated with the chart and The following table lists the configurable parameters of the Parse chart and their default values. | 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) | | `global.storageClass` | Global storage class for dynamic provisioning | `nil` | @@ -87,6 +87,9 @@ The following table lists the configurable parameters of the Parse chart and the | `server.affinity` | Affinity for pod assignment | `{}` (The value is evaluated as a template) | | `server.nodeSelector` | Node labels for pod assignment | `{}` (The value is evaluated as a template) | | `server.tolerations` | Tolerations for pod assignment | `[]` (The value is evaluated as a template) | +| `server.extraEnvVars` | Array containing extra env vars (evaluated as a template) | `nil` | +| `server.extraEnvVarsCM` | ConfigMap containing extra env vars (evaluated as a template) | `nil` | +| `server.extraEnvVarsSecret` | Secret containing extra env vars (evaluated as a template) | `nil` | | `dashboard.enabled` | Enable parse dashboard | `true` | | `dashboard.image.registry` | Dashboard image registry | `docker.io` | | `dashboard.image.repository` | Dashboard image name | `bitnami/parse-dashboard` | @@ -105,6 +108,9 @@ The following table lists the configurable parameters of the Parse chart and the | `dashboard.affinity` | Affinity for pod assignment | `{}` (The value is evaluated as a template) | | `dashboard.nodeSelector` | Node labels for pod assignment | `{}` (The value is evaluated as a template) | | `dashboard.tolerations` | Tolerations for pod assignment | `[]` (The value is evaluated as a template) | +| `dashboard.extraEnvVars` | Array containing extra env vars (evaluated as a template) | `nil` | +| `dashboard.extraEnvVarsCM` | ConfigMap containing extra env vars (evaluated as a template) | `nil` | +| `dashboard.extraEnvVarsSecret` | Secret containing extra env vars (evaluated as a template) | `nil` | | `persistence.enabled` | Enable Parse persistence using PVC | `true` | | `persistence.storageClass` | PVC Storage Class for Parse volume | `nil` (uses alpha storage class annotation) | | `persistence.accessMode` | PVC Access Mode for Parse volume | `ReadWriteOnce` | @@ -198,6 +204,18 @@ As an alternative, this chart supports using an initContainer to change the owne You can enable this initContainer by setting `volumePermissions.enabled` to `true`. +### Adding extra environment variables + +In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the `extraEnvVars` (available in the `server` and `dashboard` sections) property. + +```yaml +extraEnvVars: + - name: PARSE_SERVER_ALLOW_CLIENT_CLASS_CREATION + value: true +``` + +Alternatively, you can use a ConfigMap or a Secret with the environment variables. To do so, use the `extraEnvVarsCM` or the `extraEnvVarsSecret` values. + ## Upgrading ### To 10.0.0 diff --git a/stable/parse/templates/dashboard-deployment.yaml b/stable/parse/templates/dashboard-deployment.yaml index e617b171a4..a8811a5e2e 100644 --- a/stable/parse/templates/dashboard-deployment.yaml +++ b/stable/parse/templates/dashboard-deployment.yaml @@ -57,6 +57,20 @@ spec: key: master-key - name: PARSE_DASHBOARD_APP_NAME value: {{ .Values.dashboard.appName | quote }} + {{- if .Values.dashboard.extraEnvVars }} + {{- include "parse.tplValue" ( dict "value" .Values.dashboard.extraEnvVars "context" $ ) | nindent 12 }} + {{- end }} + {{- if or .Values.dashboard.extraEnvVarsCM .Values.dashboard.extraEnvVarsSecret }} + envFrom: + {{- if .Values.dashboard.extraEnvVarsCM }} + - configMapRef: + name: {{ include "parse.tplValue" ( dict "value" .Values.dashboard.extraEnvVarsCM "context" $ ) }} + {{- end }} + {{- if .Values.dashboard.extraEnvVarsSecret }} + - secretRef: + name: {{ include "parse.tplValue" ( dict "value" .Values.dashboard.extraEnvVarsSecret "context" $ ) }} + {{- end }} + {{- end }} ports: - name: dashboard-http containerPort: 4040 diff --git a/stable/parse/templates/server-deployment.yaml b/stable/parse/templates/server-deployment.yaml index 7b085b6482..189f843592 100644 --- a/stable/parse/templates/server-deployment.yaml +++ b/stable/parse/templates/server-deployment.yaml @@ -73,6 +73,20 @@ spec: name: {{ include "parse.mongodb.fullname" . }} key: mongodb-root-password {{- end }} + {{- if .Values.server.extraEnvVars }} + {{- include "parse.tplValue" ( dict "value" .Values.server.extraEnvVars "context" $ ) | nindent 12 }} + {{- end }} + {{- if or .Values.server.extraEnvVarsCM .Values.server.extraEnvVarsSecret }} + envFrom: + {{- if .Values.server.extraEnvVarsCM }} + - configMapRef: + name: {{ include "parse.tplValue" ( dict "value" .Values.server.extraEnvVarsCM "context" $ ) }} + {{- end }} + {{- if .Values.server.extraEnvVarsSecret }} + - secretRef: + name: {{ include "parse.tplValue" ( dict "value" .Values.server.extraEnvVarsSecret "context" $ ) }} + {{- end }} + {{- end }} ports: - name: server-http containerPort: {{ .Values.server.port }} diff --git a/stable/parse/values.yaml b/stable/parse/values.yaml index 82cb638e1f..02f9a74572 100644 --- a/stable/parse/values.yaml +++ b/stable/parse/values.yaml @@ -104,6 +104,20 @@ server: ## # masterKey: + ## An array to add extra env vars + ## For example: + ## extraEnvVars: + ## - name: PARSE_SERVER_ALLOW_CLIENT_CLASS_CREATION + ## value: "true" + ## + extraEnvVars: [] + ## Name of a ConfigMap containing extra env vars + ## + extraEnvVarsCM: + ## Name of a Secret containing extra env vars + ## + extraEnvVarsSecret: + ## Enable Cloud Clode ## ref: https://github.com/bitnami/bitnami-docker-parse#how-to-deploy-your-cloud-functions-with-parse-cloud-code ## @@ -246,6 +260,20 @@ dashboard: ## tolerations: {} + ## An array to add extra env vars + ## For example: + ## extraEnvVars: + ## - name: KIBANA_ELASTICSEARCH_URL + ## value: test + ## + extraEnvVars: [] + ## Name of a ConfigMap containing extra env vars + ## + extraEnvVarsCM: + ## Name of a Secret containing extra env vars + ## + extraEnvVarsSecret: + ## Configure the ingress resource that allows you to access the ## Parse installation. ## ref: http://kubernetes.io/docs/user-guide/ingress/