[stable/drupal] Private image registry support with imagePullSecrets (#1231)

* Allow configuring image pull secrets on the deployed pods

* Add default values file entry for image pull secrets

* Update README for image pull secrets

* Better README header organization
This commit is contained in:
Scott Rigby
2017-06-08 09:38:01 -07:00
committed by Lachlan Evenson
parent 015e7b7945
commit 210af58435
3 changed files with 31 additions and 0 deletions
+20
View File
@@ -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.
+4
View File
@@ -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 }}
+7
View File
@@ -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
##