diff --git a/codefresh/Chart.yaml b/codefresh/Chart.yaml
index 10f3daf95..998529e22 100644
--- a/codefresh/Chart.yaml
+++ b/codefresh/Chart.yaml
@@ -1,7 +1,7 @@
apiVersion: v2
description: Helm Chart for Codefresh On-Prem
name: codefresh
-version: 2.8.0
+version: 2.8.1
keywords:
- codefresh
home: https://codefresh.io/
@@ -19,7 +19,9 @@ annotations:
# supported kinds are added, changed, deprecated, removed, fixed and security.
artifacthub.io/changes: |
- kind: added
- description: "Documentation about index management in MongoDB"
+ description: "Documentation about external MongoDB Atlas"
+ - kind: fixed
+ description: "Fix postgresql seed job"
dependencies:
- name: cf-common
repository: oci://quay.io/codefresh/charts
diff --git a/codefresh/README.md b/codefresh/README.md
index cba22ac9c..2c44cc8f5 100644
--- a/codefresh/README.md
+++ b/codefresh/README.md
@@ -1,6 +1,6 @@
## Codefresh On-Premises
- 
+ 
Helm chart for deploying [Codefresh On-Premises](https://codefresh.io/docs/docs/getting-started/intro-to-codefresh/) to Kubernetes.
@@ -227,6 +227,37 @@ However, you might need to use external services like [MongoDB Atlas Database](h
#### External MongoDB
+> ⚠️ **Important!** If you use MongoDB Atlas, you must create the following databases in advance before installing Codefresh:
+
+```console
+archive
+audit
+charts-manager
+cluster-providers
+codefresh
+context-manager
+gitops-dashboard-manager
+k8s-monitor
+pipeline-manager
+platform-analytics-postgres
+read-models
+runtime-environment-manager
+onboarding-status
+payments
+```
+
+> You alse need to create a database user with `Write` permissions to ALL databases.
+> Then, provide the user credentials in the chart values at
+`.Values.global.mongodbUser/mongodbRootUserSecretKeyRef`
+`.Values.global.mongodbPassword/mongodbRootPasswordSecretKeyRef`
+`.Values.seed.mongoSeedJob.mongodbRootUser/mongodbRootUserSecretKeyRef`
+`.Values.seed.mongoSeedJob.mongodbRootPassword/mongodbRootPasswordSecretKeyRef`
+> Ref:
+> [Create Database in Atlas](https://www.mongodb.com/docs/atlas/atlas-ui/databases/#create-a-database)
+> [Create Users in Atlas](https://www.mongodb.com/docs/atlas/security-add-mongodb-users/#configure-database-users)
+
+`values.yaml` for external MongoDB:
+
```yaml
seed:
mongoSeedJob:
diff --git a/codefresh/README.md.gotmpl b/codefresh/README.md.gotmpl
index 93deb19be..f98f7c26a 100644
--- a/codefresh/README.md.gotmpl
+++ b/codefresh/README.md.gotmpl
@@ -228,6 +228,38 @@ However, you might need to use external services like [MongoDB Atlas Database](h
#### External MongoDB
+> ⚠️ **Important!** If you use MongoDB Atlas, you must create the following databases in advance before installing Codefresh:
+
+```console
+archive
+audit
+charts-manager
+cluster-providers
+codefresh
+context-manager
+gitops-dashboard-manager
+k8s-monitor
+pipeline-manager
+platform-analytics-postgres
+read-models
+runtime-environment-manager
+onboarding-status
+payments
+```
+
+> You alse need to create a database user with `Write` permissions to ALL databases.
+> Then, provide the user credentials in the chart values at
+`.Values.global.mongodbUser/mongodbRootUserSecretKeyRef`
+`.Values.global.mongodbPassword/mongodbRootPasswordSecretKeyRef`
+`.Values.seed.mongoSeedJob.mongodbRootUser/mongodbRootUserSecretKeyRef`
+`.Values.seed.mongoSeedJob.mongodbRootPassword/mongodbRootPasswordSecretKeyRef`
+> Ref:
+> [Create Database in Atlas](https://www.mongodb.com/docs/atlas/atlas-ui/databases/#create-a-database)
+> [Create Users in Atlas](https://www.mongodb.com/docs/atlas/security-add-mongodb-users/#configure-database-users)
+
+
+`values.yaml` for external MongoDB:
+
```yaml
seed:
mongoSeedJob:
diff --git a/codefresh/files/postgresSeedJobScript.sh b/codefresh/files/postgresSeedJobScript.sh
index f5bd6181a..442278a69 100644
--- a/codefresh/files/postgresSeedJobScript.sh
+++ b/codefresh/files/postgresSeedJobScript.sh
@@ -2,6 +2,7 @@
DEBUG="${DEBUG:-false}"
+
set -euo pipefail
if [[ $DEBUG == "true" ]]; then
@@ -45,6 +46,7 @@ function runSeed() {
export PGPASSWORD=${POSTGRES_SEED_PASSWORD}
export PGHOST=${POSTGRES_HOSTNAME}
export PGPORT=${POSTGRES_PORT}
+ export PGDATABASE=postgres # Use the default postgres database
if [[ "${POSTGRES_SEED_USER}" != "${POSTGRES_USER}" ]]; then
createUser