FIX YOUR MARIADB ROOT PASSWORD
Because you don't want it broken.
I keep going back to this comment as all bitnami's helm charts have an issue when using ArgoCD with the default username/password for MariaDB where the secret is re-generated everytime.
The correct solution is to use "existingSecret" in the values.yaml OR a secret for an external database.
What I do now since I do not have crazy traffic is to have 1 MariaDB in my Kubernetes Cluster and create a user and a database for each application that uses MariaDB, make sure to give the correct scope for each user.
In any case here's the solution for the default behaviour:
Solution from @lknite in this comment: bitnami/charts#10439 (comment)
For someone who comes across this later, I was able to get things back up and working by:
edit the mariadb statefulset
kubectl edit statefulset wordpress-<website>-mariadb
& setting a command to run:
set a command to be run instead of the default from the container
- /opt/bitnami/mariadb/bin/mysqld_safe
- --skip-grant-tables
- --skip-networking
- --datadir=/bitnami/mariadb/data
now reset the root@% password
k exec -it wordpress-<website>-mariadb-0 -- bash
mysql -u root
> use mysql;
> FLUSH PRIVILEGES;
> ALTER USER 'root'@'%' IDENTIFIED BY '<password to use from your secret>';
modify the statefulset to remove the command added earlier & kill the pod