Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/drupal] Fix chart not being upgradable #7825

Merged
merged 2 commits into from
Sep 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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