diff --git a/CHANGELOG.md b/CHANGELOG.md index ec21778df08c66b673f0d33a1796e708f5dc6403..c9e5316ca023815ed9172b155622f885a8bed915 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## Unreleased + +* Update mariadb chart to 9.6.0 + NOTE: the mariadb chart does not provide backwards compatibility in this + case, so manual action is required if you want to upgrade an existing + wordpress-helm release to this new version: either by migrating database data + from the old release to the new one, or by using the `existingClaim` + parameter(s) to reuse the existing persistent volumes. For details, see + [mariadb chart upgrade notes]( + https://artifacthub.io/packages/helm/bitnami/mariadb/9.6.0#to-8-0-0) + ## [0.2.2] - 2021-09-22 * Remove duplicate key `checksum/config` from template diff --git a/Chart.yaml b/Chart.yaml index fbb8f8f9e737d34f8a779c9ac125f656cb2f8eaf..418aaff423fcee679febde8ab062f21dba5e42b6 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -9,7 +9,7 @@ version: 0.2.2 icon: https://make.wordpress.org/design/files/2016/09/WordPress-logotype-wmark.png dependencies: - name: mariadb - version: 7.3.16 + version: 9.6.0 repository: "https://charts.bitnami.com/bitnami" tags: - mysql diff --git a/README.md b/README.md index 861420efbec3a75dc49da1c2e738364b64774204..5243d15476af4de8e2391b82eac1020ca0f7301a 100644 --- a/README.md +++ b/README.md @@ -38,10 +38,10 @@ For a simple WordPress installation, you only need to edit the following values: | `ansibleVars.WP_TITLE` | The title of the site | Demo WP | | `ansibleVars.WP_THEME_ACTIVE` | A *slug* for the theme you want to install on your site (can also be changed through interface) | twentytwenty | | `ansibleVars.WP_EMAIL` | The administrator's email adress | youremailhere@example.com | -| `database.db.user` | Database user | wordpress | -| `database.db.password` | `wordpress` db user password | You **really** need to set this | -| `database.db.rootUser.password ` | root user password | You **really** need to set this | -| `database.db.replicationUser.password`| replication user password | You **really** need to set this | +| `database.auth.username` | Database user | wordpress | +| `database.auth.password` | `wordpress` db user password | You **really** need to set this | +| `database.auth.rootPassword ` | root user password | You **really** need to set this | +| `database.auth.replicationPassword` | replication user password | You **really** need to set this | You can read the descriptions of the other variables in `values-local.yaml.example` and of even more variables in `values.yaml`. diff --git a/templates/statefulset.yaml b/templates/statefulset.yaml index d8c09dac180256770a71b7cf97d65cf77d257959..8d5595585f5a1441fcd72d554d2f71a55b3268cc 100644 --- a/templates/statefulset.yaml +++ b/templates/statefulset.yaml @@ -57,20 +57,6 @@ spec: subPath: main.yml - name: ansible-secrets mountPath: /var/local/ansible/secrets - env: - - name: WORDPRESS_DB_HOST - value: {{ .Release.Name }}-database - - name: WORDPRESS_DB_USER - value: {{ .Values.database.db.user }} - - name: WORDPRESS_DB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Release.Name }}-database - key: mariadb-password - - name: WORDPRESS_DB_NAME - value: {{ .Values.database.db.name }} - - name: WORDPRESS_TABLE_PREFIX - value: {{ .Values.wordPressTablePrefix }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" @@ -102,21 +88,6 @@ spec: successThreshold: {{ .Values.readinessProbe.successThreshold }} failureThreshold: {{ .Values.readinessProbe.failureThreshold }} {{- end }} - - env: - - name: WORDPRESS_DB_HOST - value: {{ .Release.Name }}-database - - name: WORDPRESS_DB_USER - value: {{ .Values.database.db.user }} - - name: WORDPRESS_DB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Release.Name }}-database - key: mariadb-password - - name: WORDPRESS_DB_NAME - value: {{ .Values.database.db.name }} - - name: WORDPRESS_TABLE_PREFIX - value: {{ .Values.wordPressTablePrefix }} # readinessProbe: # httpGet: # path: / @@ -140,19 +111,6 @@ spec: command: - "/var/local/ansible/scripts/backup.sh" env: - - name: WORDPRESS_DB_HOST - value: {{ .Release.Name }}-database - - name: WORDPRESS_DB_USER - value: {{ .Values.database.db.user }} - - name: WORDPRESS_DB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Release.Name }}-database - key: mariadb-password - - name: WORDPRESS_DB_NAME - value: {{ .Values.database.db.name }} - - name: WORDPRESS_TABLE_PREFIX - value: {{ .Values.wordPressTablePrefix }} - name: BACKUP_INTERVAL_SECONDS # A day's worth of seconds. value: {{ .Values.backup.intervalSeconds | quote }} diff --git a/values-local.yaml.example b/values-local.yaml.example index 82d0bd1b1d598410173efef7890e4ab8af952dcc..4c78587c59daeae5dd5885f14b6cb225f7a303c9 100644 --- a/values-local.yaml.example +++ b/values-local.yaml.example @@ -118,13 +118,11 @@ openid_connect_settings: role_key: roles database: - db: - user: wordpress + auth: + username: wordpress password: <SET A DATABASE PASSWORD> - rootUser: - password: <SET A DB ROOT USER PASSWORD FOR UPGRADES TO WORK> - replication: - password: <SET A REPLICATION USER PASSWORD IF YOU HAVE REPLICATION ENABLED> + rootPassword: <SET A DB ROOT USER PASSWORD FOR UPGRADES TO WORK> + replicationPassword: <SET A REPLICATION USER PASSWORD IF YOU HAVE REPLICATION ENABLED> # Set this to true to have a Redis container next to your WP. The WP will be # configured to connect to this Redis and `Redis Object Cache` plugin will be diff --git a/values.yaml b/values.yaml index cd8257dd8ddd62ca0022de970905eeedc4c2f630..b826c68b7775384d9ecacd96329b66faa749c996 100644 --- a/values.yaml +++ b/values.yaml @@ -264,14 +264,14 @@ nodeSelector: {} tolerations: [] affinity: {} + database: - db: - user: wordpress + auth: + username: wordpress password: CHANGE-THIS-PASSWORD - name: wordpress_db - replication: - enabled: true - master: + database: wordpress_db + architecture: replication + primary: persistence: size: 4Gi config: |- @@ -295,7 +295,7 @@ database: [manager] port=3306 socket=/opt/bitnami/mariadb/tmp/mysql.sock - slave: + secondary: persistence: size: 4Gi config: |- @@ -319,6 +319,7 @@ database: [manager] port=3306 socket=/opt/bitnami/mariadb/tmp/mysql.sock + redis: # Set redis.enabled to true to have a Redis container next to your WP. The WP will be # configured to connect to this Redis and `Redis Object Cache` plugin will be @@ -348,11 +349,11 @@ ansibleSecrets: | BACKUP_NAME: {{ .Release.Name }} BACKUP_TARGET: {{ .Values.backup.target }} BACKUP_ISDATE: {{ .Values.backup.isDate }} - DB_HOST: {{ .Release.Name }}-database - DB_NAME: {{ .Values.database.db.name }} - DB_PASS: {{ .Values.database.db.password }} + DB_HOST: {{ .Release.Name }}-database-primary + DB_NAME: {{ .Values.database.auth.database }} + DB_PASS: {{ .Values.database.auth.password }} DB_PREFIX: {{ .Values.wordpress.config.db.prefix}} - DB_USER: {{ .Values.database.db.user }} + DB_USER: {{ .Values.database.auth.username }} LANGUAGES: {{ .Values.wordpress.site.languages }} DEFAULT_LANG: {{ .Values.wordpress.site.default_language }} WP_CONTENT_MOUNT: {{ .Values.wordpress.wp_content.mount_path }}