mariadb.existingSecret doesn't seem to be working
Nobody has claimed this yet.
- Dominant language
- Go Template
- Stars
- 534
- Forks
- 314
- Avg merge
- 42m
- Merged PRs (30d)
- 1
Description
Describe your Issue
When using an existing secret with the bitnami mariadb chart config, nextcloud pod is unable to log into mariadb. The existing secret contains the keys specified in the values.yaml file. When omitting mariadb.existingSecret, the pod starts up no problem.
Logs and Errors
$ kubectl logs -n nextcloud nextcloud-mariadb-0
2024-01-04 15:25:42 150 [Warning] Access denied for user 'nextcloud'@'10.1.72.175' (using password: YES)
2024-01-04 15:25:44 151 [Warning] Access denied for user 'nextcloud'@'10.1.72.175' (using password: YES)
2024-01-04 15:25:46 152 [Warning] Access denied for user 'nextcloud'@'10.1.72.175' (using password: YES)
...
Describe your Environment
-
Kubernetes distribution:
MicroK8s v1.28.3 revision 6089 -
Helm Version (or App that manages helm):
Microk8s Helm
version.BuildInfo{Version:"v3.9.1+unreleased", GitCommit:"6303a77a1c2a0be76eaec96531e0a99bddec959a", GitTreeState:"clean", GoVersion:"go1.20.10"} -
Helm Chart Version:
latest -
values.yaml:
N/A because I am avoiding using a separatevalues.yamlfor simplicity and always using the latest. Here's my helm command:
helm install nextcloud nextcloud/nextcloud \
--namespace nextcloud \
--set ingress.enabled=true \
--set nextcloud.host=$NC_HOST \
--set nextcloud.username=admin \
--set nextcloud.existingSecret.enabled=true \
--set nextcloud.existingSecret.secretName=$NC_ADMIN_SECRET_NAME \
--set internalDatabase.enabled=false \
--set externalDatabase.enabled=true \
--set mariadb.enabled=true \
--set mariadb.auth.existingSecret=$MARIADB_SECRET_NAME \
--set persistence.enabled=true \
--set persistence.storageClass=$STORAGECLASS
Additional context, if any
I've checked 1000 times to make sure that I'm including the proper keys in the mariadb-passwords secret, this looks correct to me
$ kubectl describe secret -n nextcloud $MARIADB_SECRET_NAME
Name: mariadb-passwords
Namespace: nextcloud
Labels: <none>
Annotations: <none>
Type: Opaque
Data
====
mariadb-replication-password: 28 bytes
mariadb-root-password: 28 bytes
password: 28 bytes
mariadb-password: 28 bytes
I created all of the passwords with openssl rand -base64 20, if that makes any difference
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by rendering the chart with the reported helm command and inspect the mariadb.auth.existingSecret handling in values.yaml and the resulting pod configuration. Compare the rendered credentials with the named secret keys and verify that the Nextcloud pod can authenticate to MariaDB; the issue is done when an existing secret works without access-denied errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes, mariadb
- Domain
- databases, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100