Comments (12)
Could we use this as a solution?
{{- if .Values.mariadb.enabled }}
initContainers:
- name: mariadb-isalive
image: bitnami/mariadb
env:
- name: MYSQL_USER
valueFrom:
secretKeyRef:
name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf "%s-%s" .Release.Name "db") }}
key: {{ .Values.externalDatabase.existingSecret.usernameKey | default "db-username" }}
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf "%s-%s" .Release.Name "db") }}
key: {{ .Values.externalDatabase.existingSecret.passwordKey | default "db-password" }}
command:
- "sh"
- "-c"
- {{ printf "until mysql --host=%s-mariadb --user=${MYSQL_USER} --password=${MYSQL_PASSWORD} --execute=\"SELECT 1;\"; do echo waiting for mysql; sleep 2; done;" .Release.Name }}
{{- end }}
from helm.
OK, I think I see the issue here. 2.5.5
adds a test to validate that MySQL is up before the nextcloud pod starts. It appears that using an existing secret must not interpolate the value mariadb.db.password
to the helm chart values.
I'm not familiar enough with how exactly helm populates that value to the initContainers
if the value is an existing secret.
I could add a check to the helm template to only run that if the password is defined, but maybe there's a way to incorporate both features.
from helm.
I will write up a conditional for the maria.db.password
check just to have a solution, but it would be nice to look into what's possible.
from helm.
Can you provide some of your values
(removing sensitive data)?
from helm.
Sure, here you go, thanks for taking the time:
image:
tag: 21-beta
nextcloud:
host: nextcloud.mydomain.internet
existingSecret:
enabled: true
secretName: nextcloud-helm-chart
usernameKey: nextcloud-username
passwordKey: nextcloud-password
phpConfigs: {}
defaultConfigs:
.htaccess: true
redis.config.php: true
apache-pretty-urls.config.php: true
apcu.config.php: true
apps.config.php: true
autoconfig.php: true
smtp.config.php: true
configs:
https.config.php: |-
<?php
$CONFIG = array (
'overwriteprotocol' => 'https',
);
strategy:
type: Recreate
extraEnv:
extraVolumes:
extraVolumeMounts:
internalDatabase:
enabled: false
externalDatabase:
enabled: true
type: mysql
database: nextcloud
existingSecret:
enabled: true
secretName: nextcloud-database
usernameKey: mariadb-username
passwordKey: mariadb-password
mariadb:
enabled: true
existingSecret: nextcloud-database
db:
name: nextcloud
user: nextcloud
master:
persistence:
enabled: true
persistence:
enabled: true
annotations: {}
size: 200Gi
metrics:
enabled: true
https: true
service:
annotations: {}
labels:
app: nextcloud-metrics
from helm.
Just to clarify, this was working on release 2.5.4
(or earlier)?
from helm.
Yep, we've set the version to 2.5.*
in argo-cd so it went to 2.5.5
from 2.5.4
just after the latest release
from helm.
Yep, looks like the root cause, I will also look for a solution.
from helm.
@hubwoop that's a great solution! Would you want to submit a PR for that? I can take care of it later if you can't for some reason.
from helm.
Cool! Sure, I'll open a PR later today (GMT).
from helm.
Hi,
any progress on this?
from helm.
Hey guys, templating the Release.Name
(--host=%s-mariadb
) inside the initContainer
is creating trouble for external databases which use another url.
Maybe use _helpers.tpl
to check wether the externalDatabase is set and use its url instead.
EDIT: Only applies if you still use the .Values.mariadb.enabled
option, but e.g. change its fullNameOverride option or you want to use a specific pod of the StatefulSet.
from helm.
Related Issues (20)
- Can't start Nextcloud because the version of the data (0.0.0.0) is higher than the docker image version () and downgrading is not supported. Are you sure you have pulled the newest image version? HOT 1
- Helm chart 4.6.8 does not work when using an external database for NextCloud. "key" is not defined. HOT 1
- Cannot disable packaged PostgreSQL HOT 2
- Feature: Use CronJob resources instead of a container with crond HOT 9
- PHP Memory Limit should be configured properly by default HOT 8
- Enabling `.persistence.enabled` leads to `/var/www/html/lib` and probably other files not being created HOT 5
- chown permission in nfs pvc HOT 2
- Error: Accessing site insecurely via HTTP | Config Question HOT 3
- Add ExtraVolumes for Cronjob Container HOT 2
- Feature: Add Valkey as an optional subchart to be an alternative to redis HOT 1
- Feature: Add test for enabling redis to ci
- Feature: Add test for metrics in CI
- Feature: Add OnlyOffice as a subchart
- Feature: Add Collabora as a subchart
- New S3 Configuration breaks prior S3 configuration and is missing uploadPartSize HOT 7
- Feature: Add test for adding extra configs in CI
- failed to create resource: Deployment.apps "nextcloud" is invalid: [spec.template.spec.containers[0].env[22].valueFrom.secretKeyRef.key: Required value, spec.template.spec.containers[1].env[22].valueFrom.secretKeyRef.key: Required value] HOT 1
- Changing nextcloud.host vars results in crashloopbackoff HOT 1
- The smb protocol is not available
- Configure datadir & external database properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from helm.