Skip to content

Commit

Permalink
Merge branch 'feature/GH-89' into 'develop'
Browse files Browse the repository at this point in the history
Fixes GH-89 Installation stuck at "waiting on database connection"

See merge request passbolt/passbolt-ops/helm-charts/charts-passbolt!60
  • Loading branch information
Tecnobutrul committed Jun 24, 2024
2 parents 805d919 + c2fde34 commit bb517f8
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ spec:
password=${DATASOURCES_DEFAULT_PASSWORD}
host=${DATASOURCES_DEFAULT_HOST}
connect-timeout=2
ssl={{ .Values.app.database.ssl | default "off" }}
EOF
userhost="%"
client="{{- include "passbolt.databaseClient" . }}"
Expand Down
21 changes: 21 additions & 0 deletions tests/initContainer_ssl_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
suite: deployment initContainer database client ssl
release:
name: test
tests:
- it: ssl shoudl be off by default
templates:
- deployment.yaml
asserts:
- matchRegex:
path: spec.template.spec.initContainers[0].args[1]
pattern: "ssl=off"
- it: ssl shoudl be on when user enables it
set:
app.database.ssl: "on"
templates:
- deployment.yaml
asserts:
- matchRegex:
path: spec.template.spec.initContainers[0].args[1]
pattern: "ssl=on"
2 changes: 2 additions & 0 deletions tests/integration/fixtures/passbolt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ function registerPassboltUser {
--data-raw "{\"authenticationtoken\":{\"token\":\"${user_token}\"},\"gpgkey\":{\"armored_key\":\"$(awk '{printf "%s\\n", $0}' public-${email}.asc)\"}}" \
--compressed >/dev/null
_log User "$email" succesfully registered
# Fixes an issue on the CI, where user with this key isn't found.
sleep 10
}

function configurePassbolt {
Expand Down
4 changes: 4 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ app:
# Allowed options: mariadb, mysql or postgresql
database:
kind: mariadb
# -- Configure ssl on mariadb/mysql clients
# -- In case this is enabled, you will be responsible for creating and mounting the certificates and
# -- additional configutions on both the client and the server.
# ssl: off
cache:
# Use CACHE_CAKE_DEFAULT_* variables to configure the connection to redis instance
# on the passboltEnv configuration section
Expand Down

0 comments on commit bb517f8

Please sign in to comment.