diff --git a/stable/drupal/README.md b/stable/drupal/README.md index d38cd54444..6e6f99bca8 100644 --- a/stable/drupal/README.md +++ b/stable/drupal/README.md @@ -48,6 +48,7 @@ The following tables lists the configurable parameters of the Drupal chart and t | Parameter | Description | Default | | --------------------------------- | ------------------------------------- | --------------------------------------------------------- | | `image` | Drupal image | `bitnami/drupal:{VERSION}` | +| `imagePullSecrets` | Specify image pull secrets | `nil` (does not add image pull secrets to deployed pods) | | `imagePullPolicy` | Image pull policy | `IfNotPresent` | | `drupalUsername` | User of the application | `user` | | `drupalPassword` | Application password | _random 10 character long alphanumeric string_ | @@ -88,6 +89,25 @@ $ helm install --name my-release -f values.yaml stable/drupal > **Tip**: You can use the default [values.yaml](values.yaml) +## Image + +The `image` parameter allows specifying which image will be pulled for the chart. + +### Private registry + +If you configure the `image` value to one in a private registry, you will need to [specify an image pull secret](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod). + +1. Manually create image pull secret(s) in the namespace. See [this YAML example reference](https://kubernetes.io/docs/concepts/containers/images/#creating-a-secret-with-a-docker-config). Consult your image registry's documentation about getting the appropriate secret. +1. Note that the `imagePullSecrets` configuration value cannot currently be passed to helm using the `--set` parameter, so you must supply these using a `values.yaml` file, such as: +```yaml +imagePullSecrets: + - name: SECRET_NAME +``` +1. Install the chart +```console +helm install --name my-release -f values.yaml stable/drupal +``` + ## Persistence The [Bitnami Drupal](https://github.com/bitnami/bitnami-docker-drupal) image stores the Drupal data and configurations at the `/bitnami/drupal` and `/bitnami/apache` paths of the container. diff --git a/stable/drupal/templates/deployment.yaml b/stable/drupal/templates/deployment.yaml index f97f8b0b6f..e156dd7638 100644 --- a/stable/drupal/templates/deployment.yaml +++ b/stable/drupal/templates/deployment.yaml @@ -59,6 +59,10 @@ spec: mountPath: /bitnami/drupal - name: apache-data mountPath: /bitnami/apache + {{- if .Values.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.imagePullSecrets | indent 8 }} + {{- end }} volumes: - name: drupal-data {{- if .Values.persistence.enabled }} diff --git a/stable/drupal/values.yaml b/stable/drupal/values.yaml index d735d1a3a5..56a20f660e 100644 --- a/stable/drupal/values.yaml +++ b/stable/drupal/values.yaml @@ -3,6 +3,13 @@ ## image: bitnami/drupal:8.3.2-r0 +## Optionally specify an array of imagePullSecrets. +## Secrets must be manually created in the namespace. +## ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod +## +# imagePullSecrets: +# - name: myRegistryKeySecretName + ## Specify a imagePullPolicy ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images ##