Skip to content

Commit

Permalink
[stable/drupal] Fix chart not being upgradable (helm#7825)
Browse files Browse the repository at this point in the history
* [stable/drupal] Fix chart not being upgradable

Signed-off-by: Javier J. Salmeron Garcia <jsalmeron@bitnami.com>

* Add readme

Signed-off-by: Javier J. Salmeron Garcia <jsalmeron@bitnami.com>
Signed-off-by: Jakob Niggel <info@jakobniggel.de>
  • Loading branch information
javsalgar authored and Jnig committed Nov 13, 2018
1 parent af51f51 commit 3832478
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/drupal/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: drupal
version: 1.1.4
version: 2.0.0
appVersion: 8.6.1
description: One of the most versatile open source content management systems.
keywords:
Expand Down
12 changes: 12 additions & 0 deletions stable/drupal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,15 @@ $ helm install --name my-release --set persistence.drupal.existingClaim=PVC_NAME

This will mount the `drupal-data` volume into the `hostPath` directory. The site data will be persisted if the mount path contains valid data, else the site data will be initialized at first launch.
1. Because the container cannot control the host machine’s directory permissions, you must set the Drupal file directory permissions yourself and disable or clear Drupal cache. See Drupal Core’s [INSTALL.txt](http://cgit.drupalcode.org/drupal/tree/core/INSTALL.txt?h=8.3.x#n152) for setting file permissions, and see [Drupal handbook page](https://www.drupal.org/node/2598914) to disable the cache, or [Drush handbook](https://drushcommands.com/drush-8x/cache/cache-rebuild/) to clear cache.

## Upgrading

### To 2.0.0

Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments.
Use the workaround below to upgrade from versions previous to 2.0.0. The following example assumes that the release name is drupal:
```console
$ kubectl patch deployment drupal-drupal --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]'
$ kubectl delete statefulset drupal-mariadb --cascade=false
```
4 changes: 4 additions & 0 deletions stable/drupal/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ metadata:
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
selector:
matchLabels:
app: {{ template "drupal.fullname" . }}
release: "{{ .Release.Name }}"
replicas: 1
template:
metadata:
Expand Down

0 comments on commit 3832478

Please sign in to comment.